Did you also change the RX handler to receive only 1 byte at a time?
Yes I did But it doesn't work very well. A command must be sent twice or three times to be executed, while with the whole string method commands are all decoded and executed correctly at the first time. Very likely my code is not so efficient as the whole string.
Here the code used: (Where : RxBuffer VAR PIR1.5)
Code:
Getbytes:
A0=0
While RxBuffer=1
Hserin 100,ErrorFlag,[Rdata[A0]]
A0=A0+1
Wend
@ INT_RETURN
And, have you tried the XIN without the interrupts? Is XIN working at all?
Yes with "SERIN2/SEROUT2" did work, not with "HSERIN/HSEROUT". But as you can understand, I need to jump out from Xin loop when an X10 command is received via Xbee in order to service it with the Xout command.
Is the XIN supposed to be running continuously in a loop, or as a response to the 250 command?
Xin is supposed to continuouly scan the main for X10 commands coming in from the different sources capable to issue such a command. The incoming data will be used to update a memory area containing the status of various lamps and appliances (On/Off).
Al.
All progress began with an idea
Bookmarks