Atmel Evaluation Kit AT91SAM9M10-G45-EK AT91SAM9M10-G45-EK Datenbogen
Produktcode
AT91SAM9M10-G45-EK
577
SAM9M10 [DATASHEET]
6355F–ATARM–12-Mar-13
32.10.6
Read Write Flowcharts
The flowchart shown in
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.
enable register (TWI_IER) be configured first.
Figure 32-32.
Read Write Flowchart in Slave Mode
Set the SLAVE mode:
SADR + MSDIS + SVEN
SVACC 1
TXCOMP 1
GACC 1
Decoding of the
programming se uence
Prog se
OK
Change SADR
SVREAD 0
Read Status Register
RXRDY 0
Read TWI RHR
TXRDY 1
EOSACC 1
Write in TWI THR
END
GENERAL CALL TREATMENT
No
No
No
No
No
No
No
No