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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ATmega48A/PA/88A/PA/168A/PA/328/P22.5 Overview <strong>of</strong> the TWI ModuleThe TWI module is comprised <strong>of</strong> several submodules, as shown in Figure 22-9. All registersdrawn in a thick line are accessible through the AVR data bus.Figure 22-9.Overview <strong>of</strong> the TWI ModuleSCLSDASlew-rateControlSpikeFilterSlew-rateControlSpikeFilterBus Interface UnitBit Rate GeneratorSTART / STOPControlSpike SuppressionPrescalerArbitration detectionAddress/Data ShiftRegister (TWDR)AckBit Rate Register(TWBR)Address Match UnitControl UnitAddress Register(TWAR)Address ComparatorStatus Register(TWSR)State Machine andStatus controlControl Register(TWCR)TWI Unit22.5.1 SCL and SDA PinsThese pins interface the AVR TWI with the rest <strong>of</strong> the MCU system. The output drivers contain aslew-rate limiter in order to conform to the TWI specification. The input stages contain a spikesuppression unit removing spikes shorter than 50 ns. Note that the internal pull-ups in the AVRpads can be enabled by setting the PORT bits corresponding to the SCL and SDA pins, asexplained in the I/O Port section. The internal pull-ups can in some systems eliminate the needfor external ones.22.5.2 Bit Rate Generator UnitThis unit controls the period <strong>of</strong> SCL when operating in a Master mode. The SCL period is controlledby settings in the TWI Bit Rate Register (TWBR) and the Prescaler bits in the TWI StatusRegister (TWSR). Slave operation does not depend on Bit Rate or Prescaler settings, but theCPU clock frequency in the Slave must be at least 16 times higher than the SCL frequency. Note8271D–AVR–05/11223

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

Saved successfully!

Ooh no, something went wrong!