NHD-1.5-240240AF-CSXP SPI
Hi, i have a NHD-1.5-240240AF-CSXP rev1a and according to the the datasheet https://newhavendisplay.com/content/specs/NHD-1.5-240240AF-CSXP.pdf it should support 4-wire SPI but I'm having trouble with getting it to do anything using eSPI_tft library in platform.io.
Does it support 4-wire SPI at all or am I looking at documentation for newer revisions?
-
Hi Jonas,
The display does support 4-Wire SPI. So we could properly diagnose the issue, could you please provide the following:
- A wiring diagram or schematic on how you are connecting to the display
- A picture of the back of the display with the part number and date code visible
0 -
Hi,
so, I'm really not a professional here, but hopefully this schematic explains the wiring. I'm doing this on an espressif esp32-s3-devkitc-1 at the moment.
My eSPI_tft library configuration is provided using the platformio.ini file like this:
-DST7789_DRIVER=1-DUSER_SETUP_LOADED=1-DTFT_WIDTH=240-DTFT_HEIGHT=240-DTFT_MISO=13-DTFT_MOSI=11-DTFT_SCLK=12-DTFT_CS=-1-DTFT_DC=2-DTFT_RST=4-DLOAD_GLCD=1-DLOAD_FONT2=1-DLOAD_FONT4=1-DLOAD_FONT6=1-DLOAD_FONT7=1-DLOAD_FONT8=1-DLOAD_GFXFF=1-DSMOOTH_FONT=1-DSPI_FREQUENCY=27000000
0 -
Sorry, the library I use is of course TFT_eSPI (https://github.com/Bodmer/TFT_eSPI). I don't mind changing to Adafruit's is that is a better option. But I would like to get some kind of sign of life from the display, and hopefully some guidance on what library to use.
The only thing working right now is the LED background.
0 -
Hi Jonas,
Thank you for the additional information. I looked at the schematic you provided and noticed that the MOSI pin coming from your MCU is connected to pin 13 of the display. The MOSI pin should be connected to pin 14 instead:
0 -
Hi Jonas,
I also noticed that the SCL and DCX pins is wrong. You can see the correct wiring diagram here:

You should connect the following signals from your MCU like this:
- DCX signal should be connected to pin 12 on the display
- SCLK signal should be connected to pin 11 on the display
- MOSI signal should be connected to pin 14 on the display
0 -
But according to the documentation, pin 11 on the display is DCX, should that be SCLK from my MCU ?
and 12 on the display is WRX, should that be DCX on my MCU ?
MOSI on pin 14 is just me sketching the schematics in a hurry :) Sorry for that!0 -
Hi Jonas,
The pin definitions on the data sheet only describes the parallel interface. We will update the documentation soon to include the definitions for SPI.
For now you would need to follow the wiring diagram I provided for SPI.
0 -
Oh! The wiring diagram didn't lie :) Now it works like a charm!
Thank you so much for this clarification!
0 -
Hi Jonas,
That's good to hear you got the display working. If you have any more questions or concerns, please feel free to reach out.
0
Please sign in to leave a comment.
Comments
9 comments