SERIN from BS2
SteveD
Posts: 64
main:
TX_BYTE theTemp
TX_BYTE setTemp
TX_BYTE tHold
goto main
TX_BYTE:
· ·Flo = 1············ 'alert max 1483
·· ·Pause 1
···· ·· Temp1 = __PARAM1
···· ·· SEROUT Sio,baud,temp1
· ·Flo = 0
RETURN
I can send 3 bytes one right after another from the SX to the stamp using Jon's example code above.· It works great!
The code below does not work for me.· Should I be able to ably the same idea as above and have it work?·
main
·RX_TEMP setAcHi
·RX_TEMP setAcLo
GOTO MAIN
RX_TEMP:
·temp1 = __PARAM1
·· SERIN sio, baud, temp1
RETURN
This format works ok but it seems like the one above should work too.
main:
RX_TEMP
goto main
RX_TEMP:
SERIN sio, baud, setAcHi
SERIN sio, baud, setAcHI
RETURN
Thanks again
TX_BYTE theTemp
TX_BYTE setTemp
TX_BYTE tHold
goto main
TX_BYTE:
· ·Flo = 1············ 'alert max 1483
·· ·Pause 1
···· ·· Temp1 = __PARAM1
···· ·· SEROUT Sio,baud,temp1
· ·Flo = 0
RETURN
I can send 3 bytes one right after another from the SX to the stamp using Jon's example code above.· It works great!
The code below does not work for me.· Should I be able to ably the same idea as above and have it work?·
main
·RX_TEMP setAcHi
·RX_TEMP setAcLo
GOTO MAIN
RX_TEMP:
·temp1 = __PARAM1
·· SERIN sio, baud, temp1
RETURN
This format works ok but it seems like the one above should work too.
main:
RX_TEMP
goto main
RX_TEMP:
SERIN sio, baud, setAcHi
SERIN sio, baud, setAcHI
RETURN
Thanks again
Comments
In the example that doesn't work, it looks like you setting up to do a SEROUT but then you do a SERIN ?
For instance why would you do "temp1 = __PARAM1" before a SERIN that is going to change the value of temp1 ?
I think you want to do this:
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Forget about the past, plan for the future, and live for today.
·
THANKS!