English
Language : 

AT32AP7000_1 Datasheet, PDF (328/973 Pages) ATMEL Corporation – AVR32 32-bit Microcontroller
Figure 21-11. TWI Read in Master Mode
START
Set TWI clock:
CWGR = clock
Set the control register:
- Master enable
CR = MSEN
Set the Master Mode register:
- Device slave address
- Internal address size
- Transfer direction bit
Read ==> bit MREAD = 0
Internal address size = 0?
Yes
Start the transfer
CR = START
Read status register
RXRDY = 0?
Read RHR
AT32AP7000
Set the internal address
IADR = address
Yes
Data to read?
Yes
Stop the transfer
CR = STOP
Read status register
Yes
TXCOMP = 0?
END
32003M–AVR32–09/09
328