Shop OBEX P1 Docs P2 Docs Learn Events
SERIN / SEROUT Baudmode Parameter — Parallax Forums

SERIN / SEROUT Baudmode Parameter

Jon WilliamsJon Williams Posts: 6,491
edited 2004-07-26 00:22 in BASIC Stamp
Most of the troubles with SERIN and SEROUT come from incorrectly specifying the baudmode parameter.· You can save yourself a lot trouble by taking advantage of the conditional compilation capabilities of the version 2.1 compiler.· Here's a bit of code that appears in my standard template file:

#SELECT $STAMP
· #CASE BS2, BS2E, BS2PE
··· T1200······ CON···· 813
··· T2400······ CON···· 396
··· T4800······ CON···· 188
··· T9600······ CON···· 84
··· T19K2······ CON···· 32
··· T38K4······ CON···· 6
· #CASE BS2SX, BS2P
··· T1200······ CON···· 2063
··· T2400······ CON···· 1021
··· T4800······ CON···· 500
··· T9600······ CON···· 240
··· T19K2······ CON···· 110
··· T38K4······ CON···· 45
#ENDSELECT

Inverted······· CON···· $4000
Open··········· CON···· $8000
Baud··········· CON···· T9600


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office

Comments

  • NewzedNewzed Posts: 2,503
    edited 2004-07-25 23:11
    Jon, what about the inverted modes?

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver

    4-digit LED
    http://hometown.aol.com/newzed/index.html
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-07-26 00:22
    It's all there. If, for example, you want to be inverted at 9600 baud you would do this:

    Baud··········· CON···· T9600 + Inverted

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