Every now and then I think it might be handy to have some sort of display on the Arduino ... something a little more detailed than an LED that either blinks or doesn't.
Adafruit's 2-line LCD text display comes with a great Character LCD tutorial, but it's quite heavy, and includes a backlight I don't need. I wanted something more minimal.
The local surplus store always has lots of cheap LCDs, but they unfortunately tend to be unlabeled, so you can't tell which pin is which. But the other day I spied a very lightweight little display for $2.95 that actually had a label on it, so I grabbed it, figuring I'd be able to get the pinout from google. It said:
DENSITRON 2 617ASNG0441 0201 TAIWAN
Alas, googling produced no useful information for any of those numbers. Foiled again! It might as well have been unlabeled!
Wait -- let's not give up quite so quickly.
Adafruit's LCD Shield tutorial says most parallel displays have either 14 or 16 pins, while this one has 15. That's close, at least ... but comparing the two Ada tutorials, I could see that the pin assignments for the two displays were completely different even though both were 16-pin. I wasn't going to get pin assignments there.
Searching for just
densitron 15-pin lcd found
lots of displays that clearly weren't this one. But apparently a lot of
them were similar to a display called an LM50. Perhaps mine used that
So I tried it, and it worked with only a little experimentation. Here's the pinout:
|LCD pin||Function||Arduino pin|
|2||+5 V||+5 V|
Or I can use the nice cable with the 8x2 connector that came with the display, which maps to these functions:
|1 = Gnd||Contrast||RW||D0||D2||D4||D6|
The Arduino LiquidCrystal library works just fine with it, using this initialization:
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);in the Liquid Crystal Arduino sketch.
Works great! I went back and grabbed another $3 display. So the moral is, even a complete hardware klutz shouldn't give up too easily: with the right web search terms and a little fiddling, you might just get it to work after all.
Update: apparently something has changed in the LiquidCrystal library,
and you now need a trick to get this to work. Specifically, to see
the rightmost 8 characters, you need to call
lcd.setCursor(40, 0). See this discussion:
showing only first 8 characters (lcd.setCursor(0,1) not working).
[ 20:25 Jun 11, 2011 More hardware | permalink to this entry | ]