Hello
I'm trying to communicate using Nano serial port.
Baud rate 9600.
I noticed that the output pulse width is 105.25us instead of 104.16us, so I would like to adjust that. Could anyone tell me if I can use the UBRR register for this? How do I write the number 51 on it?
UBRR = 51;
Just curious.
Does it pose a problem?
1% error should not be a problem for UART communications.
51 would be the correct number for 8MHz, and should do 0.2% error.
Do you have an 8MHz Nano?
See WormFood's AVR Baud Rate Calculator Ver. 2.1.1
Thanks John it's pretty simple
Actually it's no problem. The fact is that I cannot establish communication and I thought that this difference could cause some problem.
Thank you westfw. Really this difference is not to interfere. I agree with you.
I'm not using Nano itself, but the Nano's microcontroller with an internal clock of 8MHz.
The Wormfood website is a good tool to use.
Hello guys.
You asked if the difference between 104.1us and 105.4us makes a difference and I replied that it doesn't, but I'm already starting to believe that it does. Because of this, I tried writing 51 to the UBRR register, but it didn't make any difference. So I reduced it to 50 and the infamous 105.4us remains unchanged. I'm thinking of calibrating the internal clock to 8MHz, but I don't understand why the UBRR register isn't working. Any idea?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.