English
Language : 

SAM7S256_14 Datasheet, PDF (344/775 Pages) ATMEL Corporation – ARM-based Flash MCU
30.9.6 Read Write Flowcharts
The flowchart shown in Figure 30-31 on page 344 gives an example of read and write operations in Slave mode. A
polling or interrupt method can be used to check the status bits. The interrupt method requires that the interrupt
enable register (TWI_IER) be configured first.
Figure 30-31. Read Write Flowchart in Slave Mode
Set the SLAVE mode:
SADR + MSDIS + SVEN
Read Status Register
SVACC = 1 ?
EOSACC = 1 ?
TXCOMP = 1 ?
END
GACC = 1 ?
SVREAD = 0 ?
TXRDY= 1 ?
RXRDY= 0 ?
Write in TWI_THR
Read TWI_RHR
GENERAL CALL TREATMENT
Decoding of the
programming sequence
Prog seq
OK ?
Change SADR
SAM7S Series [DATASHEET]
6175M–ATARM–26-Oct-12
344