SHARP Memory Display Breakout - 2.7" 400x240 with nrf52840

Hi,

I want to use SHARP Memory Display Breakout - 2.7" 400x240 with nrf52840 development kit. I have to interface the lvgl library for the graphics development but from the documentation, I could not figure out how to connect and there is no basic code for interfacing with the nordic SDK. Please suggest any type of reference for examples if available.

Any kind of input or help will be appreciated.

Thanks in Advance,

  • Hi Muhammad,

    Is this the board you are working with: Adafruit SHARP Memory Display Breakout - 2.7" 400x240 Monochrome ?

    I have not seen any example, though I found a Sharp memory display generic shield available that you may choose a as your shield. I notice that this generic shield is set up for use of the LS013B7DH03 display driver IC while the Adafruit 400x240 module is assembled with LS012B4DN04. I do not know whether this make any difference. The shield might work as is, or you might need to modify it.

    You may start with the lvgl sample and check out the documentation for lvgl(assuming you are using nRF Connect SDK v2.0.2).

    You will need to create an overlay, placed in the lvgl sample project folder, named nrf52840dk_nrf52840.overlay. Consult the documentation for the shield regarding how to wire this. Let us know if you need more details here. 

    Build your lvgl sample with the sharp memory display generic shield(as shown in the documentation above):

    west build -b nrf52840dk_nrf52840 samples/subsys/display/lvgl -- -DSHIELD=ls013b7dh03

    Hope this gets you started. Let us know if you need any assistance.

    Håkon

  • Hi again,

    Thanks for the suggestion. I have tried a few examples and available code from git that seems to be interfaced with the mentioned display.
    https://github.com/ZJ-TEK/ZJ_RT_Thread_NimBLE_LittlevGL_Nordic
    Something like the above can you look at this one and guide if that can be ported to the segger because when I try to build after importing there are lot of errors in that case.

  • Will you be using this board? If not I would suggest to try to get something less complex up and running on the nRF52840 DK. In general, I would also recommend moving from the old nRF5 SDK to the new nRF Connect SDK.

    Did you have a look at building the lvgl sample using the generic shield? Did you encounter any difficulties?

  • Hi,
    Thanks for your prompt response.

    Yes, I am using the nrf52840 DK with Adafruit SHARP Memory Display Breakout - 2.7" 400x240 Monochrome
    Can you specify why we should move to the new nRF Connect SDK? and does it have any template for the specified display or library?

    Just for your information I have tried the display interface with the Arduino with the following library and it worked fine but it was all in black&white and there were no options with colors to operate with.

    For simplicity, my question is only how can I operate this type of display with lvgl? 


    I have checked on Zypher the following sample is there but no information about our adafruit shield in that and due to that, I cannot map the pins.

    Can you suggest on the above concerns?

    Thank you.

  • Muhammad said:
    it worked fine but it was all in black&white and there were no options with colors to operate with

    Is not this to be expected? The link you provided is for a monochrome(black and white) display.

    Muhammad said:
    Can you specify why we should move to the new nRF Connect SDK?

    This is up to you, although we strongly recommend the nRF Connect SDK. The SDK is built on Zephyr, a scalable RTOS. nRF Connect SDK is where we implement new features and updates. Using VS Code as the IDE is also very convenient. Here is the Get started page for nRF Connect SDK. Also check out the Nordic Developer Academy

    Other links: nRF Connect SDK, Zephyr FAQs.

    Muhammad said:
    and does it have any template for the specified display or library?

    The nRF Connect SDK includes Zephyr which has a sample called 'lvgl' which gets you started with LVGL. The SDK also includes the mentioned generic display driver for LS0XX type Sharp memory pixel displays.

    Attached is a project folder with the lvgl sample that I have set up with the generic Sharp shield.

    I started with the lvgl sample and added the generic sharp shield, ls013b7dh03. I added the shield by adding set(SHIELD ls013b7dh03) to CMakeLists.txt.

    You may find the files related to the shield in your nRF Connect SDK folder, for example: C:\ncs\v2.0.2\zephyr\boards\shields\ls0xx_generic

    I created an .overlay-file named nrf52840dk_nrf52840.overlay in the project folder and copied the overlay from the shield's folder into this file. If you want to change output pins, then nrf52840dk_nrf52840.overlay is a convenient place to do so in.

    The SPI3 pins are configured by default. However, I copied the definitions from the board files into the .overlay in case you would like to make any changes.

    Looking at the overlay file, you can see that this project now is set up with the pins in the table below.

    Disclaimer: I was not able to find good documentation for the display module so the connections on the display module side of the table is based on guesswork. As the driver is generic there is no guarantee it will work without any adjustments. However, the driver is designed for use with the lvgl sample and will at least serve as an example showing how to get LVGL set up with a module.

    The attached project is just an example how to do things. I have not tested this as I do not have this display module available. I suggest you double check that the pin connections make sense as I cannot guarantee that I have not made any mistakes.

    Display module pin name nRF52840 pin name Comment
    EXTIN P0.14
    DISP P0.12
    EXTMD 'GND' or 'VDD' I assume this is for toggling display inversion.

    CS

    P0.16

    MOSI

    P1.13
    SCLK P1.15
    GND 'GND'
    3V3 'Vin 3-5V' The DK adjusts the IO voltage according to the voltage provided at the 'Vin 3-5V' pin
    VIN (3.3V-5V) '5V' The DK now supplies the display module with 5V
    P1.14 (MISO) MISO not used by display module

    Regardless of whether your display module works right away or not, it is a good idea to open a terminal window in your computer in order to see any output messages from the application, like status, errors, etc.

    lvgl_sharp.zip

Related