1.8 color tft lcd display with microsd free sample

In this guide we’re going to show you how you can use the 1.8 TFT display with the Arduino. You’ll learn how to wire the display, write text, draw shapes and display images on the screen.

The 1.8 TFT is a colorful display with 128 x 160 color pixels. The display can load images from an SD card – it has an SD card slot at the back. The following figure shows the screen front and back view.

This module uses SPI communication – see the wiring below . To control the display we’ll use the TFT library, which is already included with Arduino IDE 1.0.5 and later.

The TFT display communicates with the Arduino via SPI communication, so you need to include the SPI library on your code. We also use the TFT library to write and draw on the display.

In which “Hello, World!” is the text you want to display and the (x, y) coordinate is the location where you want to start display text on the screen.

The 1.8 TFT display can load images from the SD card. To read from the SD card you use the SD library, already included in the Arduino IDE software. Follow the next steps to display an image on the display:

Note: some people find issues with this display when trying to read from the SD card. We don’t know why that happens. In fact, we tested a couple of times and it worked well, and then, when we were about to record to show you the final result, the display didn’t recognized the SD card anymore – we’re not sure if it’s a problem with the SD card holder that doesn’t establish a proper connection with the SD card. However, we are sure these instructions work, because we’ve tested them.

In this guide we’ve shown you how to use the 1.8 TFT display with the Arduino: display text, draw shapes and display images. You can easily add a nice visual interface to your projects using this display.

1.8 color tft lcd display with microsd free sample

Hi guys, welcome to today’s tutorial. Today, we will look on how to use the 1.8″ ST7735  colored TFT display with Arduino. The past few tutorials have been focused on how to use the Nokia 5110 LCD display extensively but there will be a time when we will need to use a colored display or something bigger with additional features, that’s where the 1.8″ ST7735 TFT display comes in.

The ST7735 TFT display is a 1.8″ display with a resolution of 128×160 pixels and can display a wide range of colors ( full 18-bit color, 262,144 shades!). The display uses the SPI protocol for communication and has its own pixel-addressable frame buffer which means it can be used with all kinds of microcontroller and you only need 4 i/o pins. To complement the display, it also comes with an SD card slot on which colored bitmaps can be loaded and easily displayed on the screen.

The schematics for this project is fairly easy as the only thing we will be connecting to the Arduino is the display. Connect the display to the Arduino as shown in the schematics below.

Due to variation in display pin out from different manufacturers and for clarity, the pin connection between the Arduino and the TFT display is mapped out below:

We will use two libraries from Adafruit to help us easily communicate with the LCD. The libraries include the Adafruit GFX library which can be downloaded here and the Adafruit ST7735 Library which can be downloaded here.

We will use two example sketches to demonstrate the use of the ST7735 TFT display. The first example is the lightweight TFT Display text example sketch from the Adafruit TFT examples. It can be accessed by going to examples -> TFT -> Arduino -> TFTDisplaytext. This example displays the analog value of pin A0 on the display. It is one of the easiest examples that can be used to demonstrate the ability of this display.

The second example is the graphics test example from the more capable and heavier Adafruit ST7735 Arduino library. I will explain this particular example as it features the use of the display for diverse purposes including the display of text and “animated” graphics. With the Adafruit ST7735 library installed, this example can be accessed by going to examples -> Adafruit ST7735 library -> graphics test.

The first thing, as usual, is to include the libraries to be used after which we declare the pins on the Arduino to which our LCD pins are connected to. We also make a slight change to the code setting reset pin as pin 8 and DC pin as pin 9 to match our schematics.

Next, we create an object of the library with the pins to which the LCD is connected on the Arduino as parameters. There are two options for this, feel free to choose the most preferred.

Next, we move to the void setup function where we initialize the screen and call different test functions to display certain texts or images.  These functions can be edited to display what you want based on your project needs.

All the functions called under the void setup function, perform different functions, some draw lines, some, boxes and text with different font, color and size and they can all be edited to do what your project needs.

Uploading the code to the Arduino board brings a flash of different shapes and text with different colors on the display. I captured one and its shown in the image below.

That’s it for this tutorial guys, what interesting thing are you going to build with this display? Let’s get the conversation started. Feel free to reach me via the comment section if you have any questions as regards this project.

1.8 color tft lcd display with microsd free sample

The display is driven by a ST7735R controller ( ST7735R-specifications.pdf (2.1 MB) ), can be used in a “slow” and a “fast” write mode, and is 3.3V/5V compatible.

