Client Control A
Bit7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
DIEN | APIEN | PIEN | PMEN | SMEN | ENABLE | ||
AccessR/W | R/W | R/W | R/W | R/W | R/W | ||
Reset0 | 0 | 0 | 0 | 0 | 0 |
Data Interrupt Enable
Writing this bit to ‘1
’ enables an interrupt on the Data
Interrupt Flag (DIF) from the Client Status (TWIn.SSTATUS) register.
A TWI client data interrupt will be generated only if this bit, the DIF flag, and
the Global Interrupt Enable (I) bit in the Status (CPU.SREG) register are all
‘1
’.
Address or Stop Interrupt Enable
Writing this bit to ‘1
’ enables an interrupt on the Address or
Stop Interrupt Flag (APIF) from the Client Status (TWIn.SSTATUS) register.
A TWI client address or stop interrupt will be generated only if this bit, the
APIF flag, and the Global Interrupt Enable (I) bit in the Status (CPU.SREG)
register are all ‘1
’.
1
’ for the APIF to be set on a Stop
condition.Stop Interrupt Enable
Writing this bit to ‘1
’ allows the Address or Stop Interrupt
Flag (APIF) in the Client Status (TWIn.SSTATUS) register to be set when a Stop
condition occurs. The main clock frequency must be at least four times the SCL
frequency to use this feature.
Permissive Mode Enable
If this bit is written to ‘1
’, the client address match logic
responds to all received addresses.
If this bit is written to ‘0
’, the address match logic uses the
Client Address (TWIn.SADDR) register to determine which address to recognize as
the client’s address.
Smart Mode Enable
Writing this bit to ‘1
’ enables the client Smart mode. When the
Smart mode is enabled, issuing a command by writing to the Command (SCMD) bit
field in the Client Control B (TWIn.SCTRLB) register or accessing the Client
Data (TWIn.SDATA) register resets the interrupt, and the operation continues. If
the Smart mode is disabled, the client always waits for a new client command
before continuing.
Enable TWI Client
Writing this bit to ‘1
’ enables the TWI client.