Stamp Code:
'{$STAMP BS2sx}
'{$PBASIC 2.5}
'{$PORT COM1}
baudmode CON 240 'maybe 16624
instrg VAR Byte
instrg = 0
start:
SERIN 16,baudmode,[instrg]
SEROUT 16,baudmode,["got_it",CR]
GOTO start
The stamp waits to receive a byte and once it does, it should send the response string. Everything works when using the BS2 debug program and when using RS232 Hex Com Tool v4.0. When I run my labview program, it sends a one byte character to Com 1, a time delay then occurs, and the port is read (using the # of bytes at port function). The returned string is only one byte long, and it turns out to be the byte that I just sent to the port instead of the expected response string. Essentially, I'm reading exactly what I have just written.
I've tried using the smplserl example programs as well as example VI's from parallax, and I get the same results. I've tried modifying the BS2 program by commenting out the SERIN line, and when I read the port in labview, I receive a timeout error.
LabView 7.1
Win2k with Com 1 settings of:
Baudrate: 9600
data bits:8
parity: none
stop bits: 1
flow control: none