Hello,
Please help!
I'm an amateur.
I have hit a problem. I have to xbee units that I am trying to get communicating. when i only make one send and one receive it works, however, as soon as I try to send data back it causes the program to not respond anymore.
Here is a sample of the code I am using.
TX:
RX:
Thank you,
Temple.
Please help!
I'm an amateur.
I have hit a problem. I have to xbee units that I am trying to get communicating. when i only make one send and one receive it works, however, as soon as I try to send data back it causes the program to not respond anymore.
Here is a sample of the code I am using.
TX:
Code:
'TX unit
init: high 7
pause 100
main: let b0=10 'assign value 10 to b0
let b1=50 'assign value 50 to b1
serout 7,T2400,($55,$55,b0,b1) 'send to RX unit
pause 1000
serin 7,T2400,($55,$55),b5,b6 'RX unit sends value of 100 (b5) and 200 (b6)
debug
goto main
Code:
'RX unit
init: high 7
pause 100
main: serin 7,T2400,($55,$55),b0,b1 'receive value of b0 and b1 from TX unit
debug
if b0=10 then handshake 'if value data is received then assign value to b5 and b6
goto main
handshake:
let b5=100
let b6=200
serout 7,T2400,($55,$55,b5,b6) 'send value of b5 and b6 to Tx unit
pause 1000
goto main
Temple.