tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
606 stars 188 forks source link

VSync and ST7789VW display wiring problem #218

Closed anydream closed 3 years ago

anydream commented 3 years ago

Hello,

I noticed that the tingo ST7789 driver has implements the VSync function, which relies on reading the GSCAN register value from display, but my ST7789VW display has only one SDA pin for SPI communication. As far as I know, the SDA pin is used for MOSI, so how should the MISO on the ESP32 be wired to make the VSync work?

Thanks!

aykevl commented 3 years ago

I have not personally tested the ST7789 driver on the ESP32 and I haven't attempted reading a register from the display either.

To be honest, I don't know how this should be wired. Maybe it requires some diodes and resistors to split the signal?

anydream commented 3 years ago

After several days of research, I found that my display pinout is 3-wire SPI: CS/SCK/SDA. reading and writing can be done through only one SDA pin. Maybe this issue is solved.

conejoninja commented 3 years ago

Last commit on release branch ( #ce9c93f ) changed the ST7789 example SPI mode from 3 to 0. @anydream Is that the cause of your problem? The example stopped working on my 3-wire SPI display until I change back the mode to 3. If that's the case, we should close this issue.