Recently I came across a low cost 1.3" IPS TFT screen. It has very high resolution of 240x240 pixels and very high pixel density due to its small size. It is a IPS panel, IPS stands for InPlane Switching. These are higher end type of LCD screens which have great viewing angles and better color reproduction than traditional TFT+TN/CSTN type LCD's. Thats why its one of my favorite LCDs.
It uses the SPI Interface to communicate with the microcontroller or a SOC.
Standard SPI uses 4 wires to communicate:
1) MOSI -> Master Out Slave In
2) MISO -> Master In Slave Out
3) SCK -> Serial Clock
4) CS/SS -> Chip Select/Slave Select
The SPI allows multiple devices on the bus and the active device is selected by pulling the chip select line LOW. This display does not have the chip select line broken out to the headers.
You may ask why bother hacking the CS line? Well that depends on application. If you have the display as the only device on the SPI bus then that's fine. The display will still work, although if you want to use some other device on the SPI bus such as a SD card adapter then you are out of luck as they both require separate CS lines in order to talk to the slave device. That is why we are going to get the CS line out of the module.
This module has total of 7 pins:
1) BLK = Backlight
2) D/C = Data/Command
3) RES = Reset
4) SDA = Serial Data or SPI MOSI
5) SCL = Serial Clock or SPI SCK
(Do not get confused with the I2C pins SDA and SCK, this screen is not I2C.)
6) VCC (3.3V)
By connecting the BLK pin to VCC we can enable the LED backlight of the screen but this pin is useless unless you want to control the backlight by software. But we can use this extra pin as a CS pin by removing the trace from the ribbon of the LCD.
1) Sharp cutter or knife.
2) Soldering Iron
3) Jumper wire or wire wrapping wire (>28AWG)
4) Hot glue gun (Optional)
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Interrupting First Trace
First get yourself a sharp cutter. Then cut the trace as shown in the picture. Do this carefully as the screen is fragile and do not let the cutter slip and damage the ribbon cable. After interrupting the trace make sure the BLK pin is disconnected from the resistor R2 below this trace with the help of multimeter in continuity mode.
Step 2: Adding Solder Pads
Again with the help of the cutter, carefully scrape away the solder mask in the three places shown in the picture. Be careful not to expose the neighbouring traces, doing so will make the soldering more difficult later. Scrape it until you see the bare copper. It should be big enough to solder the jumper wires which we will solder later.
Then tin these exposed copper pads with some fresh solder.
Step 3: Interrupting Second Trace
I recommend using a temperature controlled iron for the next step. Set the iron to around 350C to avoid breaking small solder pads for the LCD. I am going to use my trusty TS100 for this. Start by adding some fresh solder to the ribbon connecter solder pads. And starting from any one side gently pull the ribbon upwards to remove solder joint one at a time. Be very gentle! This ribbon is very fragile. bending it too much will break the internal traces. Now after removing the ribbon, cut the trace going from the 5th trace from the left side. This is our CS line, permanently tied to GND. Cut along the bottom side of the trace from the ground flood fill. After interrupting make sure this is disconnected from the GND pin.
After it is done, resolder the ribbon to the PCB and check all connections with multimeter.
Step 4: Adding Jumper Wires
Get some fine jumper wires (solid core recommended) and tin the stripped ends. Connect one wire from the BLK Header trace to the CS trace of the ribbon and one wire from VCC to the backlight trace.
This will tie the backlight to VCC and connect the free header to CS.
Add some hot glue on the wires and connections after checking.