Adafruit_ST7735 is the library we need to pair with the graphics library for hardware specific functions of the ST7735 TFT Display/SD-Card controller.

The easiest way to remedy this is by extracting the GitHub ZIP file. Place the files in a directory with the proper library name (Adafruit_GFX, Adafruit_ST7735 or SD) and zip the folder (Adafruit_GFX, Adafruit_ST7735.zip, SD.zip). Now the Arduino software can read and install the library automatically for you.

Basically, besides the obvious backlight, we tell the controller first what we are talking to with the CS pins. CS(TFT) selects data to be for the Display, and CS(SD) to set data for the SD-Card. Data is written to the selected device through SDA (display) or MOSI (SD-Card). Data is read from the SD-Card through MISO.

So when using both display and SD-Card, and utilizing the Adafruit libraries with a SainSmart display, you will need to connect SDA to MOSI, and SCL to SCLK.

As mentioned before, the display has a SLOW and a FAST mode, each serving it’s own purpose. Do some experiments with both speeds to determine which one works for your application. Of course, the need of particular Arduino pins plays a role in this decision as well …

Note: Adafruit displays can have different colored tabs on the transparent label on your display. You might need to adapt your code if your display shows a little odd shift. I noticed that my SainSmart display (gree tab) behaves best with the code for the black tab – try them out to see which one works best for yours.

Low Speed display is about 1/5 of the speed of High Speed display, which makes it only suitable for particular purposes, but at least the SPI pins of the Arduino are available.

After connecting the display in Low Speed configuration, you can load the first example from the Arduino Software (“File” “Example” “Adafruit_ST7735” –  recommend starting with the “graphictest“).

Below the code parts for a LOW SPEED display (pay attention to the highlighted lines) – keep in mind that the names of the pins in the code are based on the Adafruit display:

You can name your BMP file “parrot.bmp” or modify the Sketch to have the proper filename (in “spitftbitmap” line 70, and in “soft_spitftbitmap” line 74).

#define SD_CS 4 // Chip select line for SD card#define TFT_CS 10 // Chip select line for TFT display#define TFT_DC 9 // Data/command line for TFT#define TFT_RST 8 // Reset line for TFT (or connect to +5V)

#define SD_CS 4 // Chip select line for SD card#define TFT_CS 10 // Chip select line for TFT display#define TFT_DC 9 // Data/command line for TFT#define TFT_RST 8 // Reset line for TFT (or connect to +5V)

fillRect( x, y, width, height, color );Draws a filled rectangle, starting at (x,y) with a width, height, in the indicated color.(x,y) indicates the upper left corner.

drawChar( x, y, character, color, backgroundcolor, fontsize );Draws a character at a given location (x,y), where (x,y) represents the upper left corner of the character.

This function is used to indicate what corner of your display is considered (0,0), which in essence rotates the coordinate system 0, 90, 180 or 270 degrees.

However, if your application needs your screen sideways, then you’d want to rotate the screen 90 degrees, effectively changing the display from a 128×160 pixel (WxH) screen to a 160×128 pixel display. Valid values are: 0 (0 degrees), 1 (90 degrees), 2 (180 degrees) and 3 (270 degrees).

tft.print("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a tortor imperdiet posuere. ");

1.8 color tft lcd display with microsd free sample

This lovely little shield is the best way to add a small, colorful and bright display to any project. We took our popular 1.8″ TFT breakout board and remixed it into an Arduino shield complete with microSD card slot and a 5-way joystick navigation switch (with a nice plastic knob)! Since the display uses only 4 pins to communicate and has its own pixel-addressable frame buffer, it can be used easily to add a display & interface without exhausting the memory or pins.

The 1.8″ display has 128×160 color pixels. Unlike the low cost “Nokia 6110” and similar LCD displays, which are CSTN type and thus have poor color and slow refresh, this display is a true TFT! The TFT driver (ST7735R) can display full 18-bit color (262,144 shades!). And the LCD will always come with the same driver chip so there’s no worries that your code will not work from one to the other.

The shield has the TFT display soldered on (it uses a delicate flex-circuit connector) as well as a ultra-low-dropout 3.3V regulator and a 3/5V level shifter so its safe to use with 5V Arduinos. We also had some space left over so we placed a microSD card holder (so you can easily load full color bitmaps from a FAT16/FAT32 formatted microSD card) and a 5-way navigation switch (left, right, up, down, select). The microSD card is not included,

