16F777 at 115200 baud


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default PIC at 115200 baud

    I routinely run 115,200 on a PIC18F4620 at 20 MHz.
    Works a treat. I always set char_pacing to 20 or more to give some more time for the receiving side to process the character.

    HTH
    BrianT

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: 16F777 at 115200 baud

    The forumula they have in the maual is (1000000/baud)-20, which results in -11.
    As Al pointed out (but didn't really spell out) the 1000000 comes from Fosc/4 and since you're running at 20MHz the formula becomes (5000000/115200) - 20 = 23. I don't know if 115200 "should" work at 20MHz but if you can't get it going try DEBUG instead.

    /Henrik.

  3. #3
    Join Date
    Aug 2005
    Location
    NC, USA
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Re: 16F777 at 115200 baud

    Thanks for all the help. I understand fosc/4, but i am not sure Serout2 or serin2 uses that. I define the osc speed up top. I have to use 10000000 to get 19200 or 38400 to work with no issue. the debug may work for outgoing, but eventually i will need incoming... I am currently laying out another board with a 2 UART chip since hserin and hserout work fine at 115k and a 20mhz osc, but i would really prefer to use my existing chip.

    -Charlie

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: 16F777 at 115200 baud

    OK, you're probably correct then, sounds a bit strange though.... Anyway, if DEBUG does indeed work for the output then DEBUGIN will most likely work for the input - as long as you don't need to change pin or baudrate at runtime.

    /Henrik.

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: 16F777 at 115200 baud

    Debug is much more "light weight", since the parameters are calculated at compile time, not every time the routine is called.

    It works fast in both directions.
    Charles Linquist

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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