Connect LCD to Raspberry Pi Without Breakout Board

by 陳亮 in Circuits > Raspberry Pi

71946 Views, 479 Favorites, 0 Comments

Connect LCD to Raspberry Pi Without Breakout Board

IMG_9756.jpg

This instructables show how to connect LCD to Raspberry Pi (RPi) without breakout board.

Why?

I would like to make a MINTIA game console with RPi like my previous project:

https://www.instructables.com/id/Arduino-MINTIA-Gam...

LCD with breakout board is too thick for this project so I need direct connect LCD to Pi zero.

Preparation

IMG_9716.jpg

LCD

Any ili9341 SPI LCD should work. TM022HDH26 is the smallest SPI LCD screen I can found that have 320x240 resolution. It is 2.2 inch in size and use ili9341 chip (Thanks to Adafruit, RPi have very good support for ili9341).

FPC Ribbon Flat Cable

LCD and FPC ribbon flat cable have various pitch, it is required both at the same pitch. E.g. TM022HDH26 is 0.8 mm pitch so it should choose 0.8 mm pitch FPC ribbon flat cable.

RPi Board

Any RPi board can work. If you are using Pi Zero and yet soldered the pin header or do not want to solder it you may refer my previous instructables how to access the GPIO:

https://www.instructables.com/id/Testing-Pi-Zero-Wi...

Read LCD Terminal Definition

螢幕快照 2016-07-17 上午12.22.19.png

Various LCD have different terminal definition, it is very important find and read the LCD data sheet first.

According to the TM022HDH26 data sheet, it need connect pin 2 to pin 9. I have skipped LED brightness control circuit, so I simply connect pin 10 to pin 9 and pin 11-14 to pin 8.

Cut the FPC Ribbon Flat Cable

IMG_9717.jpg

TM022HDH26 require connect pin 2 to pin 9 terminals, so trim the FPC ribbon flat cable to 8 lines only.

Patch the FPC Terminal

IMG_9718.jpg

The FPC ribbon flat cable is too long for this project, so I cut it in half and use a rasp remove the plastic cover.

Soldering Work

IMG_9719.jpg
IMG_9720.jpg
IMG_9721.jpg
  1. apply some flux to the FPC mental part
  2. apply some solder on the mental part
  3. align the FPC to LCD pin 2-9
  4. solder FPC pin to pin together
  5. solder LCD pin 9 and pin 10 together
  6. solder LCD pin 8 and pin 11-14 together
  7. solder FPC other side to pin header for testing

​Connect LCD to Raspberry Pi

IMG_9754.jpg
LCD pin 2 RESET -> RPi pin 22 GPIO 25
LCD pin 3 SCL   -> RPi pin 23 GPIO 11 (SCLK)
LCD pin 4 D/C   -> RPi pin 18 GPIO 24
LCD pin 5 CS    -> RPi pin 24 GPIO  8
LCD pin 6 SDI   -> RPi pin 19 GPIO 10 (MOSI)
LCD pin 7 SDO   -> RPi pin 21 GPIO  9 (MISO)
LCD pin 8 GND   -> RPi pin 25 GND
LCD pin 9 VCC   -> RPi pin 17 3V3

Test LCD

IMG_9755.jpg

There are various document teach how to connect SPI LCD to Raspberry Pi, here are the summary:

spi-bcm2835
fbtft_device
  • Add to file /etc/modprobe.d/fbtft.conf

options fbtft_device custom name=fb_ili9341 gpios=reset:25,dc:24 speed=48000000 rotate=270 fps=30 bgr=1
  • install fbcp
sudo apt-get update
sudo apt-get install cmake git
git clone https://github.com/tasanakorn/rpi-fbcp
cd rpi-fbcp/
mkdir build
cd build/
cmake ..
make
sudo install fbcp /usr/local/bin/fbcp
  • auto run fbcp at boot time
sudo echo "/usr/local/bin/fbcp &" >> /etc/rc.local
  • find and edit the config in /boot/config.txt
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt=640 480 60 1 0 0 0
disable_overscan=1
dtparam=spi=on
  • reboot RPi

Ref.:

https://github.com/notro/fbtft/wiki

https://learn.adafruit.com/adafruit-pitft-28-inch-...

https://learn.adafruit.com/running-opengl-based-ga...

Happy Hacking!

IMG_9757.jpg
IMG_9758.jpg

Once you can connect LCD without breakout board, you can create your project in much small scale!