Great explanation Henrik, thanks. Sounds absolutely logical. Unfortunately... still not working.
I've modified the code to look for 65 as you suggested (see below). When I type #65#49#49 (49 would be ASCII for the number 1 which I'd like loaded into each of the variables, though for this exercise it obviously doesn't matter much) I see A11 in the loopback window. But... nothing happening on the PIC. Hmmmm.....
Code:
INCLUDE "bs2defs.bas"relay VAR b3 'relay number storage variable
stat VAR b4 'relay status ON/OFF variable
serpin VAR porta.4 'serial input pin
trisa = %00010000
trisb = %00000000
High 0
pause 100
Low 0
Pause 200
High 0
Pause 300
Low 0
loop:
SERIN serpin,N2400,[65],relay,stat 'serial data in on PortA.4
High 0
pause 500
low 0
pause 200
high 0
pause 500
low 0
GOTO loop
Bookmarks