Libretto
- 9th November 2004, 10:06
Hello there,
I am having problems with the 'serin' command. I have searched this and the MELabs forum about this problem. I have read about the timeout part of serin and the need for a pull down resistor etc...
At work, the line of code below has been used with no problems. (The preamble is correctly detected and the data stored).
Serin portc.7,N9600,["ZOM"],z,zc,f,fc
But when I try to use the timeout options, eg:
Serin portc.7,N9600,20,fail,["ZOM"],z,zc,f,fc
It appears the preamble is ignored, so the data is never recovered. Of course the timeout and fail routine works correctly. So somehow the timeout part conflicts with the preamble??
Any ideas? Suggestions welcome.
P.S.: Trying on 16F870 and PBP v2.43
I am having problems with the 'serin' command. I have searched this and the MELabs forum about this problem. I have read about the timeout part of serin and the need for a pull down resistor etc...
At work, the line of code below has been used with no problems. (The preamble is correctly detected and the data stored).
Serin portc.7,N9600,["ZOM"],z,zc,f,fc
But when I try to use the timeout options, eg:
Serin portc.7,N9600,20,fail,["ZOM"],z,zc,f,fc
It appears the preamble is ignored, so the data is never recovered. Of course the timeout and fail routine works correctly. So somehow the timeout part conflicts with the preamble??
Any ideas? Suggestions welcome.
P.S.: Trying on 16F870 and PBP v2.43