analog in to 4 bit LCD driver

Hi Rob, I wrote the 4-bit library, so would be keen to help you get it to work. I've only tested it so far on two devices (and they were from the same family).

I think maybe you've not tied RW low. There are two things to watch for when using this library:

  1. get the pins right (In your case, I don't think this is the problem)
  2. tie RW low

1. Get the pins right:
I intentionally kept the pins the same between the LiquidCrystal library and 4BitLCD library, so if you have your circuit working with LiquidCrystal library, you should have to make only two changes:

  • unplug the four unused databus lines DB0, DB1, DB2, DB3.
  • tie the LCD's RW input to ground (see point #2 below).

Here are the default arduino digital pins the 4bit library expects you to use. They can be found in LCD4Bit.cpp.

int RS = 12;
int RW = 11; //irrelevant if USING_RW is false.
int Enable = 2;
//4-bit data bus should be a sequence of pins
int DB[] = {7, 8, 9, 10}; //wire these to DB4~7 on LCD.

Ideally, when someone creates an instance of LCD4Bit, they should be able to specify the pins they want to use. Early days.

2. Tie RW low.
I wrote the 4-bit library for people who want to save on arduino pins. As most applications only need to write data to the LCD and never read, we can save another pin by hard-wiring the LCD RW input to low (or whatever indicates a write-operation in your LCD data sheet). The LCD4bit library expects this wiring and won't try to control the RW pin (by default). You can disable this behaviour in LCD4bit.cpp by finding the line
int USING_RW = false;
and setting it to true.

Making changes to the library
If you make changes in LCD4Bit.cpp, be sure to delete LCD4Bit.o before recompiling your arduino sketch - this will force recompilation of the library.

GDM1602K datasheet
By the way, looks like there's a more comprehensive data sheet for that product here:
http://www.xmocular.com/pdf/GDM1602K.pdf
not that you should need it.

What else to try
If the above ideas don't help, try using glasspusher or massimo's 4-bit code, too. This would give us the confidence that we can get your display working somehow, and I'll look at the 4bit library initialisation code again as I have a feeling it's not perfect. If we can get the LCD4Bit library tested successfully on many devices, we should be able to distribute it with the arduino IDE alongside the main LiquidCrystal library, making this much easier for all the other arduino users.

All comments here apply to LCD4Bit library v0.1 (16th Oct 2006). YMMV with other versions.

General LCD documentation on the arduino playground:
http://www.arduino.cc/playground/Code/LCD

good luck for now!
neill