Hser Baud Calculator


Closed Thread
Results 1 to 1 of 1
  1. #1
    carl_schell's Avatar
    carl_schell Guest

    Wink Hser Baud Calculator

    Hi all -

    I am in the middle of a project and got tired of having to calculate HSER_SPBRG values - so I created a calculator in excel to do so more easily. I tried to make it very straight forward.

    All you do is type in 3 inputs (in the yellow boxes)

    1.) Ocs. Speed ie: 4
    2.) HSER_BAUD ie: 9600
    3.) HSER_TXSTA ie: 24h

    and the HSER_SPBRG value is calculated as is your actual Baud Rate and the % Error.

    It checks to see if you are using High speed or Low speed because there are 2 different formulas.

    Hope it helps you. It is an excel spreadsheet - but the forum won't let me post it as that - so I am attaching it with the as a ".txt" - so you will have to change the ".txt" to ".xls"

    =>Right click on link - click "save target as" - change type to "all" - and rename extension to ".xls" - this should work -

    Best Regards,
    Carl

    -------------------------------------------------------
    PIC Development Boards with Bootloader!

    www.schellelectronics.com

    Free shipping worldwide

    e-mail: [email protected]
    -------------------------------------------------------


    P.S. -

    Here is a sample of my Define Statements:

    DEFINE OSC ' Sets your Oscilator Speed (in Mhz)

    DEFINE HSER_BAUD 9600 ' BAUD Rate ( Bits Per Second - BPS )
    DEFINE HSER_SPBRG 129 ' Baud Rate Generator Register Value (0 to 255!)
    DEFINE HSER_RCSTA 90h ' 90h Sets Serial Port Enable and Continuous Receive Enable
    DEFINE HSER_TXSTA 24h ' Sets Tx Enable and Either High ("24h") or Low ("20h") Speed
    Attached Files Attached Files
    Last edited by carl_schell; - 12th January 2005 at 20:50.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. PIC 18f1220 EUSART Baud Rate Cache Problem
    By wklose99 in forum Off Topic
    Replies: 3
    Last Post: - 15th April 2008, 00:39
  3. Auto Baud Rate Detection
    By mytekcontrols in forum Serial
    Replies: 10
    Last Post: - 31st October 2005, 02:17
  4. PIC12F675, accuracy of baud rate with Internal Oscillator
    By Chris Mayhew in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 22:41
  5. Baud Rate and Timing Calculator
    By picnaut in forum General
    Replies: 3
    Last Post: - 23rd January 2004, 16:48

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