View previous topic :: View next topic |
Author |
Message |
brantb
Joined: 23 Mar 2015 Posts: 18
|
Posted: Fri Mar 23, 2018 11:37 pm Post subject: Non-Standard Baud Rates Supported? |
|
|
Hi,
I think the answer to this question is "yes" ... but, I just want to double-check to be sure.
Assuming that I have total control of "both ends" (i.e., the transmitting device, and the receiving device), then there should not be a problem using a non-standard baud rate for communication between two MCU's - correct?
A lot of you might be wondering ... why would I want to do this? It is a good question. Here is why ...
In some cases, I have pre-built hardware which is already configured with 16MHz crystals (which happen to be in small, surface mount packages, and very difficult to unsolder/change). 16MHz is not one of the "magic" clock speeds which result in 0%-error, stable baud rates (especially not at higher speeds like 115K).
So, in cases where I have to live with a 16MHz clock, and I am communicating between two devices where I have total control over the firmware (BASCOM) at both ends, I am very tempted to just use 125K baud (instead of 115K). 125K works out nicely from 16MHz, and results in 0% timing error. Sure, it is not a "standard" baud rate, but do I really need to care?
Does BASCOM support non-standard baud rate values? And ... does anyone see an issue with this (other than the obvious, "you won't be able to hook up the devices to other standard stuff")?
Cheers!
Brant
(BASCOM-AVR version : 2.0.7.8 , Latest : 2.0.8.1 ) |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Sat Mar 24, 2018 2:05 am Post subject: |
|
|
As long as both ends use the same baud rate, it does not matter what it is. Bascom neither knows or cares. I have often done this, just to confuse people who want to meddle with gear. There are many non standard baud rates you can pick by directly writing to the AVR baud rate registers, and of course selecting odd crystals, like you are doing. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
brantb
Joined: 23 Mar 2015 Posts: 18
|
Posted: Tue Mar 27, 2018 7:13 pm Post subject: Non-Standard Baud Rates Supported? |
|
|
Many thanks, Adrian, for the sanity-check. As I said, I just wanted to make sure I wasn't too close to the trees to see the forest.
Next step will, of course, be bench/stress testing.
Cheers! |
|
Back to top |
|
|
|
|
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 You cannot attach files in this forum You cannot download files in this forum
|
|