11.07.2015 Views

ATMega chip full datasheet - UCSD Department of Physics

ATMega chip full datasheet - UCSD Department of Physics

ATMega chip full datasheet - UCSD Department of Physics

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.

ATmega48A/PA/88A/PA/168A/PA/328/PFigure 20-2 shows a block diagram <strong>of</strong> the clock generation logic.Figure 20-2.Clock Generation Logic, Block DiagramUBRRnfoscnU2XnPrescalingDown-CounterUBRRn+1/2/4 /201OSCDDR_XCKn01txclkXCKnPinxckixckoSyncRegisterEdgeDetector01UMSELnDDR_XCKnUCPOLn10rxclkSignal description:txclkrxclkxckixck<strong>of</strong>oscTransmitter 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).20.3.1 Internal Clock Generation – The Baud Rate GeneratorInternal clock generation is used for the asynchronous and the synchronous master modes <strong>of</strong>operation. The description in this section refers to Figure 20-2.The USART Baud Rate Register (UBRRn) and the down-counter connected to it function as aprogrammable prescaler or baud rate generator. The down-counter, running at system clock(f osc ), is loaded with the UBRRn value each time the counter has counted down to zero or whenthe UBRRnL Register is written. A clock is generated each time the counter reaches zero. Thisclock is the baud rate generator clock output (= f osc /(UBRRn+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 <strong>of</strong> theUMSELn, U2Xn and DDR_XCKn bits.8271D–AVR–05/11180

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

Saved successfully!

Ooh no, something went wrong!