You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
967 B
Markdown

# Interfacing ST7789 LCD vis SPI
[Reference](https://raspberrypi.stackexchange.com/questions/105364/how-to-connect-st7789-lcd-to-raspberry-pi)
## Pinout
st7789
Label | Description
------|-----
BLK | Backlight
DC | Data/Command
RES | Reset
SCK | Serial Clock
DIN | Serial Data
VCC | 3V3
GND | Ground
Interfacing
ST7789 | Pi | PinOut | Description
-----|-----|----|-----
VCC | 3V3 | 17 | 3V3
GND | GND | 6 | Ground
DIN | BCM 10 | 19 | SPI0 MOSI
SCK | BCM 11 | 23 | SPI0 SCLK
CS | BCM 7 | 26 | SPI0 CE1
DC | BCM 9 | 21 | SPI0 MISO
RES | BCM 19 | 35 | SPI1 MISO ?
BL | BCM 27 | 13 | GPIO 2
![](./SPI.png)
## [Sample Code](https://github.com/pimoroni/st7789-python.git)
update pi
```
sudo apt-get update
sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy
```
install python package
```
sudo pip install st7789
```
execute using python 2 sample in example folder
```
python scrolling-text.py
```