Shop OBEX P1 Docs P2 Docs Learn Events
BS2PE talking 9600bps — Parallax Forums

BS2PE talking 9600bps

YacoYaco Posts: 9
edited 2005-11-29 17:55 in BASIC Stamp
Dear forum:

Thanks to let me in, parallax, as we know bs2 .. is a great product.

To my question, I would like to communicate using a modem in 9600bp, as Scott Edwards wrote in the article "Modem Lets Stamp Access Global communication Network"· I am trying to use the same application but, instead of 2400bps, (that works real good), I would like to send communicate in 9600bps as he wrote in the article " the faster the rate the more fragile the link" I can`t even communicate in 9600bps.
Any code or idea·that can help me to do this??eyes.gif

I want to recibe data in/out a port (say port 1) and·take it ·the othet in/out (like port 16)·and viseversa·using 9600bps.roll.gif

Thank for your help

Yaco

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-29 15:52
    9600 baud is no problem for the BS2 family -- it's a matter of changing the baudmode parameter to match the BS2 module that you're using.· I've simplified my life by creating a template that includes all popular serial baud rates; the compiler will detect the module I have installed and use the correct parameter.· That template is attached.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-11-29 16:04
    The baud rate over the phone lines is determined by the settings of the two modems. With advanced modems, pay particular attention to the error checking and compression settings, that they match at both ends. If your modem has commands that allow the DCE and DTE rates to be locked, it can be helpful to do that. It should work.

    Even though you can send data from the BS2pe to the modem at 9600 baud or faster, the overall throughput will not attain 9600. That is because it takes the interpreter time to do its work. Packets of data that are sent within one SEROUT command will be sent without too much extra Stop time between bytes, but packets of bytes that must be retrieved or computed within a FOR:NEXT or DO:LOOP will be much slower.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • YacoYaco Posts: 9
    edited 2005-11-29 16:13
    Thanks Jon:

    very clever, I`ve seen that before, in some application with SERIN and SEROUT now, how does it (BS2) knows how to use 8-bit, no-parity, inverted, true and so on or the correct one , do I have to add that portion and that is all?

    Thanks
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-29 16:14
    You have to know what the device you're talking to wants -- then use the constants in that template to construct the correct baudmode value.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • YacoYaco Posts: 9
    edited 2005-11-29 17:55
    Thanks to all of ya it is working further I will be adding some more question

    Thanks again
Sign In or Register to comment.