Topics

Games
Sound & Music
Watches & Clocks
Wireless
GPS
Power Supplies
Computers
Graphics
Lighting
Thermometers
Educational
Wearables
Test Equipment
Tutorials
Libraries
PCB-Based Projects

By processor

AVR ATtiny

ATtiny10
ATtiny2313
ATtiny84
ATtiny841
ATtiny85
ATtiny861
ATtiny88

AVR ATmega

ATmega328
ATmega1284

AVR 0, 1, and 2-series

ATmega1608
ATmega4808
ATmega4809
ATtiny1604
ATtiny1614
ATtiny202
ATtiny3216
ATtiny3224
ATtiny3227
ATtiny402
ATtiny404
ATtiny414
ATtiny814

AVR DA/DB/DD-series

AVR128DA28
AVR128DA32
AVR128DA48
AVR128DB28
AVR128DB48
AVR64DD14
AVR32DD28

ARM

ATSAMD21
RP2040
RA4M1

RISC-V

ESP32-P4

About me

  • About me
  • Twitter
  • Mastodon

Feeds

RSS feed

Universal TFT Display Backpack 2

2nd May 2026

This is an updated version of my Universal TFT Display Backpack, a microcontroller board based on an ATtiny814 that can accommodate a range of different Adafruit and AliExpress colour TFT displays:

TFTBackpack480x320.jpg

The Universal TFT Display Backpack displaying the BarChart example on
an AliExpress 3.5" 480x320 TFT display.

It's ideal as the basis for applications based on my TFT graphic libraries. 

Features

Like the earlier board Universal TFT Display Backpack it has the following features:

  • It supports a range of different Adafruit and AliExpress Colour TFT displays with resolutions from 128x128 up to 480x320; for details see the tables below.
  • The display connection header pin holes are staggered so you can push-fit the display without soldering. This is especially useful if you want to try different displays in an application.
  • It includes an I2C interface, allowing you to connect sensors and other peripherals. For example, you could use this to make a graphical weather station.
  • There is space on the board to fit a 32.768kHz crystal for use as the timer clock source with 1-series or 2-series processors, for use in clock projects.

This updated version has the following additional features:

  • It includes space for an optional MCP9808 I2C temperature sensor, for projects involving temperature measurement.
  • The board includes additional pin holes to accommodate AliExpress displays with an additional SDA-0 pin, and Adafruit displays with an additional TE pin.
  • The board has been enlarged slightly to make room for clearer labelling of the pins.

Microcontroller

The board is compatible with the following microcontrollers in an SOIC14 package:

0-series 1-series * 2-series *
Device Flash RAM Device Flash RAM Device Flash RAM
            ATtiny3224 32KB 3KB
ATtiny1604 16KB 1KB ATtiny1614 16KB 2KB ATtiny1624 16KB 2KB
ATtiny804 8KB 512B ATtiny814 8KB 512B ATtiny824 8KB 1KB
ATtiny404 4KB 256B ATtiny414 4KB 256B ATtiny424 4KB 512B
ATtiny204 2KB 128B ATtiny214 2KB 128B      

* To use the 32.768kHz crystal on the TFT Backpack you need a 1-series or 2-series device; this option is not supported by the 0-series.

For the prototype I used an ATtiny814, shown bold in the table, as this has enough flash memory to run all the examples provided with the Compact TFT and Tiny TFT Graphics Libraries.

Note that the board is not compatible with the AVR-series 14-pin devices such as the AVR16DD14; these have a different pin layout.

Adafruit displays

The Universal TFT Display Backpack is compatible with the following Adafruit displays:

Supplier Size Width Height Voltage Driver Link
Adafruit 1.44" 128 128 3.3 - 5V ST7735R Adafruit 1.44" Color TFT LCD Display
Adafruit 0.96" 160 80 3.3 - 5V ST7735 Adafruit 0.96" 160x80 Color TFT Display
Adafruit 1.14" 240 135 3.3 - 5V ST7789 Adafruit 1.14" 240x135 Color TFT Display
Adafruit 1.28" round 240 240 3.3 - 5V GC9A01A Adafruit 1.28" 240x240 Round TFT Display
Adafruit 1.3" 240 240 3.3 - 5V ST7789 Adafruit 1.3" 240x240 Wide Angle TFT LCD Display
Adafruit 1.54" 240 240 3.3 - 5V ST7789 Adafruit 1.54" 240x240 TFT LCD Display *
Adafruit 1.9" 320 170 3.3 - 5V ST7789 Adafruit 1.9" 320x170 Color IPS TFT Display
Adafruit 1.47" 320 172 3.3 - 5V ST7789 Adafruit 1.47" 320x172 Rounded TFT Display
Adafruit 2.0" 320 240 3.3 - 5V ST7789 Adafruit 2.0" 320x240 Color TFT Display

