A few weekends ago I got hold of an old broken Canon printer/scanner combo. One thing that caught my eye was the display. It was a 2×20 character LCD (2 lines, 20 characters per line) which is better than some others I have which are 2×16.
Here is an image of my finished example project with this display:
When removing the display I noticed something very interesting in that the display was just a glass panel, and had a ribbon cable attached to it that had only 14 pins. This meant that there was something special with this display in that the display circuitry for driving the display was all built inside the glass, and is called a Chip on Glass display. Normally you find these LCD displays with 60 connections or more, as the multiplexing and driving circuitry is not attached to the glass.
Ok, now here’s why I actually decided to try to actually get this display working in the first place. When I realised there was no circuit board behind the LCD panel as you would normally find with a few driver chips and/or recognisable components, I thought it would be using a proprietary command set for interfacing with an SPI or I2C bus, and would be impossible to sniff and decode the data as the printer was broken and did not power on.
As I counted the pins on the ribbon cable I realised that it had 14 pins. This is a very coincidental number as standard HD44780-based character LCD displays use this exact amount of pins (plus two for the backlight so it’s 16, but here there isn’t one).
I decided to give it a shot.
Looking at the pinout for normal HD44780-based LCDs, the first three pins are responsible for power and the contrast adjustment. I decided to try to wire up these three pins and see what happens. I connected pin 1 to Ground, pin 2 to +5V and pin 3 as the contrast adjustment through a potentiometer from Ground to 5V.
As expected, the first line went solid black which HD44780 LCDs do before you send them data, which proved my theory. I then spent far too much time in actually getting it to work.
Here are my initial connections to the printer circuit board that has the ribbon cable connector for the display:
I tried connecting up the LCD in 4-bit mode using the LiquidCrystal Arduino library, but only random characters and symbols were displayed on the LCD.
I knew this meant there was something wrong with the wiring or something else weird, so I tried connecting it up in 8-bit mode and to no avail. I randomly tried swapping pins around until finally when RS and RW were swapped (pin 4 and 5), it came to life!
Right now I was really happy and relieved that all my time spent was worth it.
I built up a small breakout board so it could easily fit on a breadboard. I cut off a section from the printer PCD with the ribbon cable connecter, glued it to the breakout board and soldered connections from it, then put on a small potentiometer for the contrast adjustment.
Here are some pictures of how it turned out:
I then decided to do a “mini-project” just to make an example of it in action: a temperature display.
I just wrote up a quick program to read the temperature from a LM35 temperature sensor and display the value to the display (in Celsius). This is the image you see in the top of the post.
One more thing that I thought would be interesting is seeing the ASCII character set that the LCD uses. I figured since this display was probably designed for printers or similar consumer devices, it would have some interesting characters built in, and it did!
It has symbols for arrows, some bar graphs, rounded icons and also some Russian (I think?) letters.
Here is a pinout of the display. Note that pins are ordered from left to right:
1 – Ground
2 – Contrast – Connect to 5V for full contrast. Connect via a pot to Ground and 5V.
3 – +5V power supply
4 – RW
5 – RS
6 – Enable
7 – Data 1
8 – Data 2
9 – Data 3
10 – Data 4
11 – Data 5
12 – Data 6
13 – Data 7
14 – Data 8
Overall it was a good learning experience in getting it working, and I really enjoyed it.
Now, I really need to think of a proper project to use this in…