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!


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


2 Answers 2


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 :).

  • \$\begingroup\$ Thanks a lot @vicatcu I followed your instructions (There was some issue with contrast adjustment before). But It doesn't show the intended text. So I've tried this code to make it display numbers from 0 to 20 (Used serial port to verify). Yeah it shows something but not a number. It shows two characters (which goes from left to write as i++ happens. And the characters also change). Any idea? This is the code. while(i<20){ lcd.setCursor(0, 1); lcd.clear(); lcd.print(i++); Serial.print(i); delay(1000); } \$\endgroup\$
    – Anubis
    Aug 14, 2012 at 6:58

How about this one?


The name is slightly different, but I guess that it's just some kind of minor variant and that the pinout would be the same. Probably worth a shot unless you find something better.

Posting pinout below in case of link rot:

LEDK Power Supply for LED B/L (-) //rightmost pin
LEDA Power Supply for LED B/L (+)
VSS Power Supply (GND)  //pin "1"
VDD Power Supply (+)
V0 Contrast Adjust
RS Register select signal
R/W Data Read / write
E Enable Signal
DB0 Data Bus Line
DB1 Data Bus Line
DB2 Data Bus Line
DB3 Data Bus Line
DB4 Data Bus Line
DB5 Data Bus Line
DB6 Data Bus Line
DB7 Data Bus Line //pin "14"
  • \$\begingroup\$ Thanks @Tim for quick response. I've found similar datasheets on internet. But since i don't have any experience with LCD's, thought not to go for trial and error. But anyway, I'll give this a try. Let's see.. \$\endgroup\$
    – Anubis
    Aug 14, 2012 at 4:09
  • \$\begingroup\$ This is a very common pinout for an LCD. The LiquidCrystal library should be able to drive it without any trouble. The K and A pins are just backlight power pins. I'd just give it a try and hook it up the same way that the library examples describe. \$\endgroup\$
    – vicatcu
    Aug 14, 2012 at 4:09
  • \$\begingroup\$ @vicatcu since i'm using Arduino mega board, i find it easy to test if i can use Digital pins 22 to 53. But by default Arduino LCDLibrary uses some other digital pins which are not situated adjacently (LiquidCrystal lcd(12, 11, 5, 4, 3, 2);). If what i'm saying is wrong, please correct me. Otherwise will you suggest me a way to change the default pins to some other adjacently located set of pins. (So that I can plug the LCD directly without going for some intermediate connector) \$\endgroup\$
    – Anubis
    Aug 14, 2012 at 4:22
  • \$\begingroup\$ I've changed the default pins and tried. Well, though not in exact way it should, it worked! I tried showing hello world! (Example that comes with Arduino IDE) but it didn't display that. It showed some lines here and there. (This is a 16x2 LCD). What could be the fault? @vicatcu \$\endgroup\$
    – Anubis
    Aug 14, 2012 at 5:22
  • \$\begingroup\$ @Tim I would bet heavily on it using the Hitachi HD44780 chipset... based solely on the pinout \$\endgroup\$
    – vicatcu
    Aug 14, 2012 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.