Shop OBEX P1 Docs P2 Docs Learn Events
Timeout in SERIN did not work out — Parallax Forums

Timeout in SERIN did not work out

msshmssh Posts: 2
edited 2008-10-06 08:28 in BASIC Stamp
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, [noparse][[/noparse]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.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-06 06:59
    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
  • msshmssh Posts: 2
    edited 2008-10-06 08:28
    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.
Sign In or Register to comment.