PDA

View Full Version : Serin



jonas2
- 3rd June 2006, 09:37
Hello
I want that the program has patience 20 seconds, if no data received, then it will write the data,

Star: HIGH PORTB.7
HIGH PORTA.3 'activation
SERIN PORTA.2, T9600,20000, safe1, [“SYN”], code [0]
GOTO safe

safe1: code [0] = 12
code [1] = 12

safe: LOW PORTA.3
FOR I = 0 TO 1
LOOKUP2 codes [I], [48,49,50,51,52,53,54,55,56,57,42,35,45], datatx
code [I] = datatx
next I
Thank you

Ioannis
- 3rd June 2006, 12:38
I think you should set/reset somewhere the code [0] and code [1] to other value, say 0. After a failure on Serin they will always hold 12.

Ioannis

mister_e
- 3rd June 2006, 17:45
http://www.picbasic.co.uk/forum/showthread.php?t=1944&highlight=idle+state

jonas2
- 6th June 2006, 12:38
Hello

I modified this manner, and times it jump and of the times not
Timeout con 20000

star: serin PORTA.2, T9600, timeout, save1, [“SYN”], code [0], code [1]
TOGGLE 7
GOTO save
Thank you

mister_e
- 6th June 2006, 13:11
PIC# ?
Schematic ?