it works, but when i do the example using lcd4bit... nogo (my lcd screen shows the test pattern when power is applied)
n your circuit (1): You must tie the LCD's R/W pin to ground. (This frees another arduino pin for you). See this forum post for more troubleshooting.
In your circuit (2): remove the 4 lower bits of the data bus between the arduino and the LCD. We only use DB4~7.
did step 1, already did step2
changed to appropriate pins on the library:
//RS, RW and Enable can be set to whatever you like
int RS = 12;
int RW = 11;
int Enable = 10;
//DB should be an unseparated group of pins - because of lazy coding in pushNibble()
int DB[] = {5, 4, 3, 2}; //wire these to DB4~7 on LCD.
//--------------------------------------------------------
//how many lines has the LCD? (don't change here - specify on calling constructor)
int g_num_lines = 4;
I downloaded the LCD4Bit library (http://www.arduino.cc/playground/Code/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:
//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;
good point on the file deletion. Yeah i made the changes and tried a few variations. The best i got with the lcd4bit library was a cursor that blinked around the screen (when it was supposed to be writing out fruits... etc)
using liquidcrystal:
I did notice that when i have a long printout such as
lcd.print("11111111111111111111222222222222222222223333333333333333333344444444444444444444");
line1 = 1
line2 = 3
line3 = 2
line4 = 4 (all 20chars long obviously)
yeah i checked them prob 10 times lol. umm yea i just will format coding to work with liquidcrystal, but this is odd. Also println on lcd doesn't work.
i think that this lcd is a little different than standards
I can't remember which LCD you said you've got. Are you sure it's HD44780 compliant? I suppose it since the liquidcrystal stuff works, well some of it anyway.
When you compile the LCD4Bit library, you don't happen to get this error, do you?
LCD4Bit.cpp: In member function 'void LCD4Bit::init()':
LCD4Bit.cpp:174: warning: suggest parentheses around + or - inside shift
Because I was just moving my LCD pins around on my Arduino, and obviously needed to recompile the LCD4Bit library to reflect these changes. It wasn't playing ball, so I thought...I'll download the LCD4Bit library again in case something has been corrupted during all my playing around. But then I realised, even the LiquidCrystal library isn't working - maybe I killed the LCD? At which point, I noticed a switched wire on a couple of the DB pins from Arduino to LCD. Half the problem solved.
Long story short, my LCD is now wired up correctly and the LiquidCrystal library is working. The real problem is this, when I compile LCD4Bit...I'm getting the error message above and the LCD just shows funny lines and special characters instead of "Hello World!" - which sounded just like what's happening to you.
So, do you get the above error when you tried to compile LCD4Bit? It has been working fine for me but I'm wondering if someone has updated the LCD4Bit library since I originally downloaded it and before you downloaded it.
Could be a coincedence? Seems possible to me. What do you think?
Ps. I found two sites on Google top ten results that say the S6A0069 is 100% compatible with the HD47780, so you'd think that you should be right in using both librarys.