Flow Control With Serial Data in
DGiudici
Posts: 10
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.
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
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
·· 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
http://www.parallax.com/detail.asp?product_id=29120
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax