Electronic – arduino – Identifying Pins of an Unknown LCD

arduinolcdpinout

I got a LCD removed from some device. I need to check whether it is working. But the thing is I only have the LCD, no datasheet or any documentation regarding that.

I have an Arduino mega 2560. I'm trying to drive the LCD from that.But I don't know the pin-out. Is there some way to identify the pins ? (or somehow drive the LCD).

These are the details i can give about the LCD

  • It has 16 pins
  • There's this number printed on back side PVC160205Q (I tried to find a datasheet for the number. But couldn't find anything usefull)

Any help is appreciated. Thanks!

PS:

For better understanding, I've drawn following image. Hope that'll help. That's what you see when looking at the LCD from front.

In addition to the 16 pins, there are two other + and – pins (though, they haven't used) at the right edge, as shown

enter image description here

Best Answer

This is a pretty common pinout for an LCD. You can be pretty confident that it uses the Hitachi HD44780 chipset. The LiquidCrystal library should be able to drive it without any trouble. The K and A pins are just backlight power pins.

Any digital pins should work... just make sure you connect the pins to the LCD the way the comments in the example suggest. You just need to map the pins you are connecting to the signature of the constructor being used in the example.

lcd(12, 11, 5, 4, 3, 2); 

is using the constructor from the library docs that goes with:

LiquidCrystal(rs, enable, d4, d5, d6, d7) 

You know this by counting the number of arguments. So in the example:

  • Digital 12 == RS == LCD pin 4
  • Digital 11 == Enable == LCD pin 6
  • Digital 5 == D4 == LCD pin 11
  • Digital 4 == D5 == LCD pin 12
  • Digital 3 == D6 == LCD pin 13
  • Digital 2 == D7 == LCD pin 14

You obviously also have to connect LCD Pin 2 to 5V and LCD Pin 1 to GND. You may also need to hook up a potentiometer to LCD pin 3 to adjust the contrast. Which may be the problem you are describing in your comment to me above. There are literally hundreds of tutorials on line about this, use the google :).