Shop OBEX P1 Docs P2 Docs Learn Events
Changing DEBUG baud rate to 2400? — Parallax Forums

Changing DEBUG baud rate to 2400?

Ian MacoombIan Macoomb Posts: 6
edited 2008-05-26 17:21 in BASIC Stamp
Is there a quick and easy way to change the DEBUG baud rate of the BS2 to 2400 bps?

I'm using the DEBUG command to send ASCII text to a DTE device but it needs to be 2400 bps instead of 9600.· Is there a way to do this or do I need to use SERIN and SEROUT instead?
·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-05-26 16:37
    Ian,

    Everything you can do with DEBUG can be done with SEROUT and you’re not limited to 9600 bps. You should definitely use the SEROUT if you’re needing to talk to a device other than the DEBUG window in the BASIC Stamp Editor. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-05-26 17:06
    Namely:

    SEROUT 16, <baudmode for 2400 for your BS2>, [noparse][[/noparse]"Hi there!", CR]

    Replace the <baudmode... > with the actual baudmode for 2400 baud. It varies based on the BS2 model -- look it up under SEROUT.
    Pin 16 is the 'magic' number that routes the SEROUT to the existing programming port, which your PC is already connected to, and which the DEBUG statement would use.
  • Ian MacoombIan Macoomb Posts: 6
    edited 2008-05-26 17:21
    Thanks guys. I guess I'll have to read up on SEROUT and figure out how to use this. I just started using this stuff.
Sign In or Register to comment.