HSEROUT not working @ 40 MHz


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Just to satisfy your curiosity Mr E

    Code:
    DEFINE  HSER_BAUD 9600
    DEFINE  HSER_CLROERR 1
    DEFINE  HSER_RCSTA 90h
    DEFINE  HSER_TXSTA 20h

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    HEHE i was right... I post a SPBRH Calc on this forum to help to figure out.

    BTW here's a short explanation. Using the Calc @9600 baud with 40MHZ with TXSTA = $24 give a SPBRG of 255 with error % 1.725. If you decrease this value the error % increase, so increasing SPBRG will reduce the error %... as SPBRG is a Byte register, you can't or you'll be OUT OF RANGE
    Warning[202] c:\pbp\pbppic18.lib 7695: Argument out of range. Least significant bits used.
    This is where it's coming from

    NOW using SPBRG=20 @40MHZ 9600 bauds gives a SPBRG=64 and error % 0.16

    I'm Satisfied now
    Last edited by mister_e; - 14th September 2005 at 17:10.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Can you post a link to this Calc. This could come in handy in the future.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    here's the link for the download... on this forum
    http://www.picbasic.co.uk/forum/atta...tachmentid=316
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  2. HSEROUT and Commas, What? Help Me Understand
    By altech6983 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th July 2009, 19:12
  3. Need help multiplexing EUSART output
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 7th April 2008, 19:17
  4. help
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th February 2005, 20:42
  5. Need once your help one please
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th February 2005, 20:33

Members who have read this thread : 0

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