PDA

View Full Version : Need help with 16x1 LCD



hinv
11-04-2010, 03:16 PM
Hi,

I am having trouble with getting my LCD module to display anything. I can write to it, and read it back, but I am unable to see anything on the display. I used Jon Williams article for the circuit here http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp2.pdf
If somebody knows what I am doing wrong to not get anything, even a cursor, on the screen, I would surely appreciate advice. BTW, I did try turning the pot back and forth.

Thanks,
Doug



con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000


obj
lcd : "jm_lcd4_ez"
ser : "FullDuplexSerial"

PUB Start | okay, inbyte

''Test Parallax Serial Terminal number entry and display.
ser.start(31, 30, 0, 9600)
''Start up lcd
ser.Str(String("initing lcd, "))
okay := lcd.init(0, 16, 1)
if okay
ser.Str(String("inited ok, "))
ser.Str(String("display on, "))
lcd.display(1)
lcd.cursor(2)
ser.Str(String("scrolling nuts, "))
lcd.scrollstr(1, 1, 8, 250, @nuts)

ser.Str(String(" repeat loop", 13))

inbyte := lcd.in
ser.Dec(inbyte)
ser.tx(inbyte)
lcd.moveto(4,1)
inbyte := lcd.in
ser.Dec(inbyte)
ser.tx(inbyte)
lcd.moveto(1,1)
inbyte := lcd.in
ser.Dec(inbyte)
ser.tx(inbyte)
ser.tx(13)
repeat


dat

nuts byte "AbCdEfGhIjKlMnOp", 0
volts byte " VOLTS ", 0

Leon
11-04-2010, 04:23 PM
Many LCDs work OK at 5V with the contrast pin grounded, but some need a negative supply on it. If it's powered from 3.3V, it will definitely need a negative supply. You could generate a negative supply from an output with, say, 1 kHz on it, and a voltage doubler using a couple of diodes and capacitors.

hinv
11-04-2010, 06:35 PM
Thanks Leon,

You aren't correct, but you pointed me to relook at my circuit, and I found out that I forgot to wire the wiper on my pot. It now works!

This is the second time I wired it up on my demo board. Could it be that I wired it wrong twice?
Oh well, all is good now!

Thanks,
Doug

BR
11-05-2010, 01:45 AM
I really like Jon's LCD driver, but hooking one of these 4-bit LCD displays up to a breadboard and getting all the connections right is a hassle...which is the reason I wrote this lcd emulator object:
http://obex.parallax.com/objects/643/