# Adafruit 1.9" Color IPS TFT Display

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/110/172/medium800thumb/adafruit_products_5394-10.jpg?1648225799)

This lovely little display breakout is the best way to add a small, colorful, and very bright display to any project. Since the display uses 4-wire SPI to communicate and has its own pixel-addressable frame buffer, it can be used with every kind of microcontroller. Even a very small one with low memory and only a few pins available! The 1.9" display has 320x170 16-bit full-color pixels and is an **IPS** display, so the color looks great up to 80 degrees off-axis in any direction. The TFT driver (ST7789) is very similar to the popular ST7735, and the Adafruit Arduino library supports it well.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/643/medium800/adafruit_products_1.9_TFT_back_EYESPI_connector.jpg?1674601572)

This display comes with an EYESPI connector! This 18-pin 0.5mm pitch FPC connector has a flip-top connector for using a flex cable to hook up your display. It enables you to avoid soldering and get your display up off of the breadboard! Consider it a sort of "STEMMA QT for displays" - a way to quickly connect and extend display wiring that uses a lot of SPI pins. It also allows for communicating with displays over longer distances. The [EYESPI flex cables](https://www.adafruit.com/?q=eyespi+cable&sort=BestMatch) are available in multiple lengths to suit any project. This is especially useful for projects where you want your display mounted separate from your microcontroller.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/174/medium800/adafruit_products_5394-04.jpeg?1648225934)

The breakout has the TFT display soldered on (it uses a delicate flex-circuit connector) as well as an ultra-low-dropout 3.3V regulator, auto-reset circuitry, and a 3/5V level shifter, so you can use it with 3.3V or 5V power and logic. We also had a little extra space, so we placed a microSD card holder, so you can easily load full color bitmaps from a FAT16/FAT32 formatted microSD card. The microSD card is not included, [but you can pick one up here](https://www.adafruit.com/product/5251).

![](https://cdn-learn.adafruit.com/assets/assets/000/110/177/medium800/adafruit_products_5394-03.jpeg?1648225962)

Of course, we wouldn't just leave you with a datasheet and a "good luck!" -&nbsp;[we've written a full open-source graphics Arduino library that can draw pixels, lines, rectangles, circles, text, and bitmaps as well as example code](https://github.com/adafruit/Adafruit-ST7735-Library). The code is written for Arduino but can be easily ported to your favorite microcontroller! Wiring is easy, we strongly encourage using the hardware SPI pins of your Arduino as software SPI is noticeably slower when dealing with this size display.&nbsp;[For Raspberry Pi or other Single Board Computer Python users, we have a user-space Pillow-compatible library](https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display). For&nbsp;[CircuitPython there's a displayio driver for native support](https://github.com/adafruit/Adafruit_CircuitPython_ST7789).

![](https://cdn-learn.adafruit.com/assets/assets/000/110/178/medium800/adafruit_products_5394-00.jpeg?1648225993)

This display breakout also features an 18-pin "EYE SPI" standard FPC connector with flip-top connector. You can use an 18-pin 0.5mm pitch FPC cable to connect to all the GPIO pins, for when you want to skip the soldering.

**Please note!&nbsp;** This display was designed originally for smartwatches and similar, where there's glass over the screen. Without something gently holding the screen down, the backlight can eventually peel away from the TFT. (It's not destructive but it may be unattractive) You can prevent this by, ideally, adding a plastic or glass cover/overlay. If using it without a glass covering, try dabbing a touch of E6000 or similar craft glue on the thin side edges, or using a thin piece of tape to keep the front TFT attached to the backlight.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/181/medium800/adafruit_products_5394-07.jpeg?1648226027)

# Adafruit 1.9" Color IPS TFT Display

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/110/254/medium800/adafruit_products_Split.jpg?1648482104)

## EYESPI

This display comes with an EYESPI connector, which is an 18pin 0.5mm pitch connector that allows you to use a flex cable to connect your display to your microcontroller. For more details, visit the [EYESPI page](https://learn.adafruit.com/adafruit-1-9-color-ips-tft-display/eyespi), or see below for basic pin info.

## Power Pins

- **V+ / VIN** - This is the power pin. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 3V microcontroller like a Feather M4, use 3V, or for a 5V microcontroller like Arduino, use 5V.
- **3V / 3Vo** - This is the output from the onboard 3.3V regulator. If you have a need for a clean 3.3V output, you can use this! It can provide at least 100mA output.
- **G / Gnd** - This is common ground for power and logic.

## SPI Pins

- **CK / SCK** - this is the **S** PI **C** loc **k** pin. Use 3-5V logic level.
- **SI / MOSI** - this is the **S** erial **Da** ta In / **M** icrocontroller **O** ut **S** ensor **I** n pin. It is used to send data from the microcontroller to the SD card and/or TFT. Use 3-5V logic level
- **SO / MISO** - this is the **S** erial **D** ata **O** ut / **M** icrocontroller **I** n **S** ensor **O** ut pin. It is used for the SD card. It isn't used for the TFT display which is write-only. It is 3.3V logic out (but can be read by 5V logic)
- **TC / TFTCS** - this is the&nbsp; **TFT**  **C** hip **S** elect pin. Use 3-5V logic level

## Other Pins

- **RT / RST** - This is the TFT reset pin. Connect to ground to reset the TFT! It's best to have this pin controlled by the library so the display is reset cleanly, but you can also connect it to the microcontroller Reset pin, which works for most cases. There is an automatic-reset chip connected so it will reset on power-up. Use 3-5V logic level
- **DC** - This is the TFT SPI data or command selector pin. Use 3-5V logic level
- **CC / SDCS** - This is the SD card chip select pin, used if you want to read from the SD card. Use 3-5V logic level
- **BL / Lite** - This is the PWM input for the backlight control. It is by default pulled high (backlight on) you can PWM at any frequency or pull down to turn the backlight off. Use 3-5V logic level

## EYE SPI 18-pin FPC Connector

1. VIN (3 to 5V DC power)
2. Backlight (3~5V logic, PWM optional input)
3. Ground
4. SPI Clock (3~5V logic in)
5. SPI MOSI (3~5V logic Microcontroller Out, Screen/SD In)
6. SPI MISO (3~5V logic Microcontroller In, Screen/SD Out)
7. TFT Data/Command (3~5V logic in)
8. TFT Reset (optional 3~5V logic in)
9. TFT SPI Chip Select (3~5V logic in)
10. SD Card SPI Chip Select (3~5V logic in)
11. Unused
12. Unused
13. Unused
14. Unused
15. Unused
16. Unused
17. Unused
18. Unused

# Adafruit 1.9" Color IPS TFT Display

## EYESPI

![](https://cdn-learn.adafruit.com/assets/assets/000/117/644/medium800/adafruit_products_1.9_TFT_back_EYESPI_connector.jpg?1674601633)

This display now comes with an **EYESPI connector**. This connector allows you to connect your display without soldering. There are [EYESPI cables](https://www.adafruit.com/?q=eyespi+cable&sort=BestMatch) available in multiple lengths, which means you can find one to fit any project. This is especially useful if your project requires the display to be freestanding, and not tied directly into a breadboard. Inspired by the popularity of STEMMA QT, it provides plug-n-play for displays!

## The EYESPI Connector and Cables

The EYESPI connector is an 18 pin 0.5mm pitch FPC connector with a flip-top tab for locking in the associated flex cable. It is designed to allow you to connect a display, without needing to solder headers or wires to the display.

The EYESPI connector location on this display is indicated below.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/645/medium800/adafruit_products_1.9_TFT_back_EYESPI_connector_location.jpg?1674601671)

The EYESPI cables are 18 pin 0.5mm pitch flex cables. They are ~9.6mm wide, and designed to fit perfectly into the EYESPI connector. Adafruit currently offers EYESPI cables in three different lengths: [50mm](https://www.adafruit.com/product/5462), [100mm](https://www.adafruit.com/product/5239), and [200mm](https://www.adafruit.com/product/5240).

Warning: 

## Wiring Your EYESPI Display

Wiring your EYESPI display to a microcontroller via the EYESPI connector requires the EYESPI breakout board and an EYESPI cable.

### Adafruit EYESPI Breakout Board - 18 Pin FPC Connector

[Adafruit EYESPI Breakout Board - 18 Pin FPC Connector](https://www.adafruit.com/product/5613)
Our most recent [display breakouts have come with a new feature:&nbsp;an 18-pin "EYE SPI" standard FPC connector with flip-top connector](https://www.adafruit.com/?q=eyespi&sort=BestMatch). This is intended to be a sort-of "<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5613)
[Related Guides to the Product](https://learn.adafruit.com/products/5613/guides)
![Overhead video of a 1.9" TFT display connected via 18-pin FPC ribbon cable to a square-shaped microcontroller on a breadboard. The TFT plays an animated boot-up demo.](https://cdn-shop.adafruit.com/product-videos/640x480/5613-06.jpg)

### EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type

[EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type](https://www.adafruit.com/product/5239)
Connect this to that when a 18-pin FPC connector is needed. This 25 cm long cable is made of a flexible PCB. It's A-B style which means that pin one on one side will match with pin one on the other side. How handy!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5239)
[Related Guides to the Product](https://learn.adafruit.com/products/5239/guides)
![Angled shot of a EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type. ](https://cdn-shop.adafruit.com/640x480/5239-00.jpg)

The following example shows how to connect the 1.9" Color IPS TFT Display to a Feather RP2040 using the EYESPI breakout board.

Connect the following Feather pins to the associated EYESPI breakout pins:

- **breakout Vin** to **Feather 3.3V (red wire)**
- **breakout Gnd** to **Feather GND (black wire)**  
- **breakout SCK** to&nbsp; **Feather** **SCK (grey wire)**
- **breakout MOSI** to&nbsp; **Feather** **MO (purple wire)**  
- **breakout TCS** to **Feather D5 (blue wire)**
- **breakout DC** to **Feather D6 (orange wire)**
- **breakout RST** to **Feather D9 (cyan wire)**
- **breakout SDCS** to **Feather D10 (pink wire)**

![adafruit_products_1.9_TFT_EYESPI_wiring_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/117/726/medium640/adafruit_products_1.9_TFT_EYESPI_wiring_bb.jpg?1674855101)

Finally, connect your **display EYESPI connector** to the **breakout EYESPI connector** using an **EYESPI cable**. For details on using the EYESPI connector properly, visit [Plugging in an EYESPI Cable](https://learn.adafruit.com/adafruit-eyespi-breakout-board/plugging-in-an-eyespi-cable).

## EYESPI Pins

Though there are 18 pins available on the EYESPI connector, many displays do not use all available pins. This display requires the following pins:

- **Vin** - This is the power pin. To power the board (and thus your display), connect to the same power as the logic level of your microcontroller, e.g. for a 3V micro like a Feather, use 3V, and for a 5V micro like an Arduino, use 5V.&nbsp;
- **Gnd** - This is common ground for power and logic.
- **MOSI** - This is the SPI MOSI ( **M** icrocontroller **O** ut / **S** erial **I** n) pin. It is used to send data from the microcontroller to the SD card and/or display.&nbsp;
- **SCK** - This is the SPI clock input pin.
- **TCS** - This is the TFT or eInk SPI chip select pin.
- **RST** - This is the display reset pin. Connecting to ground resets the display! It's best to have this pin controlled by the library so the display is reset cleanly, but you can also connect it to the microcontroller's Reset pin, which works for most cases. Often, there is an automatic-reset chip on the display which will reset it on power-up, making this connection unnecessary in that case.
- **DC** - This is the display SPI data/command selector pin.
- **SDCS** - This is the SD card chip select pin. This pin is required for communicating with the SD card holder onboard the connected display.

# Adafruit 1.9" Color IPS TFT Display

## Plugging in an EYESPI Cable

![](https://cdn-learn.adafruit.com/assets/assets/000/116/975/medium800/adafruit_products_edited_P1390328.jpg?1670356850)

You can connect an EYESPI compatible display to the EYESPI breakout board using an EYESPI cable. An EYESPI cable is an 18 pin flexible PCB (FPC). The FPC can only be connected properly in one orientation, so be sure to follow the steps below to ensure that your display and breakout are plugged in properly.

Each EYESPI cable has **blue stripes** on either end. On the other side of the cable, underneath the blue stripe, are the connector pins that make contact with the FPC connector pins on the display or breakout.

![adafruit_products_cableStripe.gif](https://cdn-learn.adafruit.com/assets/assets/000/116/970/medium640thumb/adafruit_products_cableStripe.jpg?1670356463)

To begin inserting an EYESPI cable to an FPC connector, gently lift the FPC connector black latch up.&nbsp;

![adafruit_products_liftLatch.gif](https://cdn-learn.adafruit.com/assets/assets/000/116/971/medium640thumb/adafruit_products_liftLatch.jpg?1670356608)

Then, insert the EYESPI cable into the open FPC connector by sliding the cable into the connector. You want to **see the blue stripe facing up towards you**. This inserts the cable pins into the FPC connector.

![adafruit_products_insertCable.gif](https://cdn-learn.adafruit.com/assets/assets/000/116/972/medium640thumb/adafruit_products_insertCable.jpg?1670356741)

To secure the cable, lower the FPC connector latch onto the EYESPI cable.

![adafruit_products_lowerLatch.gif](https://cdn-learn.adafruit.com/assets/assets/000/116/973/medium640thumb/adafruit_products_lowerLatch.jpg?1670356793)

Repeat this process for the FPC connector on your display. Again, ensure that the **blue stripe** on either end of the cable is facing up.

![adafruit_products_edited_P1390333.jpg](https://cdn-learn.adafruit.com/assets/assets/000/116/974/medium640/adafruit_products_edited_P1390333.jpg?1670356806)

# Adafruit 1.9" Color IPS TFT Display

## Arduino Wiring & Test

![](https://cdn-learn.adafruit.com/assets/assets/000/110/173/medium800thumb/adafruit_products_5394-11.jpg?1648225856)

# Basic Graphics Test Wiring

Wiring up the display in SPI mode is pretty easy as there's not that many pins! This is using hardware SPI, but you can also use software SPI (any pins) later. Start by connecting the power pins

- **3-5V Vin** or **V+** connects to the microcontroller **5V** pin
- **Gnd** &nbsp;or **G&nbsp;** connects to Arduino ground
- **SCK** &nbsp;or **CK** connects to SPI clock. On Arduino Uno/Duemilanove/328-based, that's **Digital 13**. On Mega, it's **Digital 52** and on other boards it's **ICSP-3** ([See SPI Connections for more details](http://arduino.cc/en/Reference/SPI))
- **MISO** or **SO** is not connected
- **MOSI** or **SI** connects to SPI MOSI. On Arduino Uno/Duemilanove/328-based, that's **Digital 11**. On Mega, it's **Digital 51** and on other boards it's **ICSP-4** ([See SPI Connections for more details](http://arduino.cc/en/Reference/SPI "Link: http://arduino.cc/en/Reference/SPI"))
- **TCS** &nbsp;or **TC** connects to the SPI Chip Select pin. This uses **Digital 10** but you can later change this to any pin.
- **RST** &nbsp;or **RT** connects to the Display Reset pin. This uses **Digital 9** but you can later change this pin too.
- **DC** connects to our SPI data/command select pin. We'll be using **Digital 8** but you can later change this pin too.

For the built-in level shifter, the board uses a [CD74HC4050](http://www.ti.com/product/cd74hc4050?keyMatch=CD74HC4050&tisearch=Search-EN-Everything) chip, which has a typical propagation delay of ~10ns

![](https://cdn-learn.adafruit.com/assets/assets/000/110/231/medium800/adafruit_products_1.9_Wiring_and_Test_bb.jpg?1648253336)

# Install Arduino Libraries

Adafruit has example code ready to go for use with these TFTs. It's written for Arduino, which should be portable to any microcontroller by adapting the C++ source.

_Five_ libraries need to be installed using the **Arduino Library Manager** …this is the preferred and modern way. From the Arduino “Sketch” menu, select “Include Library” then “Manage Libraries…”

![](https://cdn-learn.adafruit.com/assets/assets/000/079/139/medium800/adafruit_products_arduino_compatibles_manage-libraries.png?1565122046)

Type “7789” in the search field to quickly find the first library — **Adafruit ST7735 and ST7789 Library** :

![](https://cdn-learn.adafruit.com/assets/assets/000/104/415/medium800/circuitpython_ST7789_Arduino_Lib.png?1631126475)

Arduino should ask you about installing dependencies. Be sure to chose "Install all".

![](https://cdn-learn.adafruit.com/assets/assets/000/104/416/medium800/circuitpython_Arduino_Dependencies.png?1631126702)

Repeat the search and install steps for the remaining libraries, looking for **Adafruit Zero DMA** , **&nbsp;Adafruit SPIFlash** , and **SdFat - Adafruit Fork**.

After restarting the Arduino software, you should see a new **example** folder called **Adafruit ST7735 and ST7789 Library,&nbsp;** and inside, an example called **graphicstest\_st7789**.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/136/medium800/st7789_arduino_wiring___test_Screen_Shot_2022-03-24_at_10.26.46_AM.png?1648143114)

Since this example is written for several displays, there is just one change needed in order to use it with the this display.

You just need to set the correct initialization sequence. In the **graphicstest\_st7789** source code, look for the lines as follows:

```cpp
// Use this initializer (uncomment) if using a 1.3" or 1.54" 240x240 TFT:
tft.init(240, 240);           // Init ST7789 240x240

// OR use this initializer (uncomment) if using a 1.69" 280x240 TFT:
//tft.init(240, 280);           // Init ST7789 280x240

// OR use this initializer (uncomment) if using a 2.0" 320x240 TFT:
//tft.init(240, 320);           // Init ST7789 320x240

// OR use this initializer (uncomment) if using a 1.14" 240x135 TFT:
//tft.init(135, 240);           // Init ST7789 240x135
  
// OR use this initializer (uncomment) if using a 1.47" 172x320 TFT:
//tft.init(172, 320);           // Init ST7789 172x320

// OR use this initializer (uncomment) if using a 1.9" 170x320 TFT:
//tft.init(170, 320);           // Init ST7789 170x320
```

Comment out the first line, and uncomment the line that corresponds to this display, so it looks like:

```auto
// Use this initializer (uncomment) if using a 1.3" or 1.54" 240x240 TFT:
//tft.init(240, 240);           // Init ST7789 240x240

// OR use this initializer (uncomment) if using a 1.69" 280x240 TFT:
//tft.init(240, 280);           // Init ST7789 280x240

// OR use this initializer (uncomment) if using a 2.0" 320x240 TFT:
//tft.init(240, 320);           // Init ST7789 320x240

// OR use this initializer (uncomment) if using a 1.14" 240x135 TFT:
//tft.init(135, 240);           // Init ST7789 240x135
  
// OR use this initializer (uncomment) if using a 1.47" 172x320 TFT:
//tft.init(172, 320);           // Init ST7789 172x320

// OR use this initializer (uncomment) if using a 1.9" 170x320 TFT:
tft.init(170, 320);           // Init ST7789 170x320
```

Now upload the sketch to your Arduino. You may need to press the Reset button to reset the arduino and TFT. You should see a collection of graphical tests draw out on the TFT.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/232/medium800thumb/adafruit_products_5394-11.jpg?1648253372)

# Changing Pins

Now that you have it working, there's a few things you can do to change around the pins.

If you're using Hardware SPI, the CLOCK and MOSI pins are 'fixed' and can't be changed. But you can change to software SPI, which is a bit slower, and that lets you pick any pins you like. Find these lines:

```auto
// OPTION 1 (recommended) is to use the HARDWARE SPI pins, which are unique
// to each board and not reassignable. For Arduino Uno: MOSI = pin 11 and
// SCLK = pin 13. This is the fastest mode of operation and is required if
// using the breakout board's microSD card.

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

// OPTION 2 lets you interface the display using ANY TWO or THREE PINS,
// tradeoff being that performance is not as fast as hardware SPI above.
//#define TFT_MOSI 11  // Data out
//#define TFT_SCLK 13  // Clock out

//Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
```

Comment out option 1, and uncomment option 2. Then you can change the pin names that begin with **TFT\_** to whatever pins you'd like!

The 7789-based TFT displays have an auto-reset circuit on it, so you probably don't need to use the **RST&nbsp;** pin. You can change

`#define TFT_RST    9`

to

`#define TFT_RST   -1`

so that pin isn't used either. Or connect it up for manual TFT resetting!

# Adafruit 1.9" Color IPS TFT Display

## Adafruit GFX library

![](https://cdn-learn.adafruit.com/assets/assets/000/019/543/medium800/adafruit_products_128x128_top_display_07_ORIG.jpg?1409937908)

The Adafruit\_GFX library for Arduino provides a common syntax and set of graphics functions for all of our TFT, LCD and OLED displays. This allows Arduino sketches to easily be adapted between display types with minimal fuss…and any new features, performance improvements and bug fixes will immediately apply across our complete offering of color displays.  
  
The GFX library is what lets you draw points, lines, rectangles, round-rects, triangles, text, etc.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/544/medium800/adafruit_products_128x128_top_display_08_ORIG.jpg?1409937941)

Check out our detailed tutorial here [http://learn.adafruit.com/adafruit-gfx-graphics-library](http://learn.adafruit.com/adafruit-gfx-graphics-library) It covers the latest and greatest of the GFX library!

# Adafruit 1.9" Color IPS TFT Display

## Drawing Bitmaps

There is a built-in microSD card slot into the breakout, and that may be used to load bitmap images! You will need a microSD card formatted **FAT16 or FAT32** (they almost always are by default).  
  
It's really easy to draw bitmaps! Start by downloading this image of ADABOT

![adabot.bmp](https://github.com/adafruit/Adafruit_ImageReader/raw/master/images/adabot320x170.bmp)

Rename the image to **adabot**. **bmp**.

You will want to download and 2 more images as well. Download and save the image below as **miniwoof.bmp**.

![miniwoof.bmp](https://github.com/adafruit/Adafruit_ImageReader/raw/master/images/miniwoof.bmp)

Download and save the image below as **wales.bmp**.

![wales.bmp](https://github.com/adafruit/Adafruit_ImageReader/raw/master/images/wales.bmp)

Copy all 3 images into the base directory of a microSD card and insert it into the microSD socket in the breakout. The contents of your SD card should look like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/110/031/medium800/st7789_drawing_bitmaps_Screen_Shot_2022-03-22_at_3.49.52_PM.png?1647989415)

Two more wires are required to interface with the onboard SD card:

- You'll need to connect up the **SO** pin to the SPI MISO line on your microcontroller. On Arduino Uno/Duemilanove/328-based, that's **Digital 12**. On a Mega, it's **Digital 50** and on Leonardo/Due it's **ICSP-1** ([See SPI Connections for more details](http://arduino.cc/en/Reference/SPI))
- Also, the **CCS** &nbsp;or **CC** pin to **Digital 4** on your Arduino as well. You can change this pin later, but stick with this for now.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/230/medium800/adafruit_products_1.9_Drawing_Bitmaps_bb.jpg?1648253312)

You may want to try the **SD library** examples before continuing, especially one that lists all the files on the SD card

Open the&nbsp; **File→examples→Adafruit ImageReader Library→**** BreakoutST7789 - 320x170**&nbsp;example:

![](https://cdn-learn.adafruit.com/assets/assets/000/110/305/medium800/adafruit_products_Screen_Shot_2022-03-25_at_10.42.29_AM.png?1648502982)

Now upload the&nbsp;example sketch to the Arduino. You should see ADABOT appear! If you have any problems, check the serial console for any messages such as not being able to initialize the microSD card or not finding the image.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/228/medium800/adafruit_products_IMG_4035.jpeg?1648252588)

To make new bitmaps, make sure they are no bigger than the display size in 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  
  
You can draw as many images as you want - don't forget the names must be less than 8 characters long. Just copy the BMP drawing routines below `loop()` and call

> `bmpDraw(bmpfilename, x, y); `

For each bitmap.

They can be smaller than&nbsp; **320x170** &nbsp;and placed in any location on the screen.

# Adafruit 1.9" Color IPS TFT Display

## CircuitPython Usage

You will need a board capable of running CircuitPython, such as the Adafruit Metro M4 Express. You can also use boards such as the Adafruit Feather M4 Express. Adafruit recommends using at least an M4 processor because they are much faster and works better for driving a display.

This guide will be using a Feather M4 Express. The steps should be about the same for the Metro. If you haven't already, be sure to check out the [Feather M4 Express](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51/assembly)&nbsp;guide.

### Adafruit Feather M4 Express - Featuring ATSAMD51

[Adafruit Feather M4 Express - Featuring ATSAMD51](https://www.adafruit.com/product/3857)
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the **ATSAMD51J19** -&nbsp; with...

In Stock
[Buy Now](https://www.adafruit.com/product/3857)
[Related Guides to the Product](https://learn.adafruit.com/products/3857/guides)
![Angled shot of a Adafruit Feather M4 Express. ](https://cdn-shop.adafruit.com/640x480/3857-10.jpg)

## Preparing the Breakout

Before using the TFT Breakout, you will need to solder the headers or some wires to it. Be sure to check out the&nbsp;[Adafruit Guide To Excellent Soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering).&nbsp;After that the breakout should be ready to go.

## Feather Wiring
- **Vin** &nbsp;connects to the Feather's&nbsp; **3V** &nbsp;pin
- **GND** &nbsp;connects to the Feather's&nbsp; **Gnd** &nbsp;pin
- **CLK** &nbsp;connects to SPI clock. On the Feather, that's&nbsp; **SCK**
- **MOSI** &nbsp;connects to SPI MOSI. On the Feather, that's also&nbsp; **MO**
- **CS** connects to the SPI Chip Select pin. Here use **D5.**
- **RST** connects to the Reset pin. Here use **D9**.
- **DC** connects to the SPI Chip Select pin. Here use **D6**.

![adafruit_products_1.9_CircuitPython_Feather_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/234/medium640/adafruit_products_1.9_CircuitPython_Feather_bb.jpg?1648253750)

## Metro M4 Wiring
- **Vin** &nbsp;connects to the Metro's&nbsp; **5**** V **&nbsp;or&nbsp;** 3.3**&nbsp;pin.
- **GND** &nbsp;connects to any one of the Metro's&nbsp; **Gnd** &nbsp;pins.
- **CLK** &nbsp;connects to SPI clock. On the Metro, that's&nbsp; **Pin 3** &nbsp;on the ICSP Header.
- **MOSI** &nbsp;connects to SPI MOSI. On the Metro, that's&nbsp; **Pin 4** &nbsp;on the ISCP Header.
- **CS** connects to the SPI Chip Select pin. Here use **D5.**
- **RST** connects to the Reset pin. Here use **D9**.
- **DC** connects to the SPI Chip Select pin. Here use **D6**.

![adafruit_products_1.9_CircuitPython_Metro_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/233/medium640/adafruit_products_1.9_CircuitPython_Metro_bb.jpg?1648253556)

## CircuitPython Library Installation

First, make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next you'll need to install the&nbsp;[Adafruit CircuitPython ST7789](https://github.com/adafruit/Adafruit_CircuitPython_ST7789)&nbsp;library on your CircuitPython board.&nbsp;&nbsp;

Click the&nbsp; **Download Project Bundle** &nbsp;button below to download the necessary libraries and the&nbsp; **code.py** &nbsp;file in a zip file. Extract the contents of the zip file, open the folder that matches your CircuitPython version, and copy the&nbsp; **entire&nbsp;**** lib **&nbsp;** folder **&nbsp;and the&nbsp;** code.py **&nbsp;file to your&nbsp;** CIRCUITPY**&nbsp;drive.

https://github.com/adafruit/Adafruit_CircuitPython_ST7789/blob/main/examples/st7789_170x320_1.9_simpletest.py

## Run the Script

Once everything is wired up correctly and the files are all copied over, the script should automatically run. If not, try pressing the reset button and you should see the following on the display:

![](https://cdn-learn.adafruit.com/assets/assets/000/110/229/medium800/adafruit_products_IMG_4037.jpeg?1648252614)

# Adafruit 1.9" Color IPS TFT Display

## Python Usage

It's easy to use display breakouts with Python and the&nbsp;[Adafruit Blinka Displayio](https://github.com/adafruit/Adafruit_Blinka_Displayio)&nbsp;module. This module allows you to easily write Python code to control the display.

Below covers how to wire the display to a Raspberry Pi.&nbsp;

Since there's&nbsp;_dozens_&nbsp;of Linux computers/boards you can use, below shows wiring for Raspberry Pi. For other platforms,&nbsp;[please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Connect the display as shown below to your Raspberry Pi.

Info: 

Warning: 

# Wiring
- **Vin** &nbsp;connects to the Raspberry Pi's&nbsp; **3V** &nbsp;pin
- **GND** &nbsp;connects to the Raspberry Pi's&nbsp; **ground**
- **CLK** &nbsp;connects to SPI clock. On the Raspberry Pi, that's&nbsp; **SLCK.**
- **MOSI** &nbsp;connects to SPI MOSI. On the Raspberry Pi, that's also&nbsp; **MOSI.**
- **CS** connects to the SPI Chip Select pin. Here uses **CE0.**
- **RST** connects to the Reset pin. Here uses **GPIO 24** &nbsp;but this can be changed later.
- **D/C** &nbsp;connects to the SPI Chip Select pin. This uses&nbsp; **GPIO 25** , but this can be changed later as well.

&nbsp;

![adafruit_products_1.9_Python_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/110/223/medium640/adafruit_products_1.9_Python_bb.jpg?1648246055)

# Setup

You'll need to install the **Adafruit\_Blinka** library that provides the CircuitPython support in Python. This may also require enabling SPI on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Warning: 

## Python Installation of ST7789 Library

Once that's done, from your command line run the following command:

```terminal
sudo pip3 install adafruit-circuitpython-st7789 adafruit-circuitpython-display-text
```

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

If that complains about pip3 not being installed, then run this first to install it:

```terminal
sudo apt-get install python3-pip
```

## Pillow Library

PIL, the Python Imaging Library, will also be needed to display graphics and using text with custom fonts. There are several system libraries that PIL relies on, so installing via a package manager is the easiest way to bring in everything:

```terminal
sudo apt-get install python3-pil
```

## NumPy Library

You can install NumPy which allows for additional speed. This can be installed with the following command:

```terminal
sudo apt-get install python3-numpy
```

## Running the Code

Next to run the code, you will need to do a simple modification so the CircuitPython code runs on Python.

### Script Download and Modifications

Download the script using the wget command:

```terminal
cd ~
wget https://github.com/adafruit/Adafruit_CircuitPython_ST7789/raw/main/examples/st7789_170x320_1.9_simpletest.py
```

Next, edit the script and make the following changes to use the correct pins:

```python
tft_cs = board.CE0
tft_dc = board.D25
tft_rst = board.D24
```

Now go ahead and run the script, the output should look like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/110/226/medium800/adafruit_products_IMG_4043.jpeg?1648252408)

### Full Example
https://github.com/adafruit/Adafruit_CircuitPython_ST7789/blob/main/examples/st7789_170x320_1.9_simpletest.py

## Python Installation of RGB Display Library

The other library that you can use to draw to displays in Python is the RGB Display library. This library allows you to more directly use PIL so if you wanted to draw a JPG image, for instance, or other advanced graphics, then you can easily do so. To install the library, run this command:

```terminal
sudo pip3 install adafruit-circuitpython-rgb-display
```

### Displaying a JPG Image

To display an image other than a Bitmap such as a JPG, you just need to load it in with Pillow. To demonstrate this, download this image of blinka:

![](https://cdn-learn.adafruit.com/assets/assets/000/110/221/medium800/adafruit_products_blinka.jpg?1648245836)

You can download it straight onto you Pi with this command:

```terminal
wget https://cdn-learn.adafruit.com/assets/assets/000/110/221/original/adafruit_products_blinka.jpg
mv adafruit_products_blinka.jpg blinka.jpg
```

You can download the script to your Pi with this command:

```terminal
wget https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/raw/main/examples/rgb_display_pillow_image.py
```

### Run the Script

You will need to modify the script by commenting out a few lines of the ILI9341 display initializer. Leave everything else that including the line that contains `cs=cs_pin,` alone. The code with the commented out part should look like this:

```python
#disp = ili9341.ILI9341(
#    spi,
#    rotation=90,  # 2.2", 2.4", 2.8", 3.2" ILI9341
    cs=cs_pin,
    dc=dc_pin,
```

Then you will need to uncomment the line that for this display:

```python
disp = st7789.ST7789(spi, rotation=270, width=170, height=320, x_offset=35, # 1.9" ST7789
```

Now you can run the script with this command:

```terminal
sudo python3 rgb_display_pillow_image.py
```

Your display should look like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/110/227/medium800/adafruit_products_IMG_4042.jpeg?1648252427)

### Full Example
https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/blob/main/examples/rgb_display_pillow_image.py

# Adafruit 1.9" Color IPS TFT Display

## Downloads

## Files

- [ST7789VW datasheet](https://cdn-learn.adafruit.com/assets/assets/000/082/882/original/ST7789VW_SPEC_V1.0.pdf?1571860977)
- [EagleCAD PCB Files on GitHub](https://github.com/adafruit/Adafruit-1.9in-320x170-Color-IPS-TFT-PCB)
- [3D Models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/5394%201.9in%20TFT%20Display)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%201.9in%20320x170%20TFT.fzpz)

## Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/110/257/medium800/adafruit_products_Schematic.png?1648486882)

![](https://cdn-learn.adafruit.com/assets/assets/000/110/258/medium800/adafruit_products_Fab_Print.png?1648486893)

## 3D Model
![](https://cdn-learn.adafruit.com/assets/assets/000/114/572/medium800thumb/adafruit_products_1.9in-TFT-Display.jpg?1661864603)


## Primary Products

### Adafruit 1.9" 320x170 Color IPS TFT Display

[Adafruit 1.9" 320x170 Color IPS TFT Display](https://www.adafruit.com/product/5394)
This lovely little display breakout is the best way to add a small, colorful, and very bright display to any project. Since the display uses 4-wire SPI to communicate and has its own pixel-addressable frame buffer, it can be used with every kind of microcontroller. Even a very small one with...

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

## Related Guides

- [Pi SSD Media Server](https://learn.adafruit.com/pi-ssd-media-server.md)
- [Mini GIF Players](https://learn.adafruit.com/mini-gif-players.md)
- [Instagram Photo Frame](https://learn.adafruit.com/instagram-photo-frame.md)
- [Adafruit PCF8523 Real Time Clock](https://learn.adafruit.com/adafruit-pcf8523-real-time-clock.md)
- [Adafruit RP2040 CAN Bus Feather](https://learn.adafruit.com/adafruit-rp2040-can-bus-feather.md)
- [Pi Hole Ad Detection Display with PiTFT](https://learn.adafruit.com/pi-hole-ad-pitft-tft-detection-display.md)
- [PyPortal Reddit Stats Trophy](https://learn.adafruit.com/pyportal-reddit-stats-trophy.md)
- [Adafruit MCP3421 18-Bit ADC](https://learn.adafruit.com/adafruit-mcp3421-18-bit-adc.md)
- [ Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board](https://learn.adafruit.com/adafruit-drv8833-dc-stepper-motor-driver-breakout-board.md)
- [Mini Raspberry Pi Handheld Notebook](https://learn.adafruit.com/mini-raspberry-pi-handheld-notebook-palmtop.md)
- [Adafruit MCP9600 I2C Thermocouple Amplifier](https://learn.adafruit.com/adafruit-mcp9600-i2c-thermocouple-amplifier.md)
- [Adafruit E-Ink Bonnet for Raspberry Pi](https://learn.adafruit.com/adafruit-e-ink-bonnet-for-raspberry-pi.md)
- [Adafruit 2.13" eInk Display Breakouts and FeatherWings](https://learn.adafruit.com/adafruit-2-13-eink-display-breakouts-and-featherwings.md)
- [Ladyada's Toolkit](https://learn.adafruit.com/ladyadas-toolkit.md)
- [ESP32-S2 Reverse TFT Digital Clock Display featuring Blanka-chan!](https://learn.adafruit.com/esp32-s2-tft-digital-clock-display-featuring-blanka-chan.md)
