tft display arduino with sd-card quotation

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.

tft display arduino with sd-card quotation

Anyway now I commented that line, beacuse I am not interested in speed right now. But now the problem seems to be the programation code. the error message is as follows: ( I am using Arduino 1.8.7)

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:101:37: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:106:42: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:118:39: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:121:42: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:151:40: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:163:39: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:176:37: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:183:38: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:188:38: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:193:38: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:198:38: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:205:39: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:210:39: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:215:39: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:220:39: warning: ISO C++ forbids converting a string constant to "char*" [-Wwrite-strings]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino: In function "void drawBMP(char*, int, int, boolean)":

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:267:40: warning: converting to non-pointer type "int" from NULL [-Wconversion-null]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino: In function "void drawRAW(char*, int16_t, int16_t, int16_t, int16_t)":

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2\ILI9341_draw_bitmap_v2.ino:377:40: warning: converting to non-pointer type "int" from NULL [-Wconversion-null]

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2/ILI9341_draw_bitmap_v2.ino:355: undefined reference to `FatFile::close()"

C:\Users\ADMIRAL\Videos\arduino\Libraries\Adafruit_ILI9341_AS\examples\ILI9341_draw_bitmap_v2/ILI9341_draw_bitmap_v2.ino:338: undefined reference to `FatFile::read(void*, unsigned int)"

tft display arduino with sd-card quotation

The 2.8 inch TFT LCD Touch Display is fully assembled, tested and ready to go. Add the touch display without wiring, no soldering! Simply plug it in and load up a library – you’ll have it running in under 10 minutes! Works best with any classic Arduino ATMEGA328 Board. So spice up your Arduino UNO project with a beautiful large touchscreen display shield with a built-in microSD card connection. This TFT display is big (2.8″ diagonal) bright (4 white-LED backlights) and colorful (18-bit 262,000 different shades). The Display comes with 240×320 pixels with individual pixel control. It has way more resolution than a black and white 128×64 display. As a bonus, this display has a resistive touchscreen attached to it already, so you can detect finger presses anywhere on the screen.

tft display arduino with sd-card quotation

Displays are one of the best ways to provide feedback to users of a particular device or project and often the bigger the display, the better. For today’s tutorial, we will look on how to use the relatively big, low cost, ILI9481 based, 3.5″ Color TFT display with Arduino.

This 3.5″ color TFT display as mentioned above, is based on the ILI9481 TFT display driver. The module offers a resolution of 480×320 pixels and comes with an SD card slot through which an SD card loaded with graphics and UI can be attached to the display. The module is also pre-soldered with pins for easy mount (like a shield) on either of the Arduino Mega and Uno, which is nice since there are not many big TFT displays that work with the Arduino Uno.

The module is compatible with either of the Arduino Uno or the Arduino Mega, so feel free to choose between them or test with both. As usual, these components can be bought via the links attached to them.

One of the good things about this module is the ease with which it can be connected to either of the Arduino Mega or Uno. For this tutorial, we will use the Arduino Uno, since the module comes as a shield with pins soldered to match the Uno’s pinout. All we need to do is snap it onto the top of the Arduino Uno as shown in the image below, thus no wiring required.

This ease of using the module mentioned above is, however, one of the few downsides of the display. If we do not use the attached SD card slot, we will be left with 6 digital and one analog pin as the module use the majority of the Arduino pins. When we use the SD card part of the display, we will be left with just 2 digital and one analog pin which at times limits the kind of project in which we can use this display. This is one of the reasons while the compatibility of this display with the Arduino Mega is such a good news, as the “Mega” offers more digital and analog pins to work with, so when you need extra pins, and size is not an issue, use the Mega.

To easily write code to use this display, we will use the GFX and TFT LCD libraries from “Adafruit” which can be downloaded here. With the library installed we can easily navigate through the examples that come with it and upload them to our setup to see the display in action. By studying these examples, one could easily learn how to use this display. However, I have compiled some of the most important functions for the display of text and graphics into an Arduino sketch for the sake of this tutorial. The complete sketch is attached in a zip file under the download section of this tutorial.

As usual, we will do a quick run through of the code and we start by including the libraries which we will use for the project, in this case, the Adafruit GFX and TFT LCD libraries.