* The Universal TFT Display Backpack will also accommodate the latest version of the 1.54" 240x240 display which has a 12-way pin header with an additional TE pin.

Use the 11-way row of pins for Adafruit displays. Note that a couple of Adafruit TFT displays have an incompatible pinout; if you're not sure whether your display is compatible check that it has the following 11-way pin header:

BL SDCS D/C RST CS MOSI MISO SCK GND 3V3 VIN

The Adafruit displays all include an LDO 3.3V regulator and logic-level translation, so can be safely interfaced to processors powered from either 5V or 3.3V. They also include an SD-card socket, and a separate SDCS select line for the SD card; you can connect this to PA6 by fitting a 0Ω resistor in position L1 on the board.

TFTBackpack128x128.jpg

The Universal TFT Display Backpack displaying the BarChart example on
an Adafruit 1.44" 128x128 TFT display.

AliExpress displays

The Universal TFT Display Backpack is also compatible with the following displays available from AliExpress and other Chinese suppliers:

Supplier Size Width Height Voltage Driver Link
AliExpress 1.44" 128 128 3.3 - 5V ST7735R 1.44" 128x128 SPI TFT display
AliExpress 0.96" 160 80 3.3V ST7735 TFT Display 0.96 inch 80x160
AliExpress 1.8" 160 128 3.3V ST7735R 1.8" 128x160 SPI TFT Display Blue PCB
AliExpress 1.14" 240 135 3.3V ST7789 1.14in SPI 240x135 RGB TFT display
AliExpress 1.28" round 240 240 3.3V GC9A01 1.28" 240x240 Round TFT Display Octagonal PCB
AliExpress 1.54" 240 240 3.3V ST7789 1.54" 240x240 TFT LCD Display
AliExpress 1.9" 320 170 3.3V ST7789 1.9" 170x320 TFT LCD Display
AliExpress 1.47" 320 172 3.3V ST7789 1.47" 172x320 Rounded TFT LCD Display
AliExpress 2.4" 320 240 3.3V ILI9341 2.4" 320x240 TFT Display Module Blue PCB
AliExpress 2.8" 320 240 3.3V ST7789 2.8" 320x240 TFT Display Module Blue PCB ‡
AliExpress 3.5" 480 320 3.3V ST7796S 3.5" 480x320 TFT Display Module Blue PCB ‡

‡ The Universal TFT Display Backpack will also accommodate these displays that have a 9-way pin header with an additional SDA-0 pin.

Use the 8-way row of pins for AliExpress displays. To ensure that your display is compatible, check that it has the following 8-way pin header:

GND VCC SCL SDA RES DC CS BLK

Some of the AliExpress displays include a LDO 3.3V regulator, but none of them include logic-level translation, so I recommend only interfacing them to a processor running from 3.3V.

Display header pins

The display header pin holes are staggered, with each hole shifted 8 mil (~0.2 mm) off-centre. This allows you to push the display's pin headers in place, and they will stay firmly connected without soldering. To remove them press evenly with a suitable flat object. Of course you also have the option of soldering them if you prefer, for a permanent solution.

Circuit

Here's the circuit of the Universal TFT Display Backpack:

UniversalBackpack2.gif

Circuit of the Universal TFT Display Backpack using an ATtiny414.

If you're using an Adafruit display you can power the backpack from 3.3V to 5V, but if you're using an AliExpress display you should use 3.3V.

The 10kΩ pullup resistor on reset is only needed on AliExpress displays; on the Adafruit displays it's included on the board.

Build options

Crystal

If you are using a 1-series or 2-series ATtiny processor, and you want more accurate timing than provided by the main processor clock, you can fit the crystal and associated capacitors.

To calculate the capacitor values I used the formula C = 2(CL - CS), where CL is the load capacitance 6pF, and CS is the stray capacitance which is usually estimated to be 2.5pF on a PCB. This gives C=7pF. I used the closest available value, 6pF.

Temperature sensor

The board also includes space for an MCP9808 temperature sensor in an MSOP-8 package. This is an I2C digital temperature sensor with a typical accuracy of ±0.25°C over the sensor's -40°C to +125°C range, and a precision of 0.0625°C. If you are not fitting the temperature sensor you can also omit the two 10kΩ pullup resistors on SDA and SCL. The temperature sensor has an I2C address of 0x18.

Spare I/O pins

The two spare I/O spare pins, PA5 and PA6, are taken to the edge connector pins D1 and D2.

The board also includes spaces for four 0Ω resistors to act as links L1 to L4 to select the following functions of these pins:

  • L1 connects PA6 to the SDCS pin for use with Adafruit displays that include an SD card socket.
  • L2 connects PA5 to the display backlight, to allow you to control the backlight from the program. This supports PWM analogue output, so you can vary the brightness of the backlight from the microcontroller with analogWrite().
  • L3 connects PA6 to the TE (Tearing Effect) output pin, available on some Adafruit displays, to synchronise graphics with the display refresh to avoid flicker.
  • Alternatively L4 connects PA5 to the TE (Tearing Effect) output pin. Only fit one of L3 and L4.

