How to change baud rate with HSEROUT?


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default How to change baud rate with HSEROUT?

    I'm using HSEROUT to send data to Hyperterminal from a 12F1822 running at 16 mhz. It works fine with these parameters from the PBP3 Manual:

    'Define hserout parameters
    define hser_txsta 20h
    define hser_baud 2400
    define hser_spbrg 25
    define hser_spbrgh 0

    If I overwrite 2400 baud to anything else,e.g.,4800 or 9600, the circuit continues to transmit at 2400 baud. Why is this? Is 2400 a fixed baud rate for HSEROUT?

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: How to change baud rate with HSEROUT?

    Dick,

    First, the defines need to be uppercase.
    define HSER_BAUD 4800.
    Otherwise PBP will use the default value of 2400.

    You also have conflicting defines.

    define hser_baud 2400
    define hser_spbrg 25

    Those both specify the baud rate.
    Choose one or the other.

    I would recommend getting mister-e's PicMultiCalc. http://www.picbasic.co.uk/forum/cont....-PICMultiCalc
    Let it do the hard work for you.
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: How to change baud rate with HSEROUT?

    Darrel,

    Thanks,.... looks like I had MCSX's Editor Options highlighter set for "lower case" by mistake .... fixed now.

    HSEROUT now working at 9600 baud with these defines:

    'Define hserout parameters
    DEFINE HSER_TXSTA 20h
    DEFINE HSER_BAUD 9600

    Dick

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts