Can I make this cleaner? (works but its orrible!)
z=1:y=1
loop:
SERIN portb.7,t1200,1000,timeout,combuf(z)
z=z+1
if z<87 then no_time_out
timeout:
y=0 ' flag that a timeout has occured IE end of data stream
no_time_out:
if y>0 then loop
What would be better is
for z=1 to 90
SERIN portb.7,t1200,1000,timeout,combuf(z)
next
BUT the problem is I dont want to timeout 89 times if only 10 bytes is in the stream.
Is their no command to read the serial into the byte array without looping, I'm worried it may not be fast enough if running a 4mhz crystal, I have lowered incoming data to 1200 but its then a bit slow, I'm shocked my dirty code kept up.
Bookmarks