CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Auto baud detection algoritm

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mesuty
Guest







Auto baud detection algoritm
PostPosted: Sat Apr 23, 2005 2:20 am     Reply with quote

Hi friends;

Did somebody work before on automatic baudrate detection in PIC 18xxx series of MCUs.

My baudrate range is between 9600-115200 . What is the logic behind the automatic baud rate sensing.

Could somebody give me a light )

Thanks.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Sat Apr 23, 2005 8:10 am     Reply with quote

1) Calculating the edges time interval

http://ww1.microchip.com/downloads/en/AppNotes/00962a.pdf

2) Searching for a Bit pattern recognition:

http://www.iol.ie/~ecarroll/autobaud.html

Humberto
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Sat Apr 23, 2005 12:43 pm     Reply with quote

There is also a boot loader for the PIC on Mircochip's website that has an autobaud routine in it.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Sat Apr 23, 2005 12:51 pm     Reply with quote

Also if the PIC 18xxx you are using have hardware EUART you can use:

setup_uart(UART_AUTODETECT);

and will sets the UART baud rate to match.
I never use it.

Humberto
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: Auto baud detection algoritm
PostPosted: Tue Apr 26, 2005 3:47 pm     Reply with quote

mesuty wrote:
Hi friends;

Did somebody work before on automatic baudrate detection in PIC 18xxx series of MCUs.

My baudrate range is between 9600-115200 . What is the logic behind the automatic baud rate sensing.

Could somebody give me a light )

Thanks.


I posted an example that uses framing errors to know the baud rate is wrong. Starting at the highest baud rate and reducing the baud rate until the correct baud rate is found.
http://www.ccsinfo.com/forum/viewtopic.php?t=19306
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group