If you just want to display text, shapes, lines, pixels, etc the shield uses pins 13, 11, 10 and 8. If you’d like to add the navigation switch, it uses Analog 3 (all 5 switches are connected using a clever resistor trick to permit all the switches to share one analog pin). For the microSD card, you’ll also give up Digital 12 and 4.

Comes as a fully assembled and tested shield with the display, microsd card holder and nav switch with knob as well as a stick of 0.1″ header. To finish up and use, you will need to solder on the header onto the shield PCB, a quick 10 minute task.

Display current draw is mostly based on the backlight, with full backlight the current draw is ~100mA, this does not include the SD Card. SD cards can draw 20-100mA based on read/write. Measure current draw in circuit to get precise numbers.

1.8 color tft lcd display with microsd free sample

This lovely little display is the best way to add a small, colorful 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 with very little memory and few pins available!

The 1.8 ″ display has 128 × 160 color pixels. Unlike the low cost “Nokia 6110” and similar LCD displays, which are CSTN type and thus have poor color and slow refresh, this display is a true TFT! The TFT driver (ST7735R) can display full 18-bit color (262,144 shades!). And the LCD will always come with the same driver chip so there"s no worries that your code will not work from one to the other.

The breakout has the TFT display soldered on (it uses a delicate flex-circuit connector) as well as a ultra-low-dropout 3.3V regulator and a 3 / 5V level shifter so you can use it with 3.3V or 5V power and logic . We also had a little 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.

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, text and bitmaps as well as example code and a wiring tutorial. The code is written for Arduino but can be easily ported to your favorite microcontroller!

You can download our Arduino library with examples from github. To install it, rename the downloaded and uncompressed library to ST7735 and place in the sketchfolder / libraries folder. See our detailed tutorial for more info.

1.8 color tft lcd display with microsd free sample

Now available from PMD Way is this great value 1.8 TFT LCD module with an SD card breakout. The display has a resolution of 120 x 160 pixels in full colour, and thanks to the SPI-based interface only uses five digital pins.

Using the display with Arduino is incredibly simple as it is compatible with theTFT libraryinstalled by default with the Arduino IDE. Inline header pins are soldered to the display, however you may want somemale-to-female jumpersto connect to your Arduino orsolderless breadboard. You will also need two female-female wires if using anArduino Dueorcompatible.

The display is compatible with the TFT libraray included with the Arduino IDE, so you can try the examples included and theprogramming reference is found on the Arduino website.

1.8 color tft lcd display with microsd free sample

This ST7735S 1.8" TFT Display features a resolution of 128×160 and SPI (4-wire) communication. Integrated with an SD card slot, it allows to easily read full-color bitmaps from the SD card. The module provides users with two wiring methods: pin header wiring and GDI (General Display interface). You can directly use an FPC cable to connect the display to any controller with GDI interface like FireBeetle-M0. Plug and play, easy to wire. Besides, the display supports low refresh rate and offers good display effect and strong versatility. It can be used in applications like sensor monitoring and alarm, Arduino temperature monitor, fan controller, etc.

This product is a breakout module that features SPI communication mode and onboard GDI interface, which could reduce the complexity of wiring. It can easily display the read content from the SD card.

The BasicTest.ino code shows us the basic display functions of the screen: text display, number display, drawing lines, drawing rectangles and other demos.

screen.drawXBitmap(/*x=*/(screen.width()-146)/2,/*y=*/(screen.height()-128)/2,/*bitmap gImage_Bitmap=*/gImage_XBitmap,/*w=*/146,/*h=*/128,/*color=*/0x0000);

screen.drawRGBBitmap(/*x=*/(screen.width()-146)/2,/*y=*/(screen.height()-128)/2,/*bitmap gImage_Bitmap=*/(const unsigned uint16_t*)gImage_RGBBitmap,/*w=*/146,/*h=*/128);

1.8 color tft lcd display with microsd free sample

We guarantee your satisfaction on every product we sell with a full refund — and you won’t even need a receipt.* We want you to be satisfied with your Micro Center purchase. However, if you need help or need to return an item, we’re here for you!

*If you are a Micro Center Insider or if you have provided us with validated contact information (name, address, email address), you won’t even need your receipt.

1.8 color tft lcd display with microsd free sample

