12.07.2015 Views

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ATmega32A</strong>Figure 19-2.Clock Generation Logic, Block DiagramUBRRfoscU2XPrescalingDown-CounterUBRR+1/ 2/ 4 / 201OSCDDR_XCK01txclkXCKPinxckixckoSyncRegisterEdgeDetector01UMSELDDR_XCKUCPOL10rxclkSignal description:txclkrxclkxckixckofoscTransmitter clock (Internal Signal).Receiver base clock (Internal Signal).Input from XCK pin (Internal Signal). Used for synchronous slave operation.Clock output to XCK pin (Internal Signal). Used for synchronous masteroperation.XTAL pin frequency (System Clock).19.3.1 Internal Clock Generation – The Baud Rate GeneratorInternal clock generation is used for the asynchronous and the synchronous master modes ofoperation. The description in this section refers to Figure 19-2.The USART Baud Rate Register (UBRR) and the down-counter connected to it function as aprogrammable prescaler or baud rate generator. The down-counter, running at system clock(fosc), is loaded with the UBRR value each time the counter has counted down to zero or whenthe UBRRL Register is written. A clock is generated each time the counter reaches zero. Thisclock is the baud rate generator clock output (= fosc/(UBRR+1)). The Transmitter divides thebaud rate generator clock output by 2, 8 or 16 depending on mode. The baud rate generator outputis used directly by the receiver’s clock and data recovery units. However, the recovery unitsuse a state machine that uses 2, 8 or 16 states depending on mode set by the state of theUMSEL, U2X and DDR_XCK bits.Table 19-1 contains equations for calculating the baud rate (in bits per second) and for calculatingthe UBRR value for each mode of operation using an internally generated clock source.8155C–AVR–02/11150

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!