PDA

View Full Version : serin timout not going to correct lable



l_gaminde
- 7th May 2013, 22:58
below is a serin2 statement that seems to start back at version rather than go to die is there something I'm missing


VERSION:
B = 1
GOSUB FLASH
PAUSE 500
B = 1
GOSUB FLASH
PAUSE 500
B = 3
GOSUB FLASH
PAUSE 500
LOW PORTA.5
GOTO UNIT_TYPE

Die:
PAUSE 2000
B = 5
GOSUB FLASH
PAUSE 1000
B = 5
GOSUB FLASH
PAUSE 1000
LOW PORTA.5
END

unit_type:
FOR Z = 1 TO 16
SERIN2 PORTA.1,16468,1000, Die,[HEX1 X0(Z)] 'GET BYTE 1 DATA
SEROUT2 PORTA.0,16468,[HEX1 X0(Z)] 'SEND BACK BYTE 1 ECHO
NEXT Z

timmers
- 7th May 2013, 23:46
Is the data input line (RX) idling low (9600 baud, inverted)? If not then then it will never time out!