Will this LCD work with the LiquidCrystal library?

The following page describes various LCDs

If you scroll down to "the KFC model", that's the display I have. I need to use it because it's so small and it will fit in my enclosure. I think I have the middle version:

# Wayton M.I.T. MC1602GSYLU/PC1602B4 - with epoxy-bonded chips

I'm trying to figure out if this display will work with the Arduino LiquidCrystal library. If the site is correct, the pins are labeled the same as my other HD44780 LCDs, but the pinout is unique:

1 DB7 Data-bus bit 7
2 DB6 Data-bus bit 6
3 DB5 Data-bus bit 5
4 DB4 Data-bus bit 4
5 DB3 Data-bus bit 3 (not used in 4-bit mode)
6 DB2 Data-bus bit 2 (not used in 4-bit mode)
7 DB1 Data-bus bit 1 (not used in 4-bit mode)
8 DB0 Data-bus bit 0 (not used in 4-bit mode)
9 E Enable (active high)
10 R/W low = write, high = read
11 RS Register select: low = instruction, high = data
12 V0 Contrast adjustment
13 GND Ground
14 Vcc Vcc (+5V) also powers backlight

BetterSense:

My guess is that this display will work OK with the LiquidCrystal library.

1- Start out with just the Vcc, GND, and Vo pins. Don't forget the 5 or 10K potentiometer with the ends connected to Vcc and GND and the wiper connected to Vo. With the pot at one end the display should be blank and with the pot at the other end you should see dark boxes on the first line of the display. Adjust the potentiometer until the dark boxes are just visible.

2- Connect the other six wires between the LCD display and the Arduino. Use the LCD pin names since your numbers are not 'normal'.

3- IMPORTANT - The LiquidCrystal examples do not implement the R/W line. You MUST ground the LCD R/W pin (pin 10 on your display, pin 5 on most others).

4- Use the LiquidCrystal library and the 'Hello World' example sketch that come with Arduino v0017. The example 'Hello World' program in the Playground is FUBAR at the time of this writing.

Don

Thanks for the help, I hooked it up but couldn't get it working.

1- Start out with just the Vcc, GND, and Vo pins. Don't forget the 5 or 10K potentiometer with the ends connected to Vcc and GND and the wiper connected to Vo.

I actually connected Vcc to my + voltage and both GND and Vo to ground...I figured this should give me max contrast, and I can add the pot later if I need it. I've had good luck just grounding Vo in other LCDs.

IMPORTANT - The LiquidCrystal examples do not implement the R/W line. You MUST ground the LCD R/W pin (pin 10 on your display, pin 5 on most others).

THANK you. I probably did that in the past but forgot. This time I didn't ground R/W; that IS at least ONE of the reasons it's not working.

BetterSense:

I actually connected Vcc to my + voltage and both GND and Vo to ground...I figured this should give me max contrast, and I can add the pot later if I need it. I've had good luck just grounding Vo in other LCDs.

This has always worked for me too, but some people report that the text is illegible on their displays unless Vo is slightly above ground.

Don

I tried the LCD and it seems like it's not working at 4v. It does work at 5v, or at least the first row lights up black bars when I turn it on. So I need to rethink my battery, because it's not enough to run the display apparently.

BetterSense:

I tried the LCD and it seems like it's not working at 4v.

I wouldn't expect it to.

It does work at 5v, or at least the first row lights up black bars when I turn it on.

So far so good - that's what is supposed to happen when you first apply power (and LCD drive) with no other pins connected. This is step 1 of reply # 1.

So I need to rethink my battery, because it's not enough to run the display apparently.

What do you mean by this? Have you done steps 2, 3, and 4 yet?

Don

Sorry about not being clear; my current battery is a 3.7 lithium, fully charged at 4v. I need to figure out some way to get 5v in my tiny space. In the meantime I can run my Boarduino with a 5v power supply so I can get the LCD working. It turns out at least one of my problems was too low of voltage.

So far so good - that's what is supposed to happen when you first apply power (and LCD drive) with no other pins connected.

The thing is, I did connect all the other pins, and was running code that should have initialized the LCD and displayed a message. That's what I've been doing this whole time but nothing has happened because I had only 4v. This time at 5v it just displayed the black bars, a great improvement. So either I have hooked the other wires up wrong, or there is something wrong with my code, or the LCD is bad (Before finding the above website I initially hooked it up according to the normal LCD wire numbering scheme and it got rather warm).

In any case, I need to figure out what I'm going to do about getting 5v. I think I can fit 4 micro-sized nimh cells in there. I can definitely fit 2 200maH lithium cells in there and use a 7805, but then I can't have the device put itself to sleep completely without a hard switch.

When I get home I will double-check the wire connections and my code.