PDA

View Full Version : Timeout in SERIN did not work out



mssh
10-06-2008, 01:40 PM
Dear All,
I am new in using the SERIN and SEROUT commands. I am using a BS2 to establish a serial RS232 communication with an external serial radio modem. The communication is working fine at the beginning.
Then I am experimenting with the Timeout feature of the SERIN. What I did was without connecting the BS2 to the external radio modem (just power up and connect the BS2 to the PC serial port, no physical connection from the pin1 yet), I run the program with
SERIN 1, 16780, 2000, Nodata, [DEC Y]
DEBUG CLS, ? Y
Nodata :
DEBUG CLS, "time out"
The result was that at the debug screen, nothing being showed up even after 2 seconds.
Any idea ?
Thank you.

Phil Pilgrim (PhiPi)
10-06-2008, 02:59 PM
mssh said...
... no physical connection from the pin1 yet ...

Try a pulldown resistor (10K or so) on pin 1. You may be getting noise on it. The timeout counter is reset on any data seen on the pin, whether it's garbage or the digits that DEC is waiting for.

-Phil

mssh
10-06-2008, 04:28 PM
Thank you Phil. It is working now.
However, there is another puzzle, why must the ATN on the BS2 be pulled low then the program will function properly. By having no connection to the ATN, the SERIN program would not proceed well.