Shop OBEX P1 Docs P2 Docs Learn Events
Reading RTS pin with BS2 — Parallax Forums

Reading RTS pin with BS2

SumanSuman Posts: 19
edited 2007-08-07 07:55 in BASIC Stamp
I am trying to read the pulse on the RTS pin of the RS 232 using Basic stamp.

I'm planning to connect the RTS pin of the serial port to one of my basic stamp pin (that pin being an input pin, set by DIRS) and then reading the pulse (high or low) with INS.
I am not sure if INS command can be used to check the level (or status) of an input pin of BS2.

Can anybody help me...

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-07 03:11
    You need a serial resistor between the RTS signal and the Stamp pin (like 4.7K or 10K). Look at the section of the Stamp Basic manual on the SEROUT and SERIN commands.

    Please go through the "What's a Microcontroller?" tutorial. It discusses the use of input and output pins and gives programming examples. It can be downloaded from the Parallax website under the Stamps in Class menu item.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-08-07 07:55
    Suman -

    If you're trying to use RS-232 flow control, that's not the way to do it. Take Mike's suggestion, or at least consult the PBASIC Stamp Reference Manual, or the PBASIC Stamp Help file for details on how to use SERIN/SEROUT properly.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.