Raspberry pi touchscreen LCD: The Best LCD Tutorial
Touchscreen displays are always one of the coolest things that you can add to a raspberry pi. Having a neat display always boosts the overall funk of your project. You can build upon a prolific number of applications using portable TFT LCD displays. Maybe create even your own customized smartphone. However, most displays are not used because they are expensive and are really complicated to interface with the raspberry pi. However, in this raspberry pi touchscreen LCD tutorial, I will show you to interface an extremely simple and cheap 3.2 inch LCD display. This TFT LCD display also has a resisitive touchscreen and a stylus.
I am preparing this raspberry pi tutorial for the Wave Share SpotPear 3.2” LCD display with resistive touchscreen. Since, according to me it is the cheapest and the simplest LCD with touch interface that can be added to your raspberry pi projects. You can do a lot of things using such displays. You can build: head mounted displays (like the SmartCap), portable kiosk, or just add it to any of your existing projects where you need a LCD display with touch interface. So, just follow this simple tutorial to learn to work with a raspberry pi touchscreen LCD.
What are the stuff required to do this project?
- Raspberry pi B/B+.
- Wave share SpotPear 3.2” LCD display with touchscreen.
- SD card for loading raspbian OS (8 GB)
Raspbian image for Wave share SpotPear 3.2” LCD display
How does it work?
Interfacing the LCD display with raspberry pi is extremely simple. The LCD module comes with raspberry pi’s GPIO pin compatible female headers. Which means that you just have to plug in your display module on to your raspberry pi’s GPIO pins. No other connections or connectors are necessary. Also, this touchscreen TFT LCD display will provide you with a 320*240 resolution. For more details on the Wave share 3.2” LCD display for the raspberry pi, check this: raspberry pi LCD display.
Here, we are using an LCD display with resistive touchscreen. Normally, when you are trying to interface such displays with a raspberry pi, you have to install various drivers, etc. But here, I will be providing an image file for the raspbian OS. This means that you just have to install the OS I am providing on to your SD card. And your raspberry pi will start working with the LCD display and touch interface.
This raspberry pi touchscreen LCD uses the SPI communication protocol. The GPIO pins on the raspberry pi are directly plugged on to the female header of the 3.2” LCD touchscreen display, so you dont have to worry about the connections.
Step 1: Connecting your 3.2” raspberry pi touchscreen LCD display
This will have to be the easiest step, since you just need to take the LCD module and plug it on to your raspberry pi GPIO pins as shown in the above picture.
In case, you need to utilize other pins of your raspberry pi for the project, you can then use raspberry pi GPIO to breadboard connectors (male to female) like this: GPIO connectors.
Or you can just check out the connections for the pins of the raspberry pi touchscreen LCD display module as shown below:
|1, 17||3.3V||Power positive (3.3V power input)|
|2, 4||5V||Power positive (5V power input)|
|3, 5, 7, 8, 10, 22||NC||NC|
|6, 9, 14, 20, 25||GND||Ground|
|11||TP_IRQ||Touch Panel interrupt, low level while the Touch Panel detects touching|
|15||LCD_RS||LCD instruction control, Instruction/Data Register selection|
|19||LCD_SI / TP_SI||SPI data input of LCD/Touch Panel|
|21||TP_SO||SPI data output of Touch Panel|
|23||LCD_SCK / TP_SCK||SPI clock of LCD/Touch Panel|
|24||LCD_CS||LCD chip selection, low active|
|26||TP_CS||Touch Panel chip selection, low active|
Step 2: Installing the raspbian OS image for the 3.2” raspberry pi touchscreen LCD display
Normally, when trying to interface a touchscreen LCD display with the raspberry pi, you need to install various drivers, make changes in the kernel, etc. But here, you can forget doing all that. Just install the .img file of the raspbian OS on to your SD card. You can find the file and the datasheet for the display here: image file. The image file can be found inside the folder
Next, you have to install this image file to your raspberry pi. So, take an empty SD card and an SD card reader. For Windows users, check out the steps as detailed by the Raspberry Pi foundation:
For more detail: Raspberry pi touchscreen LCD The Best LCD Tutorial