Autobaud Detection without USART 12F683 etc


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    How best to do this depends on how fast it changes, and how many characters you have to "throw away" to determine the correct baud rate.

    Two methods that come to mind:

    #1. Send a string of characters to the PIC (0x80) for example. Have the PIC sit in a loop and wait for the line to go TRUE (probably high, in your case). Then use PULSIN to measure the LOW period. Calculate the baud rate from that. You should have 7 low bits at 9600 (73uSec). Adjust the baud rate accordingly.

    #2. Send a known string of 4 or 5 characters. Start with SERIN2 baud rate value about 10% low. Increment until you receive the correct string . Store that value as baudrate #1. Keep incrementing until the checksum no longer matches Store that value as baudrate #2. Take the average of baudrate #1 and baudrate #2 and use that.
    Charles Linquist

  2. #2
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default

    12F1822 if you can wait until 10 Oct 2010.
    8 pin with USART.

    Bo

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thanks for the ideas? I like the 12f1822

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