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/PAfter a repeated START condition (state 0x10) the 2-wire Serial Interface can access the sameSlave again, or a new Slave without transmitting a STOP condition. Repeated START enablesthe Master to switch between Slaves, Master Transmitter mode and Master Receiver mode withoutlosing control <strong>of</strong> the bus.Table 22-2.Status Code(TWSR)Prescaler Bitsare 00x080x100x180x200x280x300x38Status codes for Master Transmitter ModeStatus <strong>of</strong> the 2-wire Serial Busand 2-wire Serial InterfaceHardwareA START condition has beentransmittedA repeated START conditionhas been transmittedSLA+W has been transmitted;ACK has been receivedSLA+W has been transmitted;NOT ACK has been receivedData byte has been transmitted;ACK has been receivedData byte has been transmitted;NOT ACK has been receivedArbitration lost in SLA+W ordata bytesTo/from TWDRApplication S<strong>of</strong>tware ResponseTo TWCRSTA STO TWINTTWEANext Action Taken by TWI HardwareLoad SLA+W 0 0 1 X SLA+W will be transmitted;ACK or NOT ACK will be receivedLoad SLA+W orLoad SLA+RLoad data byte orNo TWDR action orNo TWDR action orNo TWDR actionLoad data byte orNo TWDR action orNo TWDR action orNo TWDR actionLoad data byte orNo TWDR action orNo TWDR action orNo TWDR actionLoad data byte orNo TWDR action orNo TWDR action orNo TWDR actionNo TWDR action orNo TWDR action000101010101010101010000110011001100110011111111111111111111XXXXXXXXXXXXXXXXXXXXSLA+W will be transmitted;ACK or NOT ACK will be receivedSLA+R will be transmitted;Logic will switch to Master Receiver modeData byte will be transmitted and ACK or NOT ACK willbe receivedRepeated START will be transmittedSTOP condition will be transmitted andTWSTO Flag will be resetSTOP condition followed by a START condition will betransmitted and TWSTO Flag will be resetData byte will be transmitted and ACK or NOT ACK willbe receivedRepeated START will be transmittedSTOP condition will be transmitted andTWSTO Flag will be resetSTOP condition followed by a START condition will betransmitted and TWSTO Flag will be resetData byte will be transmitted and ACK or NOT ACK willbe receivedRepeated START will be transmittedSTOP condition will be transmitted andTWSTO Flag will be resetSTOP condition followed by a START condition will betransmitted and TWSTO Flag will be resetData byte will be transmitted and ACK or NOT ACK willbe receivedRepeated START will be transmittedSTOP condition will be transmitted andTWSTO Flag will be resetSTOP condition followed by a START condition will betransmitted and TWSTO Flag will be reset2-wire Serial Bus will be released and not addressedSlave mode enteredA START condition will be transmitted when the busbecomes free8271D–AVR–05/11231

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

Saved successfully!

Ooh no, something went wrong!