fritzing ips tft display manufacturer

Does anyone have the Fritzing schematic for the Arduino TFT display? I have have searched for it in the Fritzing User Created parts group and different forums, but with no luck. I have seen it used here but they do not provide the schematic.

fritzing ips tft display manufacturer

Please do note that the Arduino shown in the image above is the classic Arduino Nano. I have this, because there is no library for Maker Nano RP2040 yet inside the Fritzing.

fritzing ips tft display manufacturer

2 Overview This gorgeous IPS display breakout is the best way to add a small, colorful and bright display to any project, with excellent visibility from any angle. 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 2.0" display has 320x240 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! Not only that, but its an IPS display for vivid Adafruit Industries Page 3 of 25

3 color and high-angle visibility. The TFT driver (ST7789) can display full 18-bit color (262,144 shades), but almost all drivers will use just 16-bit color. The TFT 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, 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 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 Adafruit Industries Page 4 of 25

4 library that can draw pixels, lines, rectangles, circles, text and bitmaps as well as example code ( 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. Adafruit Industries Page 5 of 25

5 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! 3Vo - this is the 3.3V output from the onboard regulator GND - this is the power and signal ground pin SCK - this is the SPI clock input pin. Use 3-5V logic level MISO - this is the SPI Master In Slave Out pin, it"s 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) MOSI - this is the SPI Master Out Slave In pin, it is used to send data from the microcontroller to the SD card and/or TFT. Use 3-5V logic level CS - this is the TFT SPI chip select pin. Use 3-5V logic level 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 Arduino 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 D/C - this is the TFT SPI data or command selector pin. Use 3-5V logic level SD Card CS / SDCS - this is the SD card chip select, used if you want to read from the SD card. Use 3-5V logic level BL - 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 Adafruit Industries Page 6 of 25

6 Arduino Wiring & Test Basic Graphics Test Wiring Wiring up the display in SPI mode is pretty easy as there are 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 microcontroller 5V pin GND connects to Arduino ground SCK connects to SPI clock. On Arduino Uno/Duemilanove/328-based, thats Digital 13. On Mega, its Digital 52 and on other chips its ICSP-3 (See SPI Connections for more details ( MISO is not connected MOSI connects to SPI MOSI. On Arduino Uno/Duemilanove/328-based, thats Digital 11. On Mega, its Digital 51 and on other chips its ICSP-4 (See SPI Connections for more details ( CS connects to our SPI Chip Select pin. We"ll be using Digital 10 but you can later change this to any pin RST connects to our Display Reset pin. We"ll be using Digital 9 but you can later change this pin too. D/C connects to our SPI data/command select pin. We"ll be using Digital 8 but you can later change this pin too. For the level shifter, we use the CD74HC4050 ( which has a typical propagation delay of ~10ns Adafruit Industries Page 7 of 25

7 Install Arduino Libraries We have 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 Type gfx in the search field to quickly find the first library Adafruit_GFX: Adafruit Industries Page 8 of 25

8 Repeat the search and install steps, looking for the Adafruit Zero DMA, Adafruit ST7735 and ST7789, Adafruit SPIFlash, and SdFat - Adafruit Fork libraries. After restarting the Arduino software, you should see a new example folder called Adafruit_ST7735, and inside, an example called graphicstest. Since this example is written for several displays, there are two changes we need to make in order to use it with the 2.0" display. First, in the graphicstest source code, look for the lines as follows: // For 1.44" and 1.8" TFT with ST7735 (including HalloWing) use: Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST); // For 1.3", 1.54", and 2.0" TFT with ST7789: //Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); comment out the first line, and uncomment the second, so it looks like: Adafruit Industries Page 9 of 25

9 // For 1.44" and 1.8" TFT with ST7735 (including HalloWing) use: //Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST); // For 1.3", 1.54", and 2.0" TFT with ST7789: Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); Second, we need to set the correct initializations sequence. In the graphicstest source code, look for the lines as follows: // Use this initializer if using a 1.8" TFT screen: tft.initr(initr_blacktab); // Init ST7735S chip, black tab // OR use this initializer (uncomment) if using a 1.44" TFT: //tft.initr(initr_144greentab); // Init ST7735R chip, green tab // OR use this initializer (uncomment) if using a 0.96" 180x60 TFT: //tft.initr(initr_mini160x80); // Init ST7735S mini display // OR use this initializer (uncomment) if using a 1.3" or 1.54" 240x240 TFT: //tft.init(240, 240); // Init ST x240 // OR use this initializer (uncomment) if using a 2.0" 320x240 TFT: //tft.init(240, 320); // Init ST x240 comment out the first line, and uncomment the fifth, so it looks like: // Use this initializer if using a 1.8" TFT screen: //tft.initr(initr_blacktab); // Init ST7735S chip, black tab // OR use this initializer (uncomment) if using a 1.44" TFT: //tft.initr(initr_144greentab); // Init ST7735R chip, green tab // OR use this initializer (uncomment) if using a 0.96" 180x60 TFT: //tft.initr(initr_mini160x80); // Init ST7735S mini display // OR use this initializer (uncomment) if using a 1.3" or 1.54" 240x240 TFT: //tft.init(240, 240); // Init ST x240 // OR use this initializer (uncomment) if using a 2.0" 320x240 TFT: tft.init(240, 320); // Init ST x240 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. Adafruit Industries Page 10 of 25

11 // 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. #if defined(adafruit_pybadge_m4_express) defined(adafruit_pygamer_m4_express) // For PyBadge and PyGamer Adafruit_ST7735 tft = Adafruit_ST7735(&SPI1, TFT_CS, TFT_DC, TFT_RST); #else // For 1.44" and 1.8" TFT with ST7735 (including HalloWing) use: //Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST); // For 1.3", 1.54", and 2.0" TFT with ST7789: Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); #endif // 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 // For ST7735-based displays, we will use this call //Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST); // OR for the ST7789-based displays, we will use this call //Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST); Comment out option 1, and uncomment option 2 for the ST7789. Then you can change the TFT_ pins to whatever pins you"d like! The 2.0" IPS TFT display has an auto-reset circuit on it so you probably don"t need to use the RST 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 Industries Page 12 of 25

12 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. Adafruit Industries Page 13 of 25

17 CircuitPython Displayio Quickstart You will need a board capable of running CircuitPython such as the Metro M0 Express or the Metro M4 Express. You can also use boards such as the Feather M0 Express or the Feather M4 Express. We recommend either the Metro M4 or the Feather M4 Express because it"s much faster and works better for driving a display. For this guide, we will be using a Feather M4 Express. The steps should be about the same for the Feather M0 Express or either of the Metros. If you haven"t already, be sure to check out our Feather M4 Express ( guide. Adafruit Feather M4 Express - Featuring ATSAMD51 OUT OF STOCK Out Of Stock 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 Adafruit Guide To Excellent Soldering ( After that, the breakout should be ready to go. Required CircuitPython Libraries To use this display with displayio, there is only one required library. First, make sure you are running the latest version of Adafruit CircuitPython ( for your board. Next, you"ll need to install the necessary libraries to use the hardware--carefully follow the steps to find and install these libraries from Adafruit"s CircuitPython library bundle ( Our introduction guide has a great page on how to install the library bundle ( for both express and non-express boards. Remember for non-express boards, you"ll need to manually install the necessary libraries from the bundle: adafruit_st7789 Before continuing make sure your board"s lib folder or root filesystem has the adafruit_st7789 file copied over. Code Example Additional Libraries For the Code Example, you will need an additional library. We decided to make use of a library so the code didn"t get overly complicated. Adafruit Industries Page 18 of 25

18 Go ahead and install this in the same manner as the driver library by copying the adafruit_display_text folder over to the lib folder on your CircuitPython device. CircuitPython Code Example Temporarily unable to load content: Let"s take a look at the sections of code one by one. We start by importing the board so that we can initialize SPI, displayio, terminalio for the font, a label, and the adafruit_st7789 driver. import board import displayio import terminalio from adafruit_display_text import label from adafruit_st7789 import ST7789 Next we release any previously used displays. This is important because if the Feather is reset, the display pins are not automatically released and this makes them available for use again. displayio.release_displays() Next, we set the SPI object to the board"s SPI with the easy shortcut function board.spi(). By using this function, it finds the SPI module and initializes using the default SPI parameters. Next we set the Chip Select and Data/Command pins that will be used. spi = board.spi() tft_cs = board.d5 tft_dc = board.d6 In the next line, we set the display bus to FourWire which makes use of the SPI bus. display_bus = displayio.fourwire(spi, command=tft_dc, chip_select=tft_cs, reset=board.d9) Finally, we initialize the driver with a width of 320 and a height of 240. Because we want the display to start in a horizontal orientation, we tell it to start with a rotation of 90 degrees. If we stopped at this point and ran the code, we would have a terminal that we could type at and have the screen update. display = ST7789(display_bus, width=320, height=240, rotation=90) Adafruit Industries Page 19 of 25

19 Next we create a background splash image. We do this by creating a group that we can add elements to and adding that group to the display. In this example, we are limiting the maximum number of elements to 10, but this can be increased if you would like. The display will automatically handle updating the group. splash = displayio.group(max_size=10) display.show(splash) Next we create a Bitmap which is like a canvas that we can draw on. In this case we are creating the Bitmap to be the same size as the screen, but only have one color. The Bitmaps can currently handle up to 256 different colors. We create a Palette with one color and set that color to 0x00FF00 which happens to be green. Colors are Hexadecimal values in the format of RRGGBB. Even though the Bitmaps can only handle 256 colors at a time, you get to define what those 256 different colors are. color_bitmap = displayio.bitmap(320, 240, 1) color_palette = displayio.palette(1) color_palette[0] = 0x00FF00 # Bright Green With all those pieces in place, we create a TileGrid by passing the bitmap and palette and draw it at (0, 0) which represents the display"s upper left. bg_sprite = displayio.tilegrid(color_bitmap, pixel_shader=color_palette, x=0, y=0) splash.append(bg_sprite) Adafruit Industries Page 20 of 25

20 Next we will create a smaller purple square. The easiest way to do this is the create a new bitmap that is a little smaller than the full screen with a single color and place it in a specific location. In this case we will create a bitmap that is 20 pixels smaller on each side. The screen is 320x240, so we"ll want to subtract 40 from each of those numbers. We"ll also want to place it at the position (20, 20) so that it ends up centered. inner_bitmap = displayio.bitmap(280, 200, 1) inner_palette = displayio.palette(1) inner_palette[0] = 0xAA0088 # Purple inner_sprite = displayio.tilegrid(inner_bitmap, pixel_shader=inner_palette, x=20, y=20) splash.append(inner_sprite) Since we are adding this after the first square, it"s automatically drawn on top. Here"s what it looks like now. Adafruit Industries Page 21 of 25

21 Next let"s add a label that says "Hello World!" on top of that. We"re going to use the built-in Terminal Font and scale it up by a factor of three. To scale the label only, we will make use of a subgroup, which we will then add to the main group. Labels are centered vertically, so we"ll place it at 120 for the Y coordinate, and around 57 pixels make it appear to be centered horizontally, but if you want to change the text, change this to whatever looks good to you. Let"s go with some yellow text, so we"ll pass it a value of 0xFFFF00. text_group = displayio.group(max_size=10, scale=3, x=57, y=120) text = "Hello World!" text_area = label.label(terminalio.font, text=text, color=0xffff00) text_group.append(text_area) # Subgroup for text scaling splash.append(text_group) Finally, we place an infinite loop at the end so that the graphics screen remains in place and isn"t replaced by a terminal. while True: pass Where to go from here Be sure to check out this excellent guide to CircuitPython Display Support Using displayio ( Adafruit Industries Page 22 of 25

22 Downloads Files 2.0" display EagleCAD files on GitHub ( 2.0" display Fritzing object in the Adafruit Fritzing Library ( Fab Print Schematic Adafruit Industries Page 23 of 25