in reply to ST7789V2 LCD Controller
... which approach would you start with?
The website you linked to has several examples for Raspi and Arduino. Study the code. Way down on the page are links to a schematic and the ST7789V2 datasheet.
Schematics are primitive, just level converters and a voltage regulator connected between the "public" interface to the outside world and the LCD controller. LCD backlight is PWM controlled by the outside interface (pin 1). Other signals look like I²C (SDA, SCL), there is also a chip select (CS), data/control switch (D/C), and a reset line (RST). Reading the Spec at the top of the web page lists SPI, not I²C as control interface. So SDA should be named MOSI, SCL should be named CLK, and having a CS line makes total sense with SPI. Note that there is no MISO, as usual for many LCDs. They are write-only devices.
On top of the website, you can see a timing diagram sending 16 bit RGB565 pixel data. This is how you write into display memory - pixel by pixel, with D/C set high. With a little bit of luck, there is a way to move to a selected pixel before writing, probably by setting D/C low.
The ST7789V2 datasheet starts with a lot of electrical stuff, the serial interface is documented in chapter 8.4 and following explaining low-level SPI, Commands are in chapter 9. Note that you can not read back from the display, the required data line (MISO) is not available at the outside interface.
So this is how I would start. Read the website, the datasheet, the example code. Example code often stinks and most times lacks any error checks. Datasheets omit little details and sometimes are plain wrong. Get used to it.
Alexander
|
|---|