This lovely little shield is the best way to add a small, colorful and bright display to any project. We took our popular 1.8" TFT breakout board and remixed it into an Arduino shield complete with microSD card slot and a 5-way joystick navigation switch (with a nice plastic knob)! Since the display uses only 4 pins to communicate and has its own pixel-addressable frame buffer, it can be used easily to add a display & interface without exhausting the memory or pins.

The 1.8" display has 128x160 color pixels. Unlike the low cost "Nokia 6110" and similar LCD displays, which are CSTN type and thus have poor color and slow refresh, this display is a true TFT! The TFT driver (ST7735R) can display full 18-bit color (262,144 shades!). And the LCD will always come with the same driver chip so there"s no worries that your code will not work from one to the other.

The shield has the TFT display soldered on (it uses a delicate flex-circuit connector) as well as a ultra-low-dropout 3.3V regulator and a 3/5V level shifter so its safe to use with 5V Arduinos. We also had some space left over so we placed a microSD card holder (so you can easily load full color bitmaps from a FAT16/FAT32 formatted microSD card) and a 5-way navigation switch (left, right, up, down, select).

1.8 color tft lcd display with microsd free sample

{"id":6570888986742,"title":"Adafruit 1.44\" Color TFT LCD Display with MicroSD Card breakout - ST7735R","handle":"adafruit-1-44-color-tft-lcd-display-with-microsd-card-breakout-st7735r","description":"\u003cp\u003eThis lovely little display breakout is the best way to add a small, colorful and 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 few pins available!\u003c\/p\u003e\u003cp\u003eThe 1.44\" display has 128x128 color pixels. Unlike the low cost \"Nokia 6110\" and similar LCD displays, which are CSTN type and thus have poor color and slow refresh, this display is a true TFT! The TFT driver (ST7735R) can display full 16-bit color using our library code.\u003c\/p\u003e\u003cp\u003eThe breakout has the TFT display soldered on (it uses a delicate flex-circuit connector) as well as a ultra-low-dropout 3.3V regulator and a 3\/5V level shifter so you can use it with 3.3V or 5V power and logic. We also had a little 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, \u003ca href=\"http:\/\/www.adafruit.com\/products\/102\" target=\"_blank\"\u003ebut you can pick one up here\u003c\/a\u003e.\u003c\/p\u003e\u003cp\u003eOf course, we wouldn"t just leave you with a datasheet and a \"good luck!\" - \u003ca href=\"https:\/\/learn.adafruit.com\/adafruit-1-44-color-tft-with-micro-sd-socket\" target=\"_blank\"\u003ewe"ve written a full open source graphics library that can draw pixels, lines, rectangles, circles, text and bitmaps as well as example code and a wiring tutorial\u003c\/a\u003e. The code is written for Arduino but can be easily ported to your favorite microcontroller!\u003c\/p\u003e","published_at":"2021-06-08T17:00:30-04:00","created_at":"2021-06-08T16:59:37-04:00","vendor":"Adafruit","type":"Adafruit","tags":[],"price":2300,"price_min":2300,"price_max":2300,"available":true,"price_varies":false,"compare_at_price":2300,"compare_at_price_min":2300,"compare_at_price_max":2300,"compare_at_price_varies":false,"variants":[{"id":39340495372406,"title":"Default Title","option1":"Default Title","option2":null,"option3":null,"sku":"K710","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Adafruit 1.44\" Color TFT LCD Display with MicroSD Card breakout - ST7735R","public_title":null,"options":["Default Title"],"price":2300,"weight":0,"compare_at_price":2300,"inventory_quantity":53,"inventory_management":"shopify","inventory_policy":"deny","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-00.jpg?v=1623185977","\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-10.jpg?v=1623186055","\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-07.jpg?v=1623186062","\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-01.jpg?v=1623186070"],"featured_image":"\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-00.jpg?v=1623185977","options":["Title"],"media":[{"alt":null,"id":20499319521398,"position":1,"preview_image":{"aspect_ratio":1.332,"height":728,"width":970,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-00.jpg?v=1623185977"},"aspect_ratio":1.332,"height":728,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-00.jpg?v=1623185977","width":970},{"alt":null,"id":20499321520246,"position":2,"preview_image":{"aspect_ratio":1.332,"height":728,"width":970,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-10.jpg?v=1623186055"},"aspect_ratio":1.332,"height":728,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-10.jpg?v=1623186055","width":970},{"alt":null,"id":20499321651318,"position":3,"preview_image":{"aspect_ratio":1.332,"height":728,"width":970,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-07.jpg?v=1623186062"},"aspect_ratio":1.332,"height":728,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-07.jpg?v=1623186062","width":970},{"alt":null,"id":20499321782390,"position":4,"preview_image":{"aspect_ratio":1.332,"height":728,"width":970,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-01.jpg?v=1623186070"},"aspect_ratio":1.332,"height":728,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1749\/9663\/products\/2088-01.jpg?v=1623186070","width":970}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003eThis lovely little display breakout is the best way to add a small, colorful and 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 few pins available!\u003c\/p\u003e\u003cp\u003eThe 1.44\" display has 128x128 color pixels. Unlike the low cost \"Nokia 6110\" and similar LCD displays, which are CSTN type and thus have poor color and slow refresh, this display is a true TFT! The TFT driver (ST7735R) can display full 16-bit color using our library code.\u003c\/p\u003e\u003cp\u003eThe breakout has the TFT display soldered on (it uses a delicate flex-circuit connector) as well as a ultra-low-dropout 3.3V regulator and a 3\/5V level shifter so you can use it with 3.3V or 5V power and logic. We also had a little 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, \u003ca href=\"http:\/\/www.adafruit.com\/products\/102\" target=\"_blank\"\u003ebut you can pick one up here\u003c\/a\u003e.\u003c\/p\u003e\u003cp\u003eOf course, we wouldn"t just leave you with a datasheet and a \"good luck!\" - \u003ca href=\"https:\/\/learn.adafruit.com\/adafruit-1-44-color-tft-with-micro-sd-socket\" target=\"_blank\"\u003ewe"ve written a full open source graphics library that can draw pixels, lines, rectangles, circles, text and bitmaps as well as example code and a wiring tutorial\u003c\/a\u003e. The code is written for Arduino but can be easily ported to your favorite microcontroller!\u003c\/p\u003e"}

This lovely little display breakout is the best way to add a small, colorful and 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 few pins available!

The 1.44" display has 128x128 color pixels. Unlike the low cost "Nokia 6110" and similar LCD displays, which are CSTN type and thus have poor color and slow refresh, this display is a true TFT! The TFT driver (ST7735R) can display full 16-bit color using our library code.

The breakout has the TFT display soldered on (it uses a delicate flex-circuit connector) as well as a ultra-low-dropout 3.3V regulator and a 3/5V level shifter so you can use it with 3.3V or 5V power and logic. We also had a little 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.

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, text and bitmaps as well as example code and a wiring tutorial. The code is written for Arduino but can be easily ported to your favorite microcontroller!

1.8 color tft lcd display with microsd free sample

This is a snap-fit case for the Adafruit 1.8 Color TFT LCD Display with MicroSD Card Breakout, ST7735R. This case is designed to be snap-fit together, not requiring any screws. Please check to see if this fits your display before printing (https://www.adafruit.com/product/358). The print was designed with a clearance of 0.15mm between parts for a snug fit.

1.8 color tft lcd display with microsd free sample

Connect everything like on diagram, and copy-paste this sketch to your Arduino IDE. This is sketch File > Examples > Adafruit ST7735 and ST7789 Library > seesaw_shield18_test, but it is modified so we can use it with our 1.8’’ TFT display with SD card reader. Just uncomment first 4 include lines.#include //

On microSD card, we put two images, cat.bmp, and spb-1.bmp, that we previously scaled to fit 128x64 screen and converted them to .bmp file format. For this you can use Gimp. First open image in Gimp, then to scale image in gimp go to Image > Scale Image and change width to 128 and hit enter. If height value is not less than 64, than cancel that and start scaling again, but this time, first change height to 64 and hit enter, after which width will be less than 128. To finish scaling press Scale button. To save image as .bmp, press CTRL+SHIFT+E or go to File > Export as, and save it with name NAME.bmp.

At the beginning of sketch we define 4 macros, so that we can connect two devices, TFT diplay and SD card reader on hardware SPI on Arduino board. Then we create tft object, and in setup() function we initialize it, and here we also initialize sd card reader, and print cat.bmp image on the screen.

In loop() function we set screen orientation with setRotation() function, which accepts one integer argument in range from 0 to 3. Then we use bmpDraw() function to display spb-1.bmp image. This function accepts three arguments, first is location of image on microsd card “/spb-1.bmp”. If your image is named differently, than this will be “/name_of_image.bmp”. Second and third arguments are X and Y position of top left corner of image.