Author Topic: Controlling a ST7735 TFT Display with an ATtiny85  (Read 8656 times)


  • Newbie
  • *
  • Posts: 30
Controlling a ST7735 TFT Display with an ATtiny85
« on: October 06, 2013, 09:06:24 am »

I took the challenge to control a SPI based TFT display with the ATtiny85 (Digispark). These displays can be controlled with as little as 4 pins and are available for ~5USD on ebay. Therefore they are a nice option to add a data display to a small microcontroller.

The library is written in ANSI-C. But since it is based on Adafruits lib, the changes could theoretically be ported back to create an Arduino-Compatible lib.

You can find a github repository here:

The original readme:
This is a size and speed optimized ANSI-C library to control 1.8" ST7735 TFTs. This library is based on the "china_lcd" library by Tobias Weis, which is in turn based on the Adafruit ST7735 Arduino Library. Compared to the original, the memory requirement has been drastically reduced and the speed has been improved. Allowing it to be used on smaller devices such as the ATtiny85. It includes a speed-optimzed software-SPI implementation that is more than twice as fast as the original implementation. The library compiles to around 2400 bytes with -O1 and 2240 bytes with -Os.
Article by Tobias Weis
Github repository of the Adafruit lib
The library works with my display, which may be a "red" flag one. Modifications are possibly required for other versions.
  Modifications to the original library
  • Removal of all circle functions.
  • Only text size 1 is available.
  • Only ASCII characters 32-128 are available. These are sufficient for normal english text and data display.
  • Removal of bitmap functions. These can be easily implemented in the user program.
  • Added speed optimized software SPI.
  • Colour conversion is now done by macro.
  • Reordered and speed optimized text printing function.
  • Minor size optimizations to all functions.
The example compiles to only 2842 bytes, leaving ample space for additional functionality on the ATTiny85.


  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Controlling a ST7735 TFT Display with an ATtiny85
« Reply #1 on: October 06, 2013, 10:38:30 pm »
This is great - I was playing with trying to get these displays to work early on and gave up (too quickly I'm sure) - thanks for sharing this!