Skip to content
an OS independent library for the neat ST7735S 80x160 IPS 0.96" TFT-Module
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
utils initial commit Feb 17, 2019
LICENSE Initial commit Feb 17, 2019 1.2 Apr 30, 2019
fonts.c implements HVBUFFER Apr 26, 2019
fonts.h implements HVBUFFER Apr 26, 2019
gfx.c implements HVBUFFER Apr 26, 2019
gfx.h implements HVBUFFER Apr 26, 2019
st7735s.h minor Apr 30, 2019
st7735s_compat.c implements HVBUFFER Apr 26, 2019
st7735s_compat.c.arduino minor Mar 3, 2019
st7735s_compat.h 1.2 Apr 30, 2019


an OS independent library for the neat ST7735S 80x160 IPS 0.96" TFT-Module


  • MIT License
  • OS independent
  • Implements: Pixel, fillScreen, Line, Circle, Color, Fonts
  • BDF-Font converter included (
  • super fast with buffered writes
  • great improvement on low mem with HVBUFFER

Adapt this driver to your desired Platform by editng the st7735s_compat.c file. With the adapted file this driver may be used for: Arduino, PIC, ARM, Teensy, Raspberry Pi, compatibles like Banana Pi or Orange Pi and many others (for Big-Endian-Platforms the color setting shuould be modified).

Buffered writes speeds up everything. Implemented are three buffer modes:

  • BUFFER1 - actually no buffered writes, slow, for limited ram.
  • HVBUFFER - one line buffer with WIDTH * 2 bytes size. Acts as for either row or column buffer.
  • BUFFER - full frame WIDTH * HEIGHT * 2 bytes size. very fast.

The HVBUFFER is based on the fact, that due to design of the ST7735 to write a single pixel one need to write 13 bytes on the SPI bus. For two bytes that are adjacent in horizonal or vertical direction one need to write 15 bytes. HVBUFFER stores one pixel and checks if the following pixel is adjacent. Depending on the next pixel HVBUFFER acts like a row or column cache as long as following pixels are adjacent. If the next pixel is not adjacent, the cached pixels are flushed. Therefore the last action needs to be flushBuffer().

However if you use Arduino on Atmega328 compile with -DBUFFER1 to reduce memory usage. Perhaps HVBUFFER will work as well.

This library uses the Terminus Font available at

The display size is bigger than the tagged size of 80x160, mine is 106x161 pixels. You may modify st7735s.h and change WIDTH and HEIGHT to meet your requirements.

In order to use your desired BDF-fonts use the ./tools/ script. The script can only handle fonts with fixed width.

The chars of a font can be limited by defining a range '0-9'.



       \              /
GND    |--------------| GND
       |              |
VCC    |--------------| VCC
       |              |
SCL    |<-------------| SCLK (SPI Clock)
       |              |
SDA    |<-------------| MOSI SPI (Master Out / Slave In)
       |              | 
RES    |<-------------| Reset
       |              |
DC     |<-------------| Data/Command
       |              |
CS     |<-------------| CS (Chip Select)
       |              |
BLK    |<-------------| Backlight (PWM)
       |              |
       /              \
  • Resources

Datasheet: (

You can’t perform that action at this time.