Shop OBEX P1 Docs P2 Docs Learn Events
SERIN baud rate question — Parallax Forums

SERIN baud rate question

PHM102PHM102 Posts: 27
edited 2006-11-06 16:43 in BASIC Stamp
We are using this SERIN command to read in values from the Caller ID chip (Motorola MC145447p) however the baud rate given in our example seems to be wrong. Is there any means that we could use to determine the baud rate for the Caller ID. We always got the parity error from the SERIN command. Any help given would be greatly appreciated.

Our example serin command:
SERIN 6,813,6000,start1,[noparse][[/noparse]WAIT (128)]

P.S: The motorola chip is using a baud rate of 1200 with FSK asynchronous data

Regards,
Gavin
____________________________
Datasheet for the MC145447p

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-11-06 11:54
    Gavin -

    Which model Stamp are you using? Baudmode parameters can change, depending on which Stamp model you're using.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • PHM102PHM102 Posts: 27
    edited 2006-11-06 12:05
    oh ya sorry that i forgot to mention that we are actually using the BS2P40
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-11-06 12:46
    Gavin -

    Change your BAUDMODE parameter from 813 to 2063. A BAUDMODE of 813 will only work for 1200 baud on the BS-2, BS2e and BS2pe. The BS2-SX, and the BS2p-nn require 2063 for 1200 baud.

    To learn more about these various BAUDMODEs, check the PBASIC Reference Manual, or easier yet, consult the PBASIC Help File. Both contain the common BAUDMODEs listed by Stamp Model.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • PHM102PHM102 Posts: 27
    edited 2006-11-06 15:51
    Thanks a lot for the speedy yet informative reply... We will try changing the baud mode to 2063. Thanks a lot for your help Bruce. By the way what does it meant by parity error?
  • PHM102PHM102 Posts: 27
    edited 2006-11-06 16:38
    Pardon me for my ignorance, what does the '6000' from the command "SERIN 6,813,6000,start1,[noparse][[/noparse]WAIT (128)]" does?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-06 16:43
    Hello,
    ·
    ·· Parity error only applies if you enable Parity in your serial parameters on both ends.· It is rare that you would.· In your example SERIN command the 6000 specifies the number of mS before a timeout to the label following it (start1).· This is used to prevent the program from getting stuck at the SERIN command in the event no data comes in.· You can find these details in the Help File or BASIC Stamp Manual for the SERIN command.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.