avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] Trouble with USART0 on ATmega644A


From: Yuriy Vlasenko
Subject: Re: [avr-chat] Trouble with USART0 on ATmega644A
Date: Fri, 7 Jan 2011 17:55:50 +0200

By the way, if the calculation is performed during the program run, I think this is better:

UBRR = (((F_CPU + (ULONG)UART_BAUD_RATE<<3)) >> 4) / UART_BAUD_RATE - 1;

Here we exclude 2 multiplications of LONG vars. 

2011/1/6 Bob Paddock <address@hidden>

May or may not be relevant to your case:

http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_wrong_baud_rate


reply via email to

[Prev in Thread] Current Thread [Next in Thread]