Adafruit 1.
Guide Contents Guide Contents Overview Pinouts Assembly 2 3 6 7 Prepare the header strip: Add the breakout board: And Solder! 7 8 9 Wiring & Test Wiring Install Arduino Libraries Changing Pins Adafruit GFX library Drawing Bitmaps Downloads Files & Datasheets Schematics & PCB Print © Adafruit Industries https://learn.adafruit.
Overview 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.
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 (http://adafru.it/102).
tutorial (https://adafru.it/ckK). The code is written for Arduino but can be easily ported to your favorite microcontroller! © Adafruit Industries https://learn.adafruit.
Pinouts This color display uses SPI to receive image data. That means you need at least 4 pins - clock, data in, tft cs and d/c. If you'd like to have SD card usage too, add another 2 pins - data out and card cs. However, there's a couple other pins you may want to use, lets go thru them all! 3-5V / Vin - this is the power pin, connect to 3-5VDC - it has reverse polarity protection but try to wire it right! 3.3Vout - this is the 3.
Assembly Prepare the header strip: Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - long pins down © Adafruit Industries https://learn.adafruit.
Add the breakout board: Place the breakout board over the pins so that the short pins poke through the breakout pads © Adafruit Industries https://learn.adafruit.
And Solder! Be sure to solder all pins for reliable electrical contact. (For tips on soldering, be sure to check out our Guide to Excellent Soldering (https://adafru.it/aTk)). You're done! Check your solder joints visually and continue onto the next steps © Adafruit Industries https://learn.adafruit.
Wiring & Test Wiring Wiring up the display in SPI mode is pretty easy as there's not that many pins! We'll be using hardware SPI, but you can also use software SPI (any pins) later. Start by connecting the power pins 3-5V Vin connects to the Arduino 5V pin GND connects to Arduino ground CLK connects to SPI clock. On Arduino Uno/Duemilanove/328-based, thats Digital 13. On Mega's, its Digital 52 and on Leonardo/Due its ICSP-3 (See SPI Connections for more details (https://adafru.
Type “gfx” in the search field to quickly find the first library — Adafruit_GFX: Repeat the search and install steps, looking for the Adafruit_ZeroDMA and Adafruit_ST7735 libraries. After restarting the Arduino software, you should see a new example folder called Adafruit_ST7735 and inside, an example called graphicstest. In the graphicstest source code, look for the lines as follows: © Adafruit Industries https://learn.adafruit.
// Use this initializer if you're using a 1.8" TFT tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab // Use this initializer (uncomment) if you're using a 1.44" TFT //tft.initR(INITR_144GREENTAB); // initialize a ST7735S chip, black tab comment out the first line, and uncomment the second, so it looks like: // Use this initializer if you're using a 1.8" TFT //tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab // Use this initializer (uncomment) if you're using a 1.
// Option 1 (recommended): must use the hardware SPI pins // (for UNO thats sclk = 13 and sid = 11) and pin 10 must be // an output.
Adafruit GFX library 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.
Check out our detailed tutorial here http://learn.adafruit.com/adafruit-gfx-graphics-library (https://adafru.it/aPx) It covers the latest and greatest of the GFX library! © Adafruit Industries https://learn.adafruit.
Drawing Bitmaps There is a built in microSD card slot into the breakout, and we can use that to load bitmap images! You will need a microSD card formatted FAT16 or FAT32 (they almost always are by default). Its really easy to draw bitmaps! Lets start by downloading this image of a lily Copy lily128.bmp into the base directory of a microSD card and insert it into the microSD socket in the breakout. Two more wires are required to interface with the onboard SD card.
Edit the setup() intialization to: // Use this initializer if you're using a 1.8" TFT //tft.initR(INITR_BLACKTAB); // initialize a 1.8" TFT // Use this initializer (uncomment) if you're using a 1.44" TFT tft.initR(INITR_144GREENTAB); // initialize a 1.44" TFT And the drawBmp() routine to: // change the name here! bmpDraw("lily128.bmp", 0, 0); Upload to the Arduino & you will see the flowers appear! © Adafruit Industries https://learn.adafruit.
To make new bitmaps, make sure they are less than 128 by 128 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 - dont 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.
Downloads Files & Datasheets ST7735R display driver datasheet (https://adafru.it/aP9) Raw 1.44" TFT Datasheet (https://adafru.it/dYA) Fritzing object in Adafruit Fritzing library (https://adafru.it/aP3) EagleCAD PCB files in GitHub (https://adafru.it/pAu) Schematics & PCB Print © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.