# 2.8" TFT Touch Shield

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/002/776/medium800/lcds___displays_tftshield.jpg?1396786950)

Spice up your Arduino project with a beautiful large touchscreen display shield with built in microSD card connection. This TFT display is big (2.8" diagonal) bright (4 white-LED backlight) and colorful (18-bit 262,000 different shades)! 240x320 pixels with individual pixel control. It has way more resolution than a black and white 128x64 display. As a bonus, this display has a resistive touchscreen attached to it already, so you can detect finger presses anywhere on the screen.  
  
The shield is fully assembled, tested and ready to go. No wiring, no soldering! Simply plug it in and load up our library - you'll have it running in under 10 minutes!  
  
This display shield has a controller built into it with RAM buffering, so that almost no work is done by the microcontroller. The shield does require a lot of pins: 12 lines total for the display, 13 total if you use the microSD card

![](https://cdn-learn.adafruit.com/assets/assets/000/002/777/medium800/lcds___displays_tftshieldback.jpg?1396786960)

Of course, we wouldn't just leave you with a datasheet and a "good luck!" - [we've written a full open source graphics library that can draw pixels, lines, rectangles, circles and text](https://github.com/adafruit/TFTLCD-Library "Link: https://github.com/adafruit/TFTLCD-Library"). We[also have a touch screen library that detects x, y and z (pressure)](https://github.com/adafruit/Touch-Screen-Library) and example code to demonstrate all of it. The code is written for Arduino but can be easily ported to your favorite microcontroller!  
  
 **[Pick one up today at the Adafruit Shop!](http://www.adafruit.com/products/376 "Link: http://www.adafruit.com/products/376")**  
  
**Specifications:**

- 2.8" diagonal LCD TFT display
- 240x320 resolution, 18-bit (262,000) color
- [ILI9325 (datasheet)](http://www.adafruit.com/datasheets/ILI9325.pdf)&nbsp;or&nbsp;[ILI9328 (datasheet)](http://www.adafruit.com/datasheets/ILI9328.pdf "Link: http://www.adafruit.com/datasheets/ILI9328.pdf")&nbsp;controller with built in video RAM buffer
- 8 bit digital interface, plus 4 control lines
- Uses digital pins 5-13 and analog 0-3. That means you can use digital pins 2, 3 and analog 4 and 5. Pin 12 is available if not using the microSD
- Works with any Arduino '328 or Mega
- 5V compatible! Use with 3.3V or 5V logic
- Onboard 3.3V @ 300mA LDO regulator
- 4 white LED backlight. On by default but you can connect the transistor to a digital pin for backlight control
- 4-wire resistive touchscreen

# 2.8" TFT Touch Shield

## FAQ

### 

Even though the display **driver** supports SPI, we have not found any displays that could use it - the pins are simply not available on the display connector. Also, SPI would be incredibly, frustratingly slow for such a large screen. If you need an SPI display, [check out many of our other offerings, nearly all support SPI-like protocols](http://www.adafruit.com/category/63)!

### 

We suggest using a [protoshield](http://www.adafruit.com/products/51) (with stacking headers) or a [proto-screwshield](http://www.adafruit.com/products/196) to access the unused pins (2, 3, and analog 4 and 5). You can connect various i2c sensors or analog sensors to analog 4&5. You can also connect an i2c port expander to get more I/O pins. If you desperately need more pins, and you're careful, you can use the 8 datapins while the TFT isn't being written to - they are high-z and unused as long as the WR and RD pins are high

# 2.8" TFT Touch Shield

## Connect

![](https://cdn-learn.adafruit.com/assets/assets/000/002/795/medium800/lcds___displays_shieldon_t.jpg?1396787135)

Because the TFT is exactly the same size as an Arduino, we preassemble the shield in the factory. To use, simply place it onto your Arduino. No wiring, no soldering!![](https://cdn-learn.adafruit.com/assets/assets/000/002/796/medium800/lcds___displays_megaTFT_t.jpg?1396787141)

# 2.8" TFT Touch Shield

## LCD Test

We have a library with example code ready to go for use with these TFTs. The library is not incredibly fast and optimized but its a good start and can easily be ported to other micrcontrollers. However, we'll assume you're using an Arduino.  
  
_Two_&nbsp;libraries need to be downloaded and installed: the&nbsp;[TFTLCD library](https://github.com/adafruit/TFTLCD-Library)&nbsp;and the&nbsp;[GFX library.](https://github.com/adafruit/Adafruit-GFX-Library)&nbsp;You can install these libraries through the Arduino library manager.

Open up the Arduino library manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/084/302/medium800/arduino_compatibles_library_manager_menu.png?1573836935)

Search for the&nbsp; **Adafruit GFX&nbsp;** library and install it:

![](https://cdn-learn.adafruit.com/assets/assets/000/084/303/medium800/arduino_compatibles_gfx.png?1573836968)

If using an older Arduino IDE (pre-1.8.10), do the same for&nbsp; **Adafruit\_BusIO** &nbsp;(newer versions do this one automatically).

Then search for the&nbsp; **Adafruit TFTLCD&nbsp;** library and install it:

![](https://cdn-learn.adafruit.com/assets/assets/000/086/810/medium800/arduino_compatibles_tftlcd.png?1578606675)

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use "Link: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use")

Danger: 

```
//comment or uncomment the next line for special pinout! 
#define USE_ADAFRUIT_SHIELD_PINOUT
```

Restart the Arduino software. You should see a new **example** folder called **TFTLCD** and inside, an example called **graphicstest**. Upload that sketch to your Arduino. You should see a collection of graphical tests draw out on the TFT.

![](https://cdn-learn.adafruit.com/assets/assets/000/002/797/medium800/lcds___displays_lines.jpg?1396787150)

# 2.8" TFT Touch Shield

## Adafruit GFX Library

The TFT LCD library is based off of the Adaftui GFX graphics core library. GFX has many ready to go functions that should help you start out with your project. Its not exhaustive and we'll try to update it if we find a really useful function. Right now it supports pixels, lines, rectangles, circles, round-rects, triangles and printing text as well as rotation.  
  
[Check out the GFX tutorial for detailed information about what is supported and how to use it](http://learn.adafruit.com/adafruit-gfx-graphics-library)!

# 2.8" TFT Touch Shield

## Touchscreen Paint Example

The LCD has a 2.8" 4-wire resistive touch screen glued onto it. You can use this for detecing finger-presses, stylus', etc. You'll need 4 pins to talk to the touch panel **but** we **reuse** some of the pins for the TFT LCD! This is because the resistance of the panel is high enough that it doesn't interfere with the digital input/output and we can query the panel in between TFT accesses, when the pins are not being used.

This tutorial requires the installation of the **Adafruit Touchscreen&nbsp;** library. This library is available for installation on the Arduino library manager.

Open up the Arduino library manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/084/320/medium800/arduino_compatibles_library_manager_menu.png?1573837892)

Search for the&nbsp; **Adafruit Touchscreen&nbsp;** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/084/321/medium800/arduino_compatibles_touchscreen.png?1573837914)

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use "Link: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use")

# Example

We connect the 4 pins as follows:

&nbsp;

- Y+ is connected to Analog 1
- Y- is connected to Digital 7
- X+ is connected to Digital 6
- X- is connected to Analog 2

Now start up the **tftpaint\_shield** example in the TFTLCD library. The right hand side will have 'color boxes' you can press to select which color you want to draw with. If you press the area to the **left** where the screen ends, it will erase the screen.

Danger: 

![](https://cdn-learn.adafruit.com/assets/assets/000/002/798/medium800/lcds___displays_tftshield.jpg?1396787159)

# 2.8" TFT Touch Shield

## Bitmaps

There is a built in microSD card slot into the shield, and we can use that to load bitmap images! You will need a microSD card formatted **&nbsp;FAT16 or FAT32** &nbsp;(they almost always are by default).

It's really easy to draw bitmaps. We have a library for it, Adafruit\_ImageReader, which can be installed through the Arduino Library Manager&nbsp;(Sketch→Include Library→Manage Libraries…). Enter “imageread” in the search field and the library is easy to spot:

![](https://cdn-learn.adafruit.com/assets/assets/000/078/319/medium800/arduino_compatibles_ImageReader.png?1563399763)

Download this tiger bitmap and save it to the microSD card! (Image by [Shane Gorski](http://www.flickr.com/photos/shanegorski/2515009456/in/photostream/))

[Download tiger.bmp](http://learn.adafruit.com/system/assets/assets/000/010/147/original/tiger.bmp)
Copy **tiger.bmp** into the base directory of a microSD card and insert it into the microSD socket on the underside of the shield.

Now start up the IDE and open the&nbsp; **File→examples→Adafruit ImageReader Library→ShieldILI9341** &nbsp;example.

In the example, find the following section of code:

```
  // Load full-screen BMP file 'purple.bmp' at position (0,0) (top left).
  // Notice the 'reader' object performs this, with 'tft' as an argument.
  Serial.print(F("Loading purple.bmp to screen..."));
  stat = reader.drawBMP("/purple.bmp", tft, 0, 0);
  reader.printStatus(stat);   // How'd we do?
```

On the line with&nbsp;`reader.drawBMP()`&nbsp;change&nbsp;`"/purple.bmp"`&nbsp;to&nbsp;`"/tiger.bmp"`.

After that, upload it to your Arduino. When the Arduino restarts, you should see the tiger appear as below!

![](https://cdn-learn.adafruit.com/assets/assets/000/002/799/medium800/lcds___displays_tftshieldtiger.jpg?1396787169)

To make new bitmaps, make sure they are less than 240 by 320 pixels and save them in **24-bit BMP format**! They must be in 24-bit format, even if they are not 24-bit color as that is the easiest format for the Arduino. You can rotate images using the **setRotation()** procedure.

# 2.8" TFT Touch Shield

## Controlling the Backlight

By default, we assume you'll want the backlight on all the time. However, you may want to PWM control or otherwise turn off the LED backlight to save power. You can do this with a simple hack. On the back, look for the two **backlight** jumpers. Cut the trace between the **VCC** jumper using a sharp knife and then solder the jumper labeled **Pin 3**. Then you can use Digital 3 to control the backlight.

![](https://cdn-learn.adafruit.com/assets/assets/000/002/800/medium800/lcds___displays_tftshieldback.jpg?1396787179)

# 2.8" TFT Touch Shield

## Downloads

- [Eagle files & Schematics](https://github.com/adafruit/TFTshield "Link: https://github.com/adafruit/TFTshield")
- [Touch screen library](https://github.com/adafruit/Touch-Screen-Library)
- [TFT LCD library](https://github.com/adafruit/TFTLCD-Library)
- [GFX library](https://github.com/adafruit/Adafruit-GFX-Library)
- [Latest SD card library](https://github.com/adafruit/SD "Link: https://github.com/adafruit/SD")

For files on github, download by clicking the **Downloads** button in the top right only!

# 2.8" TFT Touch Shield

## Support Forums


## Featured Products

### Adafruit METRO 328 Fully Assembled - Arduino IDE compatible

[Adafruit METRO 328 Fully Assembled - Arduino IDE compatible](https://www.adafruit.com/product/50)
We sure love the ATmega328 here at Adafruit, and we use them&nbsp;_a lot_&nbsp;for our own projects. The processor has plenty of GPIO, Analog inputs, hardware UART SPI and I2C, timers and PWM galore - just enough for most simple projects. When we need to go small, we use a <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/50)
[Related Guides to the Product](https://learn.adafruit.com/products/50/guides)

## Related Guides

- [WiFi Controlled Mobile Robot](https://learn.adafruit.com/wifi-controlled-mobile-robot.md)
- [Skill Badge Requirements: Microcontrollers](https://learn.adafruit.com/skill-badge-requirements-microcontrollers.md)
- [Photocells](https://learn.adafruit.com/photocells.md)
- [Collin's Lab: MIDI](https://learn.adafruit.com/collins-lab-midi.md)
- [Halloween Pumpkin](https://learn.adafruit.com/halloween-pumpkin.md)
- [Arduino Lesson 4. Eight LEDs and a Shift Register](https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds.md)
- [IR Sensor](https://learn.adafruit.com/ir-sensor.md)
- [Low Power WiFi Datalogger](https://learn.adafruit.com/low-power-wifi-datalogging.md)
- [Adafruit Motor Shield](https://learn.adafruit.com/adafruit-motor-shield.md)
- [Arduino Lesson 3. RGB LEDs](https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds.md)
- [Arduino Prototyping Mounting Plate](https://learn.adafruit.com/arduino-prototyping-mounting-plate.md)
- [Current Limiting Stepper Driver with DRV8871](https://learn.adafruit.com/current-limiting-stepper-driver-with-drv8871.md)
- [NeoPixel Painter](https://learn.adafruit.com/neopixel-painter.md)
- [Arduino Lesson 7. Make an RGB LED Fader](https://learn.adafruit.com/adafruit-arduino-lesson-7-make-an-rgb-led-fader.md)
- [TMP36 Temperature Sensor](https://learn.adafruit.com/tmp36-temperature-sensor.md)
