I got an Arduino today and followed Lady Ada's guide on hooking an LCD screen up to it. The screens pinouts are different to the one she used, but I got the datasheet for mine and swapped them around to be correct.
The screen powers on, displays some boxes and the debug LED flashes like it's meant to, but nothing else happens. I added some serial outputs to the LCD4Bit example and the code is looping fine.
Does anyone have any idea what could be wrong? I also followed the way this guy hooked his up even though the pinouts are different and it didn't do anything differently. The two photos below are low quality pictures of my setup.
Never mind this thread, I got it working just now.
I took a look at the Liquid Crystal examples and reference and then wired it up with the 8bit interface. From what I can gather, I think I got mixed up somewhere with which pins I was actually using for the LCD4Bit one.
Ah well, it's all sorted now. Time to get back to work on my project!
Edit: After some playing around, I'm starting to get the idea that 4bit mode just doesn't work/exist for this LCD.
I forgot to mention in my post I had to modify the CPP file in the LCD4Bit directory (arduino/hardware/libraries/LCD4Bit is where mine is). Your post actually reminded me I looked at your datasheet, and it seems to be almost exactly the same LCD panel as mine, in fact its the same pin for pin. My datasheet is from sparkfun, like many people's. Anyway, i almost guarantee you can work with a 4bit interface with this modification.
//RS, RW and Enable can be set to whatever you like
int RS = 12;
int RW = 15;
int Enable = 11;
//DB should be an unseparated group of pins - because of lazy coding in pushNibble()
int DB[] = {2,3,4,5}; //wire these to DB4 ~7 on LCD.
is what I had to modify. I had to change the DB[] section to what pins i am using (I left 9 and 10 open for servo control later). Also, RS and E had to be set to correct values and RW set to a pin I don't use (even though its disabled in the code earlier, I don't like to leave it hanging). Once I modified the file, I had to delete the .o file which is in the directory where the .cpp file is, since that was created on initial compiling and has the old settings. SORRY for the confusion. :-[
I just hooked it up like yours is, deleted the .o file and it worked first go. Thanks for your help!
If you take a look at my pictures, there's a line or two of pixels missing from the first row. Sometimes they show up though, which is odd. Do you have any ideas as to what could be causing that?
a line or two of pixels missing from the first row
If you gently squeeze the LCD against the board, does the row flicker in and out? If so, you have a poor connection between LCD and printed circuit. It's usually done with a conductive elastomeric strip that gets sandwiched between LCD and PCB and held down by the metal bezel of the LCD.
Oops, I forgot to reply to this. Anachrocomputer, I did what you said and from what I can tell you're right about what's happening with my LCD. After some pressing they light up more often now and kick in after displaying some text for a little bit. Thanks for your help.
My project is coming along nicely and if all goes well I should have something releasable in a week or two (It's not really complex, I just procrastinate a lot). I uploaded a little video to show one of my friends here: - YouTube