With this done, the Void Setup() function is next. We start the function by issuing atft.reset() command to reset the LCD to default configurations. Next, we specify the type of the LCD we are using via the LCD.begin function and set the rotation of the TFT as desired. We proceed to fill the screen with different colors and display different kind of text using diverse color (via the tft.SetTextColor() function) and font size (via the tft.setTextSize() function).

Next is the void loop() function. Here we basically create a UI to display the youtube subscribe button, using some of the same functions we used under the void setup() function.

The Adafruit library helps reduce the amount of work one needs to do while developing the code for this display, leaving the quality of the user interface to the limitations of the creativity and imagination of the person writing the code.

tft display arduino with sd-card quotation

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.

In the file dialog select the downloaded ZIP file and your library will be installed automatically. This will automatically install the library for you (requires Arduino 1.0.5 or newer). Restarting your Arduino software is recommended as it will make the examples visible in the examples menu.

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:

The SD-Card needs to be FAT-16 or FAT-32 formatted, single partition, and the BMP file needs to be placed in the root (ie. not in a directory or anything like that).

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)

To use this in your Arduino Sketch: The first 2 characters represent RED, the second set of two characters is for GREEN and the last 2 characters represent BLUE. Add ‘0x’ in front of each of these hex values when using them (‘0x’ designates a hexadecimal value).

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.

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).

Based on these functions, I did create a little demo to show what these functions do. Either download the file or just copy the code and paste it into an empty Arduino Sketch.

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. ");

tft display arduino with sd-card quotation

The screen is 1.77" diagonal, with 160 x 128 pixel resolution. The TFT library interfaces with the screen"s controller through SPI when using the TFT library. Refer to the screen"s data sheet for complete details.

The Arduino TFT library extends the Adafruit GFX, and Adafruit ST7735 libraries that it is based on. The GFX library is responsible for the drawing routines, while the ST7735 library is specific to the screen on the Arduino screen. The Arduino specific additions were designed to work as similarly to the Processing API as possible.

The TFT library relies on the SPI library, which must be included in any sketch that uses the scree. If you wish to use the SD card, you need to include the SD library as well.

tft display arduino with sd-card quotation

This is SainSmart 5 inch TFT LCD module with the TFT LCD shield kit for arduino enthusiasts.It includes one piece of 5 inch TFT LCD display and a TFT LCD shield for arduino due.We will provided you the whole document including the example project of arduino due with the kit. We will supply you the technical support after your purchase.

