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

datalogger baud rate

hsvkevinhsvkevin Posts: 16
edited 2008-06-17 04:59 in General Discussion
Anyone had any luck changing the baud rate on the datalogger from 9600 to something faster?


I defined these two baud rates

BaudA·· CON "T9600"
Baud·· CON "T19200"

and renamed these functions and changed their Baud to BaudA so I could get the inital commo in 9600 baud mode


····· SendStrA "fbd $9C8000" 'should be 19200 baud
····· SendCharA CR
····· RecvStrA

then used the send/rec functions with the 19200 baud, but it hangs up at the serial commo after the baud change.

Any ideas?


Thanks

Kevin

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-06-10 12:52
    Hi Kevin, the command is SBD not FBD

    If you call this subroutine in the initialization code and make it the first command you use with the Datalogger it should change the baud rate. After that any logger commands·must use 19200 as the baud

    SEROUT tx, T9600, "S"
    SEROUT tx, T9600, "B"
    SEROUT tx, T9600, "D"
    SEROUT tx, T9600, $9C
    SEROUT tx, T9600, $80
    SEROUT tx, T9600, $00
    SEROUT tx, T9600, $0D
    PAUSE 5000

    Jeff T.
  • hsvkevinhsvkevin Posts: 16
    edited 2008-06-10 13:48
    Thanks for the info. The Vinculum firmware doc must have a typo. (FBD) Not unheard of in such documents.
    I'll go try this now

    Thanks!
  • hsvkevinhsvkevin Posts: 16
    edited 2008-06-10 13:52
    It didn't have a typo, the example on page 7 just didn't apply

    thanks
  • hsvkevinhsvkevin Posts: 16
    edited 2008-06-10 13:56
    thanks Jeff. I think thats got it.
  • hsvkevinhsvkevin Posts: 16
    edited 2008-06-10 20:59
    Can someone tell me if I'm missing something obvious? when I set the baud rate, the program hangs at the RecvStr function. It is the only change I made, and it just doesn't work. Any ideas?





    Thanks,

    Kevin
  • JonnyMacJonnyMac Posts: 9,216
    edited 2008-06-11 01:37
    I don't have a datalogger to work with, but I will offer the attached program as it allows you to do buffered serial communications from 2400 to 38.4K. As your program grows this version may save you some code space versus a lot of SEROUT instructions.
  • hsvkevinhsvkevin Posts: 16
    edited 2008-06-11 11:18
    Thanks Jon. I'll see if I can port some of this and get this thing working.
  • pwillardpwillard Posts: 321
    edited 2008-06-16 23:05
    If you figure out a nice way to receive a string... please share.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    There's nothing like a new idea and a warm soldering iron.
  • JonnyMacJonnyMac Posts: 9,216
    edited 2008-06-17 04:59
    Receive a string or wait on a specific string? If the former, what is the terminating character? (0 or CR)
Sign In or Register to comment.