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/PTable 22-4.Status Codes for Slave Receiver ModeStatus Code(TWSR)Prescaler Bitsare 00x600x680x700x780x800x880x900x980xA0Status <strong>of</strong> the 2-wire Serial Busand 2-wire Serial Interface HardwareOwn SLA+W has been received;ACK has been returnedArbitration lost in SLA+R/W asMaster; own SLA+W has beenreceived; ACK has been returnedGeneral call address has beenreceived; ACK has been returnedArbitration lost in SLA+R/W asMaster; General call address hasbeen received; ACK has beenreturnedPreviously addressed with ownSLA+W; data has been received;ACK has been returnedPreviously addressed with ownSLA+W; data has been received;NOT ACK has been returnedPreviously addressed withgeneral call; data has been received;ACK has been returnedPreviously addressed withgeneral call; data has beenreceived; NOT ACK has beenreturnedA STOP condition or repeatedSTART condition has beenreceived while still addressed asSlaveTo/from TWDRNo TWDR action orNo TWDR actionNo TWDR action orNo TWDR actionNo TWDR action orNo TWDR actionNo TWDR action orNo TWDR actionRead data byte orRead data byteRead data byte orRead data byte orRead data byte orRead data byteRead data byte orRead data byteRead data byte orRead data byte orRead data byte orRead data byteApplication S<strong>of</strong>tware ResponseTo TWCRSTA STO TWINTXXXXXXXXXX0011XXNo action 00011011000000000000000000000000111111111111111111111111TWEA010101010101010101010101Next Action Taken by TWI HardwareData byte will be received and NOT ACK will bereturnedData byte will be received and ACK will be returnedData byte will be received and NOT ACK will bereturnedData byte will be received and ACK will be returnedData byte will be received and NOT ACK will bereturnedData byte will be received and ACK will be returnedData byte will be received and NOT ACK will bereturnedData byte will be received and ACK will be returnedData byte will be received and NOT ACK will bereturnedData byte will be received and ACK will be returnedSwitched to the not addressed Slave mode;no recognition <strong>of</strong> own SLA or GCASwitched to the not addressed Slave mode;own SLA will be recognized;GCA will be recognized if TWGCE = “1”Switched to the not addressed Slave mode;no recognition <strong>of</strong> own SLA or GCA;a START condition will be transmitted when the busbecomes freeSwitched to the not addressed Slave mode;own SLA will be recognized;GCA will be recognized if TWGCE = “1”;a START condition will be transmitted when the busbecomes freeData byte will be received and NOT ACK will bereturnedData byte will be received and ACK will be returnedSwitched to the not addressed Slave mode;no recognition <strong>of</strong> own SLA or GCASwitched to the not addressed Slave mode;own SLA will be recognized;GCA will be recognized if TWGCE = “1”Switched to the not addressed Slave mode;no recognition <strong>of</strong> own SLA or GCA;a START condition will be transmitted when the busbecomes freeSwitched to the not addressed Slave mode;own SLA will be recognized;GCA will be recognized if TWGCE = “1”;a START condition will be transmitted when the busbecomes freeSwitched to the not addressed Slave mode;no recognition <strong>of</strong> own SLA or GCASwitched to the not addressed Slave mode;own SLA will be recognized;GCA will be recognized if TWGCE = “1”Switched to the not addressed Slave mode;no recognition <strong>of</strong> own SLA or GCA;a START condition will be transmitted when the busbecomes freeSwitched to the not addressed Slave mode;own SLA will be recognized;GCA will be recognized if TWGCE = “1”;a START condition will be transmitted when the busbecomes free2378271D–AVR–05/11

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

Saved successfully!

Ooh no, something went wrong!