Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 Reporting to Arduino LCD shield?

Hi there!

Working with the nRF52840 DK, I am wondering how I might modify an existing SDK example in order to display the Tx and Rx Power characteristic on a hardware connected LCD display?

That is, rather than using a BLE-UART example, I'd like to interface with an Arduino (or others?) LCD shield mounted on the DK. 

I'v tried a few things that I thought might produce a quick result, but I find that I don't really know what I'm looking for as far the software. 

My next theory is maybe to somehow report this characteristic to the LCD over the TWI/I2C bus? But again, still a little lost on that. 

I've been using the most current SDK and Soft Device. I've been successfully using Keil to build and flash other, simpler modified example code (and Soft Device) to the DK, but the TWI is getting tricky for me. 

Open to other suggestions on how to achieve this. 

Beyond the Tx/Rx Signal, eventually I'll be looking to report the power consumption and battery level on the LCD as well. 

Many thanks for your time, 

Cheers, 

Sam

  • Edvin, 

    I hope you don't mind me coming back to this. We took you up on your advice about eventually remapping the SPI pins to our custom pins, and simply using an ILI9341 controlled LCD Display. We settled on the 2.8in TFT SPI Module

    *No SPI pins were remapped at this point*

    To be efficient, we are just quickly setting it up to work with the gfx SDK example out of the box. The pins were a little tricky to figure out, as they don't quite match SPI X-wire formats. But, we believe we were able to wire it to our nRF52840 PDK with 2x checked accuracy. 

    Problem is: Running the gfx example leaves a blank display (LED back light is lit). 

    Given the hardware mentioned, do you foresee an issue that might cause this symptom?

  • Update on the Received Signal Strength Reporting:

    The only two parameters I'm really after are the Tx Signal strength to reference with as well as the Rx sensitivity of each connection (displayed on the central board). Can you point me to some of these parameters? Or resources?

    Was able to log the rssi of the current connection to the console by use of the sd_ble_gap_rssi_start() and sd_ble_gap_rrsi_get() wrapped in a BLE_GAP_EVT_RSSI_CHANGED event to the handler. So, similar to what you mentioned in your initial reply. Really appreciate the guidance here mate. 

  • Let us assume that you didn't change much in the gfx example.

    By default, it uses the configuration of the ili9341, which is the one you are using.

    By default in this project, the following pins are set on the nRF52840:

    SCK(clock): P1.15

    MISO(SDO): P1.14

    MOSI(SDI): P1.13

    SS/CS: P1.12

    These should be connected to the corresponding pins on the screen, respectively: SCK, SDO, SDI, CS. In addition, you need to supply it with GND and VDD (0V and 3V), and for good measure, I would also connect LED (power for background light) to VDD, and RESET to pin P0.18. Please also check that SB42 on the DK is not cut (it should be shorted by default, so if you haven't cut it, it is fine).

    What does the log from the gfx application say when you run it?

    Best regards,

    Edvin

  • Edvin, 

    Thank you for staying with me here so far, your help is much appreciated. I've double checked our connections with the pin-out you've provided above. Indeed they were the same as we've had them configured so far. Any thoughts on the 'DC' pin labeled on the LCD PCB? Looking at the data sheet of the LCD Display, it seems that pin would be best pulled to Ground or N.C. for this \gfx example. So far, we've had it N.C.

    So, starting with that, our next steps will have to be checking the display for issues, and finally with a different 840 DK. Any chance you have some insight as to what's going on?

    Thanks again, 

    Sam

  • I don't think DS pins are standard SPI pins. I found this, however. Just try to set it low and high, to see whether one works and one doesn't.

Related