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 20-14. Formats and States in the Master Receiver ModeMRSuccessfullreceptionfrom a slavereceiverS SLA R A DATA ADATAAP$08 $40 $50$58Next transferstarted with arepeated startconditionR SSLAR$10Not acknowledgereceived after theslave addressAPW$48Arbitration lost in slaveaddress or data byteA or AOther mastercontinuesAOther mastercontinuesMT$38$38Arbitration lost andaddressed as slaveAOther mastercontinues$68$78 $B0To correspondingstates in slave modeFrom master to slaveDATAAAny number of data bytesand their associated acknowledge bitsFrom slave to masternThis number (contained in TWSR) correspondsto a defined state of the Two-wire Serial Bus. Theprescaler bits are zero or masked to zero20.7.3 Slave Receiver ModeIn the Slave Receiver mode, a number of data bytes are received from a master transmitter (seeFigure 20-15). All the status codes mentioned in this section assume that the prescaler bits arezero or are masked to zero.Figure 20-15. Data Transfer in Slave Receiver ModeV CCDevice 1SLAVERECEIVERDevice 2MASTERTRANSMITTERDevice 3........ Device n R1 R2SDASCLTo initiate the Slave Receiver mode, TWAR and TWCR must be initialized as follows:TWAR TWA6 TWA5 TWA4 TWA3 TWA2 TWA1 TWA0 TWGCEValueDevice’s Own Slave Address8155C–AVR–02/11194

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

Saved successfully!

Ooh no, something went wrong!