Joined: 22 Nov 2004 Posts: 2 Location: İstanbul
Automatic baud rate and data direction dedection
Posted: Mon Nov 29, 2004 7:51 am
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. [color=blue][/color
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Mon Nov 29, 2004 11:23 am
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.
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