For most applications I recommend fitting 0Ω resistors in L1 and L2 only.

Here's the parts list (click to expand):

Parts list
Qty Item Value Size Typical parts
3 SMD resistor 10kΩ 0805 Yageo RC0805JR-0710KL
2 SMD resistor 0805 Yageo RC0805JR-070RL
2 Ceramic capacitor 6pF 0805 Murata GQM2195C2E6R0CB12D
1 Ceramic capacitor 0.1µF 0805 Yageo CC0805KRX7R8BB104
1 Microcontroller ATtiny814 SOIC 14-pin ATTINY814-SSN
1 Temperature sensor MCP9808 MSOP-8 MCP9808T-E/MS
1 Crystal 32.768kHz 3.2 x 1.5mm ABS07-120-32.768kHz-T
1 PCB Double-sided 35.6 x 18.2mm  

Construction

I designed a PCB in Eagle and sent it to PCBWay for production. There's a link at the end of the article you you want to make yourself some boards.

I used a Miniware MHP50-B5 50x50mm hotplate [1] [2] at 235°C with Chip Quik SMD291AX10T3 solder paste to solder the board, but if you don't have a hotplate or hot air gun you should be able to solder the SMD components with a bit of care using a fine-tipped soldering iron and fine solder.

TFTBackpack2.jpg

The assembled Universal TFT Display Backpack board.

Using the TFT Display Backpack

Fitting the display

  • To use the backpack with one of the compatible Adafruit displays push-fit the display pins into the lower row of 12 holes, aligning the VCC pin on the display with the rightmost hole.
  • To use the backpack with one of the compatible AliExpress displays push-fit the display pins into the upper row of 9 holes, aligning the GND pin on the display with the leftmost hole.

Tiny TFT Graphics Library

The Universal TFT Display Backpack is ideal for use with my Tiny TFT Graphics Library 2, which is optimised for use with ATtiny microcontrollers such as the ATtiny814.

To adapt the library to the different pin position of the CS pin on the ATtiny814, edit the assignments at the top of the program to:

// ATtiny402/412 PORTA positions. Change these for the chip you're using
int const dc = 7;
int const mosi = 1;
int const sck = 3;
int const cs = 4;

Compact TFT Graphics Library

You could also use my Compact TFT Graphics Library which uses standard Arduino SPI routines.

Edit the assignments at the top of the program to:

// Arduino pin numbers. Change these for your display connections
int const cs = PIN_PA4; // TFT display SPI chip select pin
int const dc = PIN_PA7; // TFT display data/command select pin

In this case these are Arduino pin numbers, not port positions, so the simplest thing is to use the PIN definitions as above.

Backlight

If you've fitted a 0Ω resistor in position L2 you can use PA5 (Arduino pin 1) to control the display backlight. For example, to dim the backlight to half brightness:

analogWrite(PIN_PA5, 127);

On some AliExpress displays the backlight is off by default, so you won't see anything. To turn the backlight on add the following line in setup():

analogWrite(PIN_PA5, 255);

Crystal and temperature sensor

I'll give some examples of using the crystal and temperature sensor in future projects.

Compiling the graphics library

Compile the program using Spence Konde's megaTiny Core on GitHub. Choose the ATtiny3224/1624/1614/1604/824/814/804/424/414/404/241/204 option under the megaTinyCore heading on the Board menu.

  • Check that the subsequent options are set as follows (ignore any other options):

Chip: "ATtiny814" (or as appropriate)
Clock: "20 MHz internal"

To program the processor the recommended option is to use a 3.3V USB to Serial board, such as the SparkFun FTDI Basic board [3], or a USB to Serial cable [4], connected with a Schottky diode as follows. You can substitute a 4.7kΩ resistor for the Schottky diode:

SerialUPDIProgSchottkyVCC.gif

  • Set the Programmer option to "SerialUPDI (230400 baud)".
  • Upload the program.

Both graphics libraries include a number of example programs that you can use the test the Universal TFT Display Backpack.

Resources

Universal TFT Display Backpack

Get the Eagle files for the PCB here: https://github.com/technoblogy/universal-tft-display-backpack-2.

Or order boards from OSH Park here: Universal TFT Display Backpack 2.

Graphics libraries

Here's the Tiny TFT Graphics Library and examples: Tiny TFT Graphics Library Program.

Here's the Compact TFT Graphics Library and examples: Compact TFT Graphics Library Program.


  1. ^ MHP50-B5 on Adafruit.
  2. ^ MHP50-B5 on AliExpress.
  3. ^ SparkFun FTDI Basic Breakout - 5V on Sparkfun.
  4. ^ FTDI Serial TTL-232 USB Cable on Adafruit.

blog comments powered by Disqus