I want to use the code below but instead of using the high part of port B (B.4-B.7), I want to use the low part (B.0-B.3) and for RS=B.4 and E=B.5.
How should I do this?
How should I do this?
Code:
dirsB = $FF
symbol Counter = b55
symbol chr = b54
'LCD
symbol RSCMDmask = %00000000 'select Command register
symbol RSDATmask = %00000100 'select Data register
symbol Line1 = $80 '1ST Line address
symbol Line2 = $C0 '2bd line address
symbol En = B.3
symbol rsbit = b53
'initialize LCD
eeprom 0, ($33, $32, $28, $0C, $06)
pause 500
for counter = 0 to 5
read counter, Chr
gosub SendCmdLCD
pause 300
next counter
Main:
chr = "T"
GOSUB SendDataLCD
chr = "E"
GOSUB SendDataLCD
chr = "S"
GOSUB SendDataLCD
chr = "T"
GOSUB SendDataLCD
goto Main
'LCD Routines
SendCmdLCD:
RSbit = RSCMDmask
SendDataLCD:
pinsB = chr & %11110000 | rsbit
pulsout En, 2
pinsB = chr * %00010000 | rsbit
pulsout En, 2
rsbit = RSDATmask
return