16F777 at 115200 baud


Closed Thread
Results 1 to 10 of 10

Hybrid View

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

    Default 16F777 at 115200 baud

    I am trying to get a 16F777 with a 20MHz external oscillator running at 115200 baud. There is no parity and it is true. My math for those conditions gives me -11.

    I need to use the hardware serial port for something else and need to use SEROUT2.

    What should the mode actually be when a negative number is calculated?

    Thanks
    Last edited by cpayne; - 22nd March 2011 at 20:18. Reason: Fixed Typo

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: 16F777 at 115200 baud

    I don't use SERIN/SEROUT very often, but I think you should read the formula as :
    ((Fosc/4)/Bauds)-20 so, since you are using a 20 MHz external oscillator you should end up with 23. Try it and post the result, so I can verify if my understanding is correct.

    Cheers

    Al.
    All progress began with an idea

  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

    the forumula they have in the maual is (1000000/baud)-20, which results in -11. I tried 23 with no luck, or atlest the motor controller I was communicating with acts dumb. works fine with hyperterminal 8N1, 115k no flow control

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


    Did you find this post helpful? Yes | No

    Unhappy Re: 16F777 at 115200 baud

    this is what i come up with the varrious values to set the baud value
    No Parity, True Parity, True No Parity, Inverted Parity, Inverted
    115200 -11 8181 16373 24565


    I have tried all the values, except -11, which is what i need I am pretty sure...

    HSEROUT ["!M ", dec Motor_Val_R," ", dec Motor_Val_L, 13]'command motors ***THIS WORKS!!!!!!

    SEROUT2 portB.4, 23, ["!M ", dec Motor_Val_R," ", dec Motor_Val_L, 13]'command motors, this does not....

    I am snooping the packages, there is nothing when i run the serout2 line. the hserout2 works fine and looks fine on hyperterminal with the snooping...

    Any ideas, Unfortunatly I can not change the baud rate of the motor controller to something slower... Have to get 115k working and i can't use the hardware port for the final configuration...

  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

    You will not be able to run serout at more than about 19.2K baud with a 20Mhz Xtal

    But, you MAY be able use DEBUGOUT at that rate. I have done it at 40Mhz on an 18F part.
    Charles Linquist

  6. #6


    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

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