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,

Parents Reply Children
  • 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. EDIT: I would also recommend to measure the pins 'VDD' and 'Vin 3-5V' on the DK to verify things are working as expected.

    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. Edit: From the driver documentation: "Currently the driver only supports VCOM toggling using the EXTCOMIN pin (EXTMODE pin is connected to VDD)." -> I am not sure what this means, so it is better to start with EXTMD tied to VDD.

    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.

    6038.lvgl_sharp.zip

Related