Timeout only works for a noise free line in the idle state. If the line is in the opposite state timeout is skipped. Likewise if the line has noise, that will be seen as data and never get to the end of the timeout period.
HTH
BrianT
Timeout only works for a noise free line in the idle state. If the line is in the opposite state timeout is skipped. Likewise if the line has noise, that will be seen as data and never get to the end of the timeout period.
HTH
BrianT
Thanks a lot BrianT.
This is exactly what I was searching for .
Regards,
Ambrogio
Hi, BrianT:
probably you will be able to help me on this item:
I wrote a small program that reads some bytes of data coming from a radio receiver module. I do not want that the receiver program gets stuck in case the transmitter goes off for some reason. The receiver program is this :
SERIN PORTB.0,N1200,["COUNT"],W
SERIN PORTB.0,N1200,["ST0"],S_T.BYTE0
SERIN PORTB.0,N1200,["ST1"],S_T.BYTE1
SERIN PORTB.0,N1200,["SRH0"],S_RH.BYTE0
SERIN PORTB.0,N1200,["SRH1"],S_RH.BYTE1
SERIN PORTB.0,N1200,["WIND"],WND
SERIN PORTB.0,N1200,["IRR0"],IRR.BYTE0
SERIN PORTB.0,N1200,["IRR1"],IRR.BYTE1
SERIN PORTB.0,N1200,["VBAT0"],V_BATT.BYTE0
SERIN PORTB.0,N1200,["VBAT1"],V_BATT.BYTE1
If the transmitter goes off then the receiver locks up waiting for the "STRING". How could I overcome this problem ?
Thanks a lot for any help on the matter.
Regards,
Ambrogio
Bruce gave us a work around for this problem.
http://www.picbasic.co.uk/forum/showthread.php?t=12554
Dave
Always wear safety glasses while programming.
Bookmarks