PDA

View Full Version : Serin2 Timeout, how it works?



Fossil
- 4th March 2004, 04:50
I have trouble using the timeout option of the SERIN2 command. Hope that anyone familar with this command can help me.

I have written a sample program below to tryout the command. If the command is correct, the LEDs should blink.

The LED is connected to PortA.0, Serial in pin is PortC.4

START: SERIN2 PORTC.4,188,50,LIGHT,[WAIT("TUV"),REC]
LIGHT: TOGGLE PORTA.0
GOTO START

I have tried it out on my chip but the LED doesn't blink. Have I used it the wrong way? The data sheets has an example of how to use the SERIN2 command and I followed it closely, my hardware works fine but it just doesn't work. Anyone can help?

Fossil
- 4th March 2004, 10:09
Sorry I understand now after doing more research. I now understand that timeout only occurs when the pin has constant low or high if there are noise on the pin or any change of state, the timeout will reset and therefore a timeout will never happen for my case. Cause I connected it to a RF receiver pin and there will be noise if there are no signals present. My small experiment wouldn't work too cause I used it on the same board and its still connected to the RF receiver. Thanks for reading guys.

I still welcome suggestions on how to go about the problem. But I guess it would be a hardware problem now and not the problem with the command. Many thanks for reading.