linux-st7735/README.md

61 lines
2.6 KiB
Markdown
Raw Normal View History

2020-08-02 13:51:47 +00:00
# ST7735 SPI Display Toolkit
Built and tested with OrangePi Zero and ST7735 128x160 v1.1 SPI display.
2021-03-24 12:31:07 +00:00
## Hardware Connections
```
+-------------+-----------+
| LCD pin | OPi GPIO |
+-------------+-----------+
| LED | 17 3.3V |
| SCK / SCLK | 23 SCLK |
| SDA / MOSI | 19 MOSI |
| A0 / D/C | 13 |
| RESET / RST | 15 |
| CS | 24 CE.1 |
| GND | 9 GND |
| VCC | 1 3.3V |
+-------------+-----------+
```
### GPIO Pins Reference
```
$ gpio readall
+------+-----+----------+------+---+ OPi H2 +---+------+----------+-----+------+
| GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO |
+------+-----+----------+------+---+----++----+---+------+----------+-----+------+
| | | 3.3V | | | 1 || 2 | | | 5V | | |
| 12 | 0 | SDA.0 | OFF | 0 | 3 || 4 | | | 5V | | |
| 11 | 1 | SCL.0 | OFF | 0 | 5 || 6 | | | GND | | |
| 6 | 2 | PWM.1 | OFF | 0 | 7 || 8 | 0 | OFF | TXD.1 | 3 | 198 |
| | | GND | | | 9 || 10 | 0 | OFF | RXD.1 | 4 | 199 |
| 1 | 5 | RXD.2 | OFF | 0 | 11 || 12 | 0 | OFF | PA07 | 6 | 7 |
| 0 | 7 | TXD.2 | OUT | 1 | 13 || 14 | | | GND | | |
| 3 | 8 | CTS.2 | OUT | 1 | 15 || 16 | 0 | OFF | SDA.1 | 9 | 19 |
| | | 3.3V | | | 17 || 18 | 0 | OFF | SCK.1 | 10 | 18 |
| 15 | 11 | MOSI.1 | ALT2 | 0 | 19 || 20 | | | GND | | |
| 16 | 12 | MISO.1 | ALT2 | 0 | 21 || 22 | 0 | OFF | RTS.2 | 13 | 2 |
| 14 | 14 | SCLK.1 | ALT2 | 0 | 23 || 24 | 0 | ALT2 | CE.1 | 15 | 13 |
| | | GND | | | 25 || 26 | 0 | OFF | PA10 | 16 | 10 |
+------+-----+----------+------+---+----++----+---+------+----------+-----+------+
| GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO |
+------+-----+----------+------+---+ OPi H2 +---+------+----------+-----+------+
```
## Building
```
meson build
ninja -C build
```
## Running
TODO
2020-08-02 13:51:47 +00:00
## Resources
2021-03-24 13:59:51 +00:00
* [orangepi-xunlong/WiringOP](https://github.com/orangepi-xunlong/WiringOP) - GPIO controlling library compatible with Raspberry Pi's WiringPi
* [dhepper/font8x8](https://github.com/dhepper/font8x8) - 8x8 pixels monospaced font
* [vadzimyatskevich/SSD1306](https://github.com/vadzimyatskevich/SSD1306) - Similar driver for SSD1306 OLED displays
* [michal037/driver-ST7735S](https://github.com/michal037/driver-ST7735S) - ST7735 driver