Shop OBEX P1 Docs P2 Docs Learn Events
Flow Control With Serial Data in — Parallax Forums

Flow Control With Serial Data in

DGiudiciDGiudici Posts: 10
edited 2005-10-03 14:25 in BASIC Stamp
I am programming an application in visual basic to send data to my stamp which it then stores in memory and at a later time can do a action based on the sent data.

To date I have been avoiding timing problems between the two by resorting to only sending a byte at a time, giving me around 255 different commands that my stamp will be able to act on. I find this a bit limiting and would like to expand.

So I read a bit more into the serin command and found talk about the flow control pin. I was wondering if this could be hooked up to the DTR pin on the serial cable to control the flow of data coming in to the Stamp?

I do not know where to find more information on how the DTR and the rest of the pins work, if anyone can provide me with a link or some suggestions that would be great.

So far sending one bit at a time has been working fine, but for expandablity of my project I would like to be able to handle more then one byte at a time.

Thank you for your help.

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2005-10-03 12:11
    You should be able to handle many bytes at a time, somewhat dependent on the serial speed.

    Check the helpfile under SERIN and SEROUT. There is a good example or two there that will help.

    For in-depth understanding of serial comm, see "Serial Port Complete" by Jan Axelson

    Tom Sisk
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-03 14:17
    Hello,

    ·· The DTR pin is not what you want to be using here.· Toggling DTR will reset the BASIC Stamp, which I'm sure is not your intended result.· You will need to use RTS/CTS flow control.· Again, it's a good idea to read up on the subject before implementing it.· The BASIC Stamp Manual and Help files also contain information from the Stamp side of things.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-03 14:25
    Have a look at our RS-232 DCE AppMod documentation -- it shows how to do flow-control (with separate level-shifter, this does not work with the Stamp programming port).

    http://www.parallax.com/detail.asp?product_id=29120

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.