I think Atmel uses some misleading terminology in their datasheets. At least in the ones I have for the Atmegaxx9 chips. I don't mean to be nit picking here. I think the use of misleading terminology makes it much more difficult to understand. I could be wrong in thinking the terminology is bad. If so, please correct me. If not, I would like to suggest to Atmel that they fix it.
In trying to understand the USART baud rate generator, I keep stumbling over something Atmel calls fosc.
They define it twice.
On page 172 it is defined this way:
fosc ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ XTAL pin frequency (System Clock)
And on page 173 it is defined this way:
fosc ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦System Oscillator clock frequency.
It is used to calculate the UBRR value this way:
UBRR = fosc/(16 * baud) -1
I suppose it's nice that fosc is defined twice. I think it would be better if it was defined the same way both times. And it would be totally awesome if it was defined correctly. :)
The problem is that fosc is not an oscillator frequency and has nothing to do with XTAL. Unless I'm mistaken, it is the System Clock frequency. In my case this is the rc oscillator frequency divided by the clock prescale. And the only XTAL I have is a watch crystal and has nothing to do with the USART. I need to use the rc oscillator frequency divided by the clock prescale in the formula where fosc appears.
I think it would be much better if Atmel replaced fosc with something like fsysclk and defined it this way:
fsysclk ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦System clock frequency.
Or do you think that would be way too simple? :)