Tuesday, 7 July 2015

Testing a 16x2 LCD without a microcontroller

I came across the keypad from an old alarm system and was able to salvage a 16x2 LCD display from it. I was lucky that it was not soldered in place and it was able to easily be removed without damaging it. It also had pins on it which made it perfect for inserting into a breadboard. Photos of the front and back of the salvaged LCD are shown below in Figures 1 and 2.
Figure 1: Front of salvaged 16x2 LCD
Figure 2: Back of salvaged 16x2 LCD

After searching online I found that almost all LCD's use a Hitachi HD44780 or compatible controller. The salvaged LCD looked similar to all other 16x2 LCD's I could find and also had 16 pins so there was a good chance it was the same.

The standard pin out for a LCD is shown below in Figure 3. Additional information can be found in the data sheet here.
Figure 3: Pin out of Hitachi HD44780 compatible LCD
Although it looked like most other LCD's I didn't want to waste time wiring it up to the Arduino and writing a sketch if it wasn't a standard LCD or was broken. After more searching online I found that it is possible to test the LCD using just the LCD and a 5V power supply.

To test the LCD connect the LCD pins as follows:

  1. VSS (pin 1) to GND
  2. VDD (pin 2) to 5V
  3. V0 (pin 3) to GND
  4. LED+ (pin 15) to 5V
  5. LED- (pin 16) to GND 

Figure 4 below shows how to wire the 16x2 LCD for testing. For my testing I used a 5V DC power supply although a battery pack with 4xAA batteries would have worked also.
Figure 4: Wiring diagram of 16x2 LCD test setup
If the display works correctly you should see one blank line and one line filled with blocks as shown in Figure 5 below. If nothing is shown or two lines of blocks appear then the display is not working correctly.
Figure 5: Photo of successful LCD test result
You may notice in the Figure 5 that the positive and negative wires for the LCD back light are the opposite to what is shown in the wiring diagram. During testing I found that my display is not quite standard and the LED pins are reversed. All other pins on the salvaged display are as per the standard.

No comments:

Post a Comment