3-wire SPI interface example for NHD-2.8-240320AF-CSXP-F
I have your 'C' example for the ST7789 that is written to support 8 or 16 bit parallel mode. I am trying to modify it to allow use of 3-wire SPI mode instead but am not having success. I have verified that I have IM2 = 3.3V, IM1 = 0V and IM0 = 3.3V to select 3-wire SPI mode. I also verified that the master (microcontroller) is driving the /RES, /CSX, SDA & DCX inputs on the display board correctly. I assume I don't really have to set the front porch register and many other associated registers from the parallel example, but could I get a list of which registers from the example are required to initialize the display for SPI? So far after powerup I do a hardware reset, then write SLPOUT, MADCTL, COLMOD, CASET, RASET and RAMWR. Also, I just tried reading the RDDST and RDDID registers to see what I would get, and I get back logic '1' for every bit. So far the display backlight turns on but there is nothing on the LCD. Thank you.
-
Hi John,
Could you confirm the part number on the back of your display and check what REV it is? We had a recent engineering change for this part to add the SPI interfaces. You can find it here:
And you can find the product transition guide here:
https://newhavendisplay.com/content/docs/NHD-2.8-240320AF-CSXP-F_TransitionGuide.pdf
Please let me know what Rev your display is.
0 -
Hello,
Thank you for the quick reply. I have 2 displays and both are labeled as rev 1B. I have only tried one of them so far.
0 -
Hi John,
Thank you for the clarification. Are you leaving the IM1 pin floating? Or are you tying it to GND?
0 -
I have IM1 tied to 3.3V. I also have tied all the unused parallel input pins to GND as was advised in another related posting (pins 12-29; WRX, RDX, DB15:0).
In my test circuit I am seeing a lot of clock noise on the CSX and SDA lines, so maybe it is too much. I will try to improve those connections and see if that helps.
0 -
Sorry - I meant to say I have IM1 connected to GND (not floating). I do not have it tied to 3.3V as I said above.
0 -
Hi John,
Do you have an email we can reach you with? I can provide some example code that uses SPI that uses Arduino.
0 -
Yes, but I would rather not post it in the forum - is there a way I can send it privately to you? Otherwise, the email I am using for logging into this forum is good if you have direct access to that.
0 -
Hi John,
You can reach our engineering team by filling out this form and we'll reply via email:
0
Please sign in to leave a comment.
Comments
8 comments