I am using the arduino + 4BitLCD library on a Powertip 1602-F LCD display.
The example supplied runs fine so no issues with wiring etc. However :
when I try to use lcd.cursorTo(line, pos) : the display just goes blank forever (until I reset the arduino)
when I try to init as a two-line display , the display just goes blank, even with the example code just writing to line 1 (i.e. it doesn't init properly ?)
Hi,
tried that now (standard library on Arduino 0012, using 4 bit wiring) but it doesn't init at all (stays blank). Unlike the 4bit library, this time I connected RW to a real pin (13) of the arduino as it seems to require that ?
Hi,
have you noticed, that you connect (in 4bitLCD) DB4-DB7 on LCD, and in the example it says you should connect DB0-3?
Well, this is a problem, because some manufacturers actualy name their pinout like so:
DB0
DB1
DB2
DB3
DB4 / DB0
DB5 / DB1
DB6 / DB2
DB7 / DB3
So no matter what library you use, you should connect the same (last 4) DB's
It worked fine for me. As for the picture: I user 220 Ohm resistors for DB's, and some pull down resistors, because I found this in a circuit of a working board. Don't know if any of this is reeeealy necessary, but I have destroyed two LCD's, don't know why, until I used this wireing.
For pin 3 it is for contrast and I used this resistors as I allready have an additional resistor soldered up my lcd (it is 100 Ohm between pins 3 and 5), so I don't know how will contrast look on your LCD, but you can try my way
p.s.: don't think pin 13 should be the problem, as R/W is always set to low, because we only Write on the lcd...
Forgot to add... I am using the library from the sample in arduino, and the second line is working, see the picture (arduino, fancy dressed up : )
The code goes like so:
lcd.print("first line");
lcd.setCursor(0,1); // "zero" caracter on "first" line, as the actual first line has a 0 index
lcd.print("second line");
command(0x28); // function set: 4 bits, 1 line, 5x8 dots
command(0x0C); // display control: turn display on, cursor off, no blinking
command(0x06); // entry mode set: increment automatically, display shift, right shift
Referring to page 49 of 65 of the Powertip datasheet and now it works mostly. Apparently it needs a different startup sequence ? (Though the 4BIT LCD library was working on 1 line only).
I will keep on reading the datasheet and posting to this topic for reference (other Powertip users ?).