Serial+ IR LCD Interfacing

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:
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
RECEIVER:
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
(This is just main, init LCD and the rest works, by the way it uses Hippy's 2-wire protocol to interface with LCD)

But If I try to do this:
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
it doesnt work.
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:

George Sephton

Senior Member
The Idea was to have a a transmitter to control an LCD Screen. So the transmitter would send a 101 over IR and It would be received and look at the 101 and choose line 1. Then a string of text from the transmitter would be converted into numbers, sent one at a time, converted back to a letter and outputed so you could send LCD text over IR. Had quite a few problems but I dont have the IR components and Ive been testing it with serial, but im gonna wait for my components to arrived and start again because it's proving to be very difficult.
 
Top