PDA

View Full Version : 4X20 TRULY LCD PPB lines 3 & 4



earltyso
- 6th January 2007, 18:54
Hey there PIC masters of the Universe,
I have been programming in PicProBasic for a few years now and have never messed with LCD's in my projects until now. OK so dumb question...., but how do I write to lines 3 and 4 of my 4x20 display? I would also like to learn how to make use of my nifty graffic character positions. Any help would be very appreciated. My simple-sample code is below.

INCLUDE "modedefs.bas"
DEFINE OSC 12
CMCON = 7
TRISB=255
switch1 VAR PORTB.1
switch2 VAR PORTB.2

Pause 1000
loop:
Pause 19



LCDOut 254,1
LCDOut "I TYSON BOY GENIOUS"
LCDOut 254,257'........... 257 IS NOT A VALID CURSOR POSITION HERE
LCDOut "BOW DOWN TO ME"
Pause 11

IF switch1 = 0 Then message1
IF switch2 = 0 Then message2
GoTo loop

message1:
LCDOut 254,1
Pause 50
LCDOut 254, 130
LCDOut "HEY THERE USER!!!"
Pause 1000

GoTo loop

message2:
LCDOut 254,1
Pause 50
LCDOut "WHY DON'T YOU"
LCDOut 254, 197
LCDOut "TRY AGAIN?"
Pause 1000

GoTo loop

End

skimask
- 6th January 2007, 20:42
Hey there PIC masters of the Universe,
I have been programming in PicProBasic for a few years now and have never messed with LCD's in my projects until now. OK so dumb question...., but how do I write to lines 3 and 4 of my 4x20 display? I would also like to learn how to make use of my nifty graffic character positions. Any help would be very appreciated. My simple-sample code is below.

End

Standard parallel input 4x20 LCD?
See section 5.39 of the PBP manual, page 94.

Darrel Taylor
- 6th January 2007, 23:26
I would also like to learn how to make use of my nifty graffic character positions.

Custom Character Generator
http://www.picbasic.co.uk/forum/showthread.php?t=2598
<br>

Archangel
- 7th January 2007, 02:30
LCDOUT . . . 254,128, "line 1"
" " 254,192, "line 2"
" " 254,148, "line 3"
" " 254,212, "line 4"


See post 2

earltyso
- 7th January 2007, 04:38
thanks for the code and generator, i am still working on the graphics. Does anyone know about additional manuals for PPB on LCD's?

mister_e
- 7th January 2007, 09:11
Nope, just this forum and experience..