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 CCS Technical Support

Automatic baud rate and data direction dedection

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



Joined: 22 Nov 2004
Posts: 2
Location: İstanbul

View user's profile Send private message Yahoo Messenger MSN Messenger

Automatic baud rate and data direction dedection
PostPosted: Mon Nov 29, 2004 7:51 am     Reply with quote

Hi. I have a problem. I think you help me to solve my problem. I want to design a RS-232 to RS-485 converter but I don't want to use RTS pin of RS-232 port so I have to develop an algorithm which dedects baud rate and data direction automatically. I couldnt find any document about an algorithm or code example which solves my problem. I am looking forward yor replies and advises. Thanks. Sad [color=blue][/color
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Mon Nov 29, 2004 9:37 am     Reply with quote

Auto baud detection is not a problem.

http://www.ccsinfo.com/forum/viewtopic.php?t=19306
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Nov 29, 2004 11:23 am     Reply with quote

Beware, reliable auto-baud is tough if there is any noise on the transmission line. If possible have the source send a training character like "U" to aquire the baud rate by.
Beyond that just measure the lenght of the bits to find the shortest repeatable plausable time.
Another approach is to try a fast rate and go slower and slower until you stop getting framing errors.
_________________
The search for better is endless. Instead simply find very good and get the job done.
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