>from the help line
>I basically need the board to always be waiting for commands from the computer
and then once it processes the command, the board returns back a string through
the serial port.
>< code below >
>what exactly am I doing wrong?
The bit-banged serial routines will only look for serial input when that routine
is running. In some cases you can either loop waiting for that input, in which
case your program will not be doing anything else. Sometimes you can coordinate
that by handshaking with the target device (your program then would control when
the serial input happens).
Or switch to use one of the UARTs which is hardware that will receive the serial
stream, and has interrupt driven software in the firmware that will buffer up to
256 bytes. So as long as your program can keep up with that it will work.
DIM command(5) as STRING
SERINtimeout = 500000
SELECT VAL (command)
DIM out(5) as STRING
Questions on UARTs, and serial communication
1 post • Page 1 of 1