
134
ATmega8515(L)
2512A–AVR–04/02
Signaldescription:
txclk Transmitterclock. (InternalSignal)
rxclk Receiverbase clock. (InternalSignal)
xcki Input from XCK pin (internalSignal). Usedforsynchronousslave operation.
xcko Clock output to XCK pin (InternalSignal). Usedforsynchronous master
operation.
fosc XTALpin frequency (System Clock).
Internal Clock Generation –
The Baud Rate Generator
Internalclock generation is usedfor theasynchronous and the synchronous master
modes of operation. The description in thissection refers to Figure 64.
The USART Baud Rate Register(UBRR) and the down-counterconnected to it function
as a programmable prescaler orbaudrate generator.The down-counter, running at sys-
tem clock (fosc), isloadedwith the UBRR value each time the counterhascounted
downtozeroorwhen the UBRRL Register iswritten. A clock is generated each time the
counterreacheszero. Thisclock i s the baudrate generatorclock output
(= fosc/(UBRR+1)).Thetransmitterdivides the baudrate generatorclock output by 2, 8,
or 16depending on mode. The baudrate generator output is useddirectly by the
receiver’sclock anddata recovery units. However, the recovery units useastate
machine that uses 2, 8, or 16statesdependingonmode set by the state of the UMSEL,
U2X, andDDR_XCK bits.
Table 60 contains equationsforcalculating the baudrate (in bitspersecond) andfor
calculating the UBRR value for each modeof operation usinganinternally generated
clock source.
Note: 1. The baudrate isdefined to bethetransferrate in bit persecond (bps).
BAUD Baudrate (in bitspersecond, bps)
f
OSC
System Oscillatorclock frequency
UBRR Contents of the UBRRH andUBRRL Registers, (0-4095)
Some examples ofUBRR valuesforsome system clock frequencies are found in Table
68 (see page 156).
Table 60. EquationsforCalculating Baud Rate RegisterSetting
Operating Mode
Equation for Calculating
Baud Rate
(1)
Equation for Calculating
UBRR Value
AsynchronousNormal mode
(U2X=0)
AsynchronousDouble Speed
mode (U2X=1)
SynchronousMaster mode
BAUD
f
OSC
16 UBRR 1+()
---------------------------------------= UBRR
f
OSC
16BAUD
------------------------ 1–=
BAUD
f
OSC
8 UBRR 1+()
-----------------------------------= UBRR
f
OSC
8BAUD
-------------------- 1–=
BAUD
f
OSC
2 UBRR 1+()
-----------------------------------= UBRR
f
OSC
2BAUD
-------------------- 1–=
Kommentare zu diesen Handbüchern