Go to file
2021-03-24 15:31:40 +00:00
demo Add support for 320x240 display 2021-03-24 15:29:48 +00:00
.gitignore Add gitignore 2021-03-24 15:28:49 +00:00
font8x8_basic.h Initial working version 2020-08-01 19:49:42 +00:00
meson.build Demos restructuring. Added term demo. 2020-08-02 21:32:02 +00:00
README.md Update readme with new display 2021-03-24 15:31:40 +00:00
spilcd_font.c Added transparency support 2020-08-02 19:38:10 +00:00
spilcd_font.h Updated font API 2020-08-02 15:57:45 +00:00
spilcd_gfx.c Split into multiple layers 2020-08-02 13:51:47 +00:00
spilcd_gfx.h Split into multiple layers 2020-08-02 13:51:47 +00:00
spilcd.h Add support for 320x240 display 2021-03-24 15:29:48 +00:00
st7735.c Add support for 320x240 display 2021-03-24 15:29:48 +00:00
st7735.h Add support for 320x240 display 2021-03-24 15:29:48 +00:00

ST7735 SPI Display Toolkit

Built and tested with OrangePi Zero (running Armbian) and ST7735 128x160 v1.1 and 240x320 SPI displays.

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

Resources