George Sephton
Senior Member
EDIT: IT HAS SUDDENELY STARTED WORKING, sorry for that.
Hi,
Ive finally got LCD Screen working and I need to make a protocol to interface an LCD Screen with a remote PICAXE. It will be done with IR but at the moment im using serial as my ir components haven't arrived. The idea is to have a number sent (as ir do numbers from 1-127) So 1-100 with be numbers/letters and symbols and 101-105 is a function. The functions are fine, ie I can send 101 and a LED will come on. But I need to write to the LCD, so 102 is select line 1 and the appropriate numbers will be send through and using lookup will convert to a character. But it doesnt seem to work.
This code work:
TRANSMITTER:
RECEIVER:Code:Main: serout 0,N2400,(101) pause 500 serout 0,N2400,(102) serout 0,N2400,(101) pause 500 serout 0,N2400,(101) pause 500 goto Main
(This is just main, init LCD and the rest works, by the way it uses Hippy's 2-wire protocol to interface with LCD)Code:Main: serin 3,N2400,letter if letter = 101 then toggle 2 elseif letter = 102 then outbyte = $80 gosub SendCmdByte For counter = 0 to 4 lookup counter, ("12345"), outbyte gosub SendDataByte next counter endif goto main
But If I try to do this:
it doesnt work.Code:Main: serin 3,N2400,letter if letter = 101 then toggle 2 elseif letter = 102 then outbyte = $80 gosub SendCmdByte elseif letter = 103 then For counter = 0 to 4 lookup counter, ("12345"), outbyte gosub SendDataByte next counter endif goto main
I want to say 102 to select top line then 103 to write, then i can move on to 102 or 103 to select Line 1 or 2 then write eah character but at them moment im looking at preprogrammed strings.
Thanks for any help,
George S.
Last edited: