Rainbow Electronics AT91CAP9S250A User Manual

Page 504

Advertising
background image

504

6264A–CAP–21-May-07

AT91CAP9S500A/AT91CAP9S250A

Figure 34-24. Read Access Ordered by a MASTER

Notes:

1. When SVACC is low, the state of SVREAD becomes irrelevant.

2. TXRDY is reset when data has been transmitted from TWI_THR to the shift register and set when this data has been

acknowledged or non acknowledged.

34.9.5.2

Write Operation

The write mode is defined as a data transmission from the master.

After a START or a REPEATED START, the decoding of the address starts. If the slave address
is decoded, SVACC is set and SVREAD indicates the direction of the transfer (SVREAD is low in
this case).

Until a STOP or REPEATED START condition is detected, TWI stores the received data in the
TWI_RHR register.

If a STOP condition or a REPEATED START + an address different from SADR is detected,
SVACC is reset.

Figure 34-25 on page 504

describes the Write operation.

Figure 34-25. Write Access Ordered by a Master

Notes:

1. When SVACC is low, the state of SVREAD becomes irrelevant.

2. RXRDY is set when data has been transmitted from the shift register to the TWI_RHR and reset when this data is read.

Write THR

Read RHR

SVREAD has to be taken into account only while SVACC is active

TWD

TXRDY

NACK

SVACC

SVREAD

EOSVACC

SADR

S

ADR

R

NA

R

A

DATA

A

A

DATA

NA

S/RS

DATA

NA

P/S/RS

SADR matches,

TWI answers with an ACK

SADR does not match,

TWI answers with a NACK

ACK/NACK from the Master

RXRDY

Read RHR

SVREAD has to be taken into account only while SVACC is active

TWD

SVACC

SVREAD

EOSVACC

SADR does not match,

TWI answers with a NACK

SADR

S

ADR

W

NA

W

A

DATA

A

A

DATA

NA S/RS

DATA

NA

P/S/RS

SADR matches,

TWI answers with an ACK

Advertising