You can buy some great LCD modules for under £10 that will easily connect to your Arduino or microcontroller projects. These give you a full colour display to output information as text or graphics, and if you add in a touchscreen overlay you’ve got a fantastic user interface device.
Most of these small TFT modules connect using an SPI interface, often using the ILI9341 (or similar) display driver IC and XPT2046 to drive the touchscreen. If you opt for the cheaper Chinese versions you’ll get the module but no instructions or support to get it working. In this video I’ll show you everything you need to know to get both the screen and the touchscreen working on your Arduino.
We’ll be using the Adafruit ILI9341 library to handle the low level communication with the LCD panel. The Adafruit modules referenced in their own tutorials contain extra circuitry to make the connection easier. For the generic panels we need to make sure we connect the reset pin and initialise the library, telling it which pin we’ve used on the Arduino.
We also need to add our own level shifting circuit to take the 5V Arduino logic down to 3.3V for the ILI9341.
We’ll be using the LCD and touchscreen together so we’ll also need to correctly set their slave select inputs to avoid errors as we start the devices.
Once you’ve got these extras in place the LCD modules should connect without any problems.
The full connection circuit for the panel is shown below using an Arduino Uno.
You can use this breadboard layout as a guide to connecting it all together.
Once you’ve got the module up and running you need to work out how to use it. Check out my next tutorial to get a Pong game running on the device. This will show the text and graphics in action and give you advice on the limitations of the screen and how to get animations working correctly.
LCD module – Amazon
Adafruit GFX Library
Adafruit GFX Library Tutorial