PDA

View Full Version : LCD; silly n00b problem...



No Name
- 24th February 2008, 21:20
Hi guys, long term lurker first time poster! :)

I have a silly problem...

I have salvaged an old 1x16 lcd from a phone, I am sure it is HD44780 compatible.

I am using a pic16f628, but when I try the program all I get is this;
http://i7.photobucket.com/albums/y271/bigrew/lcd.jpg

Any ideas?

TIA :)

Archangel
- 24th February 2008, 21:53
Hi TIA,
Looks like it is working, you need to add a contrast control.
http://www.picbasic.co.uk/forum/showthread.php?t=49

JS

No Name
- 24th February 2008, 22:06
I have a variable resistor for the contrast, all I get is those blocks though...

This is the code I have;

PAUSE 1000
LCDOUT $FE,1
LCDOUT "Hello World!"
STOP
END

Is that correct?

TIA - Thanks In Advance. :)

mackrackit
- 25th February 2008, 02:27
Show us the whole code. Might be something in the defines.

Ioannis
- 25th February 2008, 06:40
I would add and the circuit also.

Ioannis

No Name
- 25th February 2008, 08:18
Ah, I think that might be the problem, that is the whole code!

Ioannis
- 25th February 2008, 12:29
OK. And the connections? Are on port a any?

Ioannis

No Name
- 25th February 2008, 16:53
I found a major problem! Pin 5 of the PIC was going to +5v not ground! [/sheepish]

Now the display works, ish, but I am only getting the first 8 chars displayed...?

http://i7.photobucket.com/albums/y271/bigrew/sch.jpg

mat janssen
- 25th February 2008, 17:03
And don't forget this lcdisplay is a 2x8 and not a 1x16 line display.
So tell this in the beginning of your program when defining everything.

Ioannis
- 25th February 2008, 17:50
I hate to write this but Read The Fine Manual. Sorry but you really have to. This PIC has analog comparators that need to be set prior at the top of your program. Something like:

cmcon = 7 ' to disable portA comparators
vrcon = 0 'disable reference voltage output at porta.2

Also don't forget to use some DEFINE's (in capital letters!) to tell PBP what LCD you have and where it is connected (see at LCDout on page 95 of 3.04 manual version).

Ioannis