Confusing pins on LCD.  Eeek!

Hey all,

I've purchased a Longtech-Optics LCM1602S-FL-YBW LCD display from NKC Electronics. I'm assuming it's a Hitachi compatible display, but I bought it anyway because it has an orange backlight which will be perfect for my project.

Anyway, this is the data sheet: vintagecomputercables.com

Beside there being 2 different references to the pins and what they are, I have managed to establish that the reference on page is correct.

The only pins I know what to do with are LED+ and LED- and of course VDD and VSS. I just wanted to see this thing "light up" before I connected it to the Arduino.

Is this possible? What else do I need to do to have her light up? I'm not feeling confident because I can't even get the LED backlight to light up (putting +5VDC on LED+ (pin 15) and a 10K resistor to GND on LED- (pin 16)).

Why do I get the feeling this thing is nuked? Or am I wrong, and need to go 'all the way' with the Arduino?

Cheers,
Scott

I just found the driver listed in the documentation and it says it's a SPLC780D which I've concluded is Hitachi HD47780 compatible. This probably has nothing to do with what I'm trying to do but anyway, just for future reference :wink:

That 10k on the backlight is your problem. You should be able to feed it a straight 5v if you just want to see it light up. I have the same display and was disappointed to find the backlight is the standard yellow/green :cry:

Interesting. I've noticed that on Page 4 of that PDF they've got pin 3 and 4 listed as VSS and VDD respectively...but it's definitely the other way around. How did you have it wired up?

Oh, and you're spot on with the 10k resistor. I was too scared to run it with nothing...dunno what I'm doing really.

So why is it green when it's meant to be amber (orange)? Makes no sense at all...

Is the 'DI' pin in this schematic: Arduino Playground - HomePage the same pin as the RS pin on my orange come green LCD?

[edit]Yes it is[/edit]

ladyada did a decently thorough LCD guide (parallel interface)
i just ordered this.

post your discoveries cause i'm sure i'll need help on wiring this thing (although the LCD library seemed very simple...)

Okay. I am making progress.

I have just learnt the hard way that VDD = Positive Supply Voltage and VSS = Negative Supply Voltage. Bing bong. I'm an idiot! I've never come across that before and for no real reason assumed that VSS was +5V and VDD was GND. Boy, was I wrong! Oh well, I guess you've got to learn somehow... :-[

So now I'm getting some action out of the display.

Now all I've gotta do is figure out how to edit the LCD 4-bit library so I can move the pins.

@thefatmoop: Once I get it working, I'll post all the details here.

Got it sorted out. With this particular LCD, I connected its pins (as seen on page 4 of their data sheet) to the pins on my Arduino, as follows:

LCD Pin 01: +5V (LED+)
LCD Pin 02: GND (LED-)
LCD Pin 03: N/C (VSS)
LCD Pin 04: +5V (VDD)
LCD Pin 05: GND (V0)
LCD Pin 06: Pin 9 (RS)
LCD Pin 07: GND (RW) ... tied to GND because I don't want to read from the screen
LCD Pin 08: Pin 4 (E) .. E = Enable
LCD Pin 09: N/C (DB0)
LCD Pin 10: N/C (DB1)
LCD Pin 11: N/C (DB2)
LCD Pin 12: N/C (DB3)
LCD Pin 13: Pin 5 (DB4)
LCD Pin 14: Pin 6 (DB5)
LCD Pin 15: Pin 7 (DB6)
LCD Pin 16: Pin 8 (DB7)

The easiest way to see how you went with it is to open the 'HelloWorld' LiquidCrystal example. I made the following changes:

// LiquidCrystal display with:
// rs on pin 9
// rw is going to ground, so I'll put -1 so it doesn't try to use a real pin
// enable on pin 5
// d0, d1, d2, d3 on pins 5, 6, 7, 8
LiquidCrystal lcd(9, -1, 4, 5, 6, 7, 8);

The LiquidCrystal library is good but lacking some functionality, so I downloaded and extracted the LCD4Bit library (Arduino Playground - LCD4BitLibrary), then deleted the 'LCD4Bit.o' file from my '%arduino_install_dir%\hardware\libraries\LCD4Bit' directory. We need to delete this file because it'll be recompiled when we Upload to the Arduino...after we make the following edits to LCD4Bit.cpp:

// --------- PINS -------------------------------------
//is the RW pin of the LCD under our control?  If we're only ever going to write to the LCD, we can use one less microcontroller pin, and just tie the LCD pin to the necessary signal, high or low.
//this stops us sending signals to the RW pin if it isn't being used.
int USING_RW = false;

//RS, RW and Enable can be set to whatever you like
int RS = 9;
int RW = 10;  // Doesn't matter what's here because we're not USING_RW
int Enable = 4;
//DB should be an unseparated group of pins  - because of lazy coding in pushNibble()
int DB[] = {5, 6, 7, 8};  //wire these to DB4~7 on LCD.

And then in the LCD4BitExample sketch, all we need to change are this parameter to tell it we have 2 lines:

//create object to control an LCD.  
//number of lines in display=2
LCD4Bit lcd = LCD4Bit(2);

And then lower down in the void loop(), we uncomment this section:

  lcd.cursorTo(2, 0);  //line=2, x=0.
  lcd.printIn("Score: 6/7");
  delay(1000);

And it's all hunky dory! Thanks to all who helped.

Problem solved. dusting off my hands

Cheers,
Scott