Datasheet

Figure 43-25. TWIHS Read Operation with Multiple Data Bytes with Alternative Command Mode with PEC
Start the transfer
TWIHS_CR = START
Read Status register
RXRDY = 1?
Last data to read ?
Read status register
TXCOMP = 1?
END
Yes
No
Yes
Read Receive Holding register (TWIHS_RHR)
No
Set the Control register:
TWIHS_CR = MSEN + SVDIS + SMBEN + ACMEN + PECEN
Set the Master Mode register:
- Device slave address
Set the Alternative Command Register:
- DATAL, DIR, PEC
BEGIN
Set TWIHS clock
(CLDIV, CHDIV, CKDIV) in TWIHS_CWGR
(Needed only once)
Yes
No
Read Status register
RXRDY = 1?
Yes
Read the received PEC:
Read Receive Holding register (TWIHS_RHR)
No
SAM E70/S70/V70/V71 Family
T
wo-wire Interface (TWIHS)
© 2019 Microchip T
echnology Inc.
Datasheet
DS60001527D-page 1066