The SainSmart Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU (Datasheet). It is the first Arduino board based on a 32-bit ARM core microcontroller. It has 54 digital input/output pins (of which 12 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz clock, an USB OTG capable connection, 2 DAC (digital to analog), 2 TWI, a power jack, an SPI header, a JTAG header, a reset button and an erase button.

LCD-specified initialization code is provided, so that you can save time to optimize power control register and gamma curves for best display performance. We have test the provided code, it gives the best display performanace

It is 100% compatible with the normal MCU like ARM AVR PIC and 8051,especially on arduino family such as arduino due and arduino mega2560(R3).The module uses the LCD controller Chip SSD1963 with 5 inch LCD including the touchscreen.

The shield defines that all the the data transmit ports are PC1-PC8 and PC12-PC19,the controll pins are PD0-PD3.The perfect design could realize that the data transmits in high speed.The SPI interface is designed in the ISP header of arduino due so that the SPI transfer with DMA could be achieved in high speed with no drag.

tft display arduino with sd-card quotation

The 2.8 inch TFT LCD Touch Display is fully assembled, tested and ready to go. Add the touch display without wiring, no soldering! Simply plug it in and load up a library – you’ll have it running in under 10 minutes! Works best with any classic Arduino ATMEGA328 Board. So spice up your Arduino UNO project with a beautiful large touchscreen display shield with a built-in microSD card connection. This TFT display is big (2.8″ diagonal) bright (4 white-LED backlights) and colorful (18-bit 262,000 different shades). The Display comes with 240×320 pixels with individual pixel control. It has way more resolution than a black and white 128×64 display. As a bonus, this display has a resistive touchscreen attached to it already, so you can detect finger presses anywhere on the screen.

tft display arduino with sd-card quotation

Here we describe the following setups: 1. Arduino Uno with mounted on it a TFT display shield, 2. Arduino Nano with a separate SD card reader and driving the same (parallel) TFT display. Both combinations comfortably support a digital photo frame. The library MCUFRIEND_kbv.h (David Prentice) is required.

A TFT display offers in width, height, pixels and color depth an attractive medium to display pictures. The assemblies described here are capable of showing sequences of pictures stored on SD card. Most simple is to mount a TFT shield onto an Arduino Uno and, with the proper sketch, display images. The Arduino Uno or its little brother Nano can also be used in combination with with a separate SD card reader and a TFT display, for instance in situations where it is difficult if not impossible to reach the shields SD card reader. We have tested a selection of TFT displays. Some form of external data storage is always necessary with the original Arduinos because the internal memory of these microcontrollers is far too small to hold color image frames. The Arduino serves in a photo frame assembly as an engine that reads image files stored on SD card pixel for pixel and transfers them fast and in a proper way to the display. The result is that a digital photo frame can be created fast and with very modest means.

The idea of a shield is very simple and very clever: Just stick the device properly onto an Arduino UNO, insert the SD card loaded with pictures, upload a sketch and you’re in business. Let’s go through this procedure.

figure 1. Left: 3.5’ 320*480 pixel parallel TFT shield, front – a micro SD card sticks out of the SD card slot. Right: Arduino UNO. basically: just stick the shield onto the UNO, stick a micro SD card with picture files in the card reader slot, load the sketch and go!

Shields:The market supplies a range of shields between 2.4’ and 3.95’ display diagonal and with resolutions of 320*240 and 320*480. Display controllers are ILI9341, ILI9481, ILI9486 and ILI9488. This range of displays suits the purpose of creating a photo frame. My favorite photo frame display is a 3.5’ 320*480 display shield with ILI9481 controller. The MCUFRIEND_kbv.h library supports all these controllers.

SD card:The world of SD cards is rapidly changing. Some years ago all TFT displays on the market came equipped with a standard SD card slot, accepting cards with capacities in the MB range. Current SD card slots are in the micro format while the market is flooded with micro-SD cards with enormous capacities. At the same time ‘low-capacity’ SD cards are increasingly hard to get. The micro SD card used here has a capacity of 8 GB. Note that cards need to be formatted in FAT32 and that it is most handy to have all images stored in the root directory.

SD card technology works with 3.3V control logic while an Arduino UNO works with 5V control logic. The voltage requirements for a card reader integrated in a TFT shield is taken care of by the voltage regulator and level shifters of the shield, so don’t worry.

figure 2. left: the back of the 3.5’ TFT shield of figure 1 – all pins visible. Four pins (marked ‘SD_xx’) support the SD card reader while the remaining pins provide power and serve (marked LCD_xx) the parallel interface of the display. Displays with an ILI9341, ILI9481, or ILI 9486 controller are fully supported by the MCUFRIEND_kbv.h library.

Images: The only format recognized by Arduino is Microsoft’s BMP format. BMP is an uncompressed format that exists in several color depths: 2, 4, 8, 16, 24 and 32 bit. The 24-bit color depth (R8G8B8), designated in Windows as ‘True Color’ is the only format accepted by the Arduino. The file system on the SD cards works with eight-character filenames that reminisces good old DOS times long ago, when short file names were the norm. Names longer than 8 characters become shorthanded with the ~ sign.

Image dimensions:My photo frame image collection contains pictures with different dimensions and different positions (portrait, landscape). The screen dimensions of my favorite photo frame however, are fixed: 320*480 pixels. What happens to pictures whose dimensions exceed those of the screen? I have tested this by taking a picture of my favorite dog, called ‘Bastien’. The original picture dimensions (landscape) was scaled to 1600*1200 pixels and exported as 24-bit BMP: bastien1.bmp. Further downscaling was done to 800*600, 400*300 and 200*150 pixels. The resulting pictures were exported to SD card as BMPs: bastien2.bmp, bastien3.bmp and bastien4.bmp. Three of these pictures (bastien2, 3 and 4) were perfectly displayed on screen (figure 2). The 1600*1200 image was shown garbled. The sketch does not scale, it just transfers the image from the SD card to the display. The display acts as a kind of keyhole giving access to the entire picture. Keyholes work as long as pictures are no larger than the keyhole. With pictures larger than the keyhole the upper left part of the content is shown, e.g., that of bastien2.bmp (800*600; fig 3C) and the remaining is invisible beyond the edges of the display. This makes one wonder what the maximum pixel format is that is supported by the controller. In case of this display with an ILI9481 controller some experimenting learned that all images with conventional image formats up to 1280*1024 pixels are supported. It does not matter whether this format is in portrait or landscape. beyond these dimensions the pcitures become garbled on screen. On-card file size of the 1280*1024 pixel images is 3.9 MB which makes it attractive to believe that maximum allowed file size is 4 MB.

library: MCUFRIEND_kbv.h is an extremely flexible library that is meticulously kept up to date by David Prentice, its creator. Thanks to this library most Arduino display shields on the market are supported. David provides assistance via the Arduino forum – https://forum.arduino.cc.

figure 3. Image dimensions test. The same image scaled and then exported. Three dimension formats: 150*200, 300*400 and 600*800 pixels. The images in A and B are within the display dimensions of 320 pixels high and 480 pixels wide and are shown in all their glory on screen where pixel (0,0) is in the upper left corner of the display. The dimensions of the image in C (bastien2.bmp; 800*600 pixels) exceed the display dimensions; the left upper part of the image is shown while the remaining is off screen.

With a bare Arduino Nano it is very well possible to connect parallel displays. In several previous projects (*, **) this has been achieved. The only barrier is that a parallel TFT needs, apart from two power wires and GND, five control wires and 8 data wires to provide a working, stable interface. This wiring can be acchieved with Dupont jumper wires . However to get rid of what easily becomes a massive tangle of wires and to have permanently at hand a reliable, stable assembly I constructed some time ago a ‘Nano-parallel TFT display bench’ (*) that suits a range of parallel-interface TFT shields. On this bench I mounted the TFT display previously used with the UNO and connected the bench with an external SD card reader. The sketch used with the Arduino UNO worked perfectly with this assembly. Modification of the sketch was not necessary.

A table listing the pins of the Nano necessary for wiring the TFT display is shown, together with a wiring diagram, in figure 5. Card readers standard have four control pins: MISO, CLS, MOSI and CS. These need to be wired to pins 12, 13, 11 and 10 of the Nano. Note that card reader technology works with 3.3V control logic while a Nano has 5-volt control logic so verify that your SD card reader is 5V compliant. The card reader used here is 3.3V-5V compliant, as witnessed by the presence of pins for 3.3V and 5V power plus an on-board voltage regulator. Both voltages (as power supply to the card reader) were tested, and there were no differences in performance.

figure 5. Wiring diagram and pin wireout for an Arduino Nano connected to a standalone SD card reader. Notice that SD cards are 3.3V devices. The card reader usually has an on-board voltage regulator.

figure 6. Complete wiring diagram and pin wireout for an Arduino Nano connected to a standalone SD card reader and to a parallel-interface TFT display (e.g. UNO shield).

Figure 6 shows the complete wiring diagram for all components. I previously built a Nano-TFT bench (*). This bench was used in the present project. Figure 7 shows a working assembly consisting of the Nano-TFT bench connected to an external SD card reader.

figure 7. The same display as in figure 1 now on a bench powered by a Nano (left). The bench has the advantage that free pins have been wired to a row pin headers below the display. The image on display is the 1280*1024 version of the ‘bastien’ picture. The SD card reader receives here power from the Nano’s 3.3V pin.

Both options: UNO with TFT shield and Nano-TFT shield-separate card reader, work fine. Pictures are shown with vivid colors and great brightness on screen. With large pictures (320*480 or larger) the line-for-line transfer of the bitmap from card to display is evident, reminiscent of the old days with slow computers and low-capacity graphic cards. Just as in the old days the best performance of a slide show is obtained when all pictures in the show have the same dimensions, preferably pixel dimensions that match those of the display: 320*240 or 320*480. As 320*480 needs twice the number of pixels as 320*240, loading speed of the smaller images can be anticipated twice as fast as that of the bigger pictures.

The zip file ‘UNO_TFT_photoframe.zip contains the sketch (.ino) that runs a slide show on the UNO-TFT shield as well as on the Nano-TFT-shield-separate SD card reader. Note that this sketch is a slightly modified version of the example ‘showBMP_kbv_Uno’ provided with the MCUFRIEND_kbv.h library created by David Prentice. All credits to David. Of course you have to prepare yourself a SD card loaded with .BMP ‘True Color’ formatted color pictures with dimensions matching those of your display