View Full Version : character lcd 4 lines
jojokatada
- 1st February 2005, 06:10
lcd 4 line
hi anybody could help me how to display a 4 line character lcd.
sample code
main:
pause 1
lcdout $fe,1," Hello world", $fe,c0," hello again" ,fe,94,"welcome" fe,d4,"thank you"
goto main
end
Dwayne
- 1st February 2005, 15:17
Hello Jojo,
Chances are, you have two enable lines... one for the top 2 lines and one for the bottom two lines..
Do a search on LCD in this forum... here is a example of a search
http://www.picbasic.co.uk/forum/showthread.php?s=&threadid=1110&highlight=LCD%2A
Dwayne
mister_e
- 1st February 2005, 17:22
OR you forget to include
DEFINE LCD_LINES 4
Also try to increase you start up delay to 1 second.
is your LCD display something??? at least on the 2 first line.
I agree with DWAYNE, your LCD probably have 2 enable line if it's a 4X40 one.
jojokatada
- 4th February 2005, 05:50
hi thank for help
i am using 4x20 lcd
mister_e
- 4th February 2005, 15:35
It will be hard for us if you don't provide any info of your hardware connection, crystal speed and the PIC you're using.
Let's assume you use the same connection in the PBP manual.
Usually 4X20 LCD don't have 2 enable line. BUT some will need to place the 4 unused data bit to ground
Try with this snippet and let us know.
DEFINE OSC 4 ' Using 4 MHZ crystal
DEFINE LCD_LINES 4 ' Using a 4 lines LCD
pause 1000 ' wait LCD start-up delay
'
' P.S.: it can be higher or lower depending of
' the model you're using
Start:
lcdout $fe, 1,"Line 1",_
$fe,$c0,"Line 2",_
$fe,$94,"Line 3",_
$fe,$d4,"Line 4"
Here:
goto here
this one should work.
Powered by vBulletin® Version 4.1.7 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.