Can the NHD-0216MW-SB3 use SPI (and pinout question)?
I thought this device can use standard 4-wire SPI (MISO, MOSI, CS, CLK), however, all the example code is bit-banging and a forum post says that SPI is unsupported outright (https://support.newhavendisplay.com/hc/en-us/community/posts/11258590394647-SPI-initialization-of-NHD-0216AW-SB3).
I have other SPI peripherals on this bus, so I would like to use standard SPI to communicate with the display. I believe I'm communicating with it right (My MCU data out is going to the display's data in pin) and I've verified the data using a logic analyzer, I'm resetting the display before communication (with sufficient delays, reset when logic low), I'm using a CS (selected when logic low), I'm communicating about about 250 kHz and I'm using 3.3V and providing it to both VDDIO & VDD_SEL.
I'm using the provided initialization sequence from the data sheet, and I've confirmed that my SPI implementation outputs the same bits as the bit-banging implementation. One idea I have is that I'm not sure that I would see a change if the display is initialized vs not being initialized, but I've also copied in some example text output, and I get no indication on the display. Infact, throughout this whole sequence, I see absolutely nothing change on the display, and I'm not sure if, in general, this is expected. (Obviously I would expect to see the text, though)
Also, is the following pinout correct? That's what I assume the pin mapping is between the two indicated pins.

Thanks.
-
Solved. Pinout above is correct.
For SPI to work on this display, you must use CPOL = 1, CPHA = 1
I'm running at 500 kHz without any issues, might try bumping up the speed.
For anybody's future reference, here's what the waveform should look like for the first `command(0x2A)`
0 -
Hi Maxwell,
Thank you for sharing the information. We are glad to hear that the issue has been resolved on your end.
0
Please sign in to leave a comment.
Comments
2 comments