ok here is the whole code:
on the stamp:
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM1}
dat VAR Byte
DO
SEROUT 10, 396, ["blink"]
SERIN 10, 396, [WAIT("t"), dat]
DEBUG "data: ", DEC dat, CR
PAUSE 1000
LOOP
on the pic:
define OSC 20
INCLUDE "modedefs.bas"
S_in var PORTC.0
S_Out var PORTC.0
Led var PORTC.3
dat var byte
Main:
SerIn2 S_in,396,[dat]
gosub blink
SEROUT s_out, T2400,["1234t", dat]
pause 50
goto main
Blink:
high led
pause 10
low led
return
this code only returns me "data: 0" in my debugwindow, if i use the codeon my pic and remove the
SerIn2 S_in,396,[wait("k")]SERIN 10, 396, [WAIT("t"), dat]on my stamp it never blinks and it keeps waiting for that "k" the osc is an external 20 mhz crystal




Bookmarks