Tuesday, June 16, 2009

LCD difficulties

After putting together a schematic in EAGLE for the shower control circuit, I tinkered a bit trying to get a scrounged Powertip PC1602-G character LCD working. Serial LCDs from SparkFun are easy to use but expensive, in addition to hogging the serial port and being available only in 16x2 and 20x4; I'd like to be able to use cheapo 8x2 or other displays.

I soldered on a pin header and got to breadboarding it with an iDuino, but quickly discovered that the tutorials are pretty haphazard, and I wasn't able to get any output using the LiquidCrystal library in spite of quadruple-checking my schematic and breadboard connections.

I tried Limor's tutorial but got no result, and I think editing the library to set the pins is an odd (wrong?) way for a library to work. I even used the exact same pins-- no dice. I wonder if the scrounged LCDs I'm using have custom commands that makes them incompatible with the library-- I need to try a different LCD, and maybe use Massimo's raw example.

Update: In a comment, Al asked if the LCDs I was trying weren't HD44780-compatible at all and... oops, thats the problem! I got it working fine with an LCD scrounged from an old Brady Labelmaker, which contains an actual Toshiba HD44780.

7 comments:

  1. Hi Jeff

    LCDs can be a bit tricky. In theory they should Just Work but sometimes there are some intricacies that need to be worked around. The Arduino library only supports HD44780 compatible chips (this driver chip is the de facto standard).

    Does your module have an HD44780 chip on the back? If not, Google the part number to see if anything interesting turns up. If it's a compatible chip then the library should work, if not you may have to tweak something (maybe timings, or a different reset/display on command).

    Hope this helps

    Al

    ReplyDelete
  2. Hi Jeff,

    Please don't find my remark offensive but did you mind setting the contrast pin of the LCD? First I forgot to and nothing was displayed. Finally I tried playing with the value on that pin and it appeared (I'm a bit newbie maybe).

    AlanFromJapan

    ReplyDelete
  3. Al, you're right-- looks like the PC1602G isn't HD44780-compatible...:o Alan, I did set the contrast pin-- all suggestions are welcome! Now to get some HD44780 LCDs and more info on the PowerTip displays I scrounged from some old servers...

    ReplyDelete
  4. Did you ever find out anything about those powertip displays? I ask because I have a whole bunch of PC1602Cs and I hate to think they are all useless!

    Thanks for any info in advance!

    Leif Burrow

    ReplyDelete
  5. Hi Leif, sorry I never did get those displays working, they're still in a drawer, waiting...

    ReplyDelete
  6. oh well, thanks anyway

    ReplyDelete
  7. Hello to everybody, the Powertip PC-1602-G is HD44780-compatible at 100%; then there's something wrong somewhere but not on the display (!) -Marco

    ReplyDelete