252
XMEGA B [DATASHEET]
8291B–AVR–01/2013
19.10 Register Description – TWI Slave
19.10.1 CTRLA
–
Control register A
Bit 7:6
–
INTLVL[1:0]: Interrupt Level
These bits select the interrupt level for the TWI master interrupt, as described in
“Interrupts and Programmable Multilevel
Interrupt Controller” on page 118
Bit 5
–
DIEN: Data Interrupt Enable
Setting the data interrupt enable (DIEN) bit enables the data interrupt when the data interrupt flag (DIF) in the STATUS
register is set. The INTLVL bits must be nonzero for the interrupt to be generated.
Bit 4
–
APIEN: Address/Stop Interrupt Enable
Setting the address/stop interrupt enable (APIEN) bit enables the address/stop interrupt when the address/stop interrupt
flag (APIF) in the STATUS register is set. The INTLVL bits must be nonzero for interrupt to be generated.
Bit 3
–
ENABLE: Enable TWI Slave
Setting this bit enables the TWI slave.
Bit 2
–
PIEN: Stop Interrupt Enable
Setting the this bit will cause APIF in the STATUS register to be set when a STOP condition is detected.
Bit 1
–
PMEN: Promiscuous Mode Enable
By setting the this bit, the slave address match logic responds to all received addresses. If this bit is cleared, the address
match logic uses the ADDR register to determine which address to recognize as its own address.
Bit 0
–
SMEN: Smart Mode Enable
This bit enables smart mode. When Smart mode is enabled, the acknowledge action, as set by the ACKACT bit in the
CTRLB register, is sent immediately after reading the DATA register.
19.10.2 CTRLB
–
Control register B
Bit 7:3
–
Reserved
These bits are unused and reserved for future use. For compatibility with future devices, always write these bits to zero
when this register is written.
Bit 2
–
ACKACT: Acknowledge Action
This bit defines the slave's acknowledge behavior after an address or data byte is received from the master. The
acknowledge action is executed when a command is written to the CMD bits. If the SMEN bit in the CTRLA register is
set, the acknowledge action is performed when the DATA register is read.
lists the acknowledge actions.
Bit
7
6
5
4
3
2
1
0
INTLVL[1:0]
DIEN
APIEN
ENABLE
PIEN
PMEN
SMEN
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Bit
7
6
5
4
3
2
1
0
–
–
–
–
–
ACKACT
CMD[1:0]
Read/Write
R
R
R
R
R
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Содержание XMEGA B
Страница 320: ...320 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 12 7 segments Character Table...
Страница 321: ...321 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 13 14 segments Character Table...
Страница 322: ...322 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 14 16 segments Character Table...
Страница 412: ...412 XMEGA B DATASHEET 8291B AVR 01 2013...
Страница 413: ...413 XMEGA B DATASHEET 8291B AVR 01 2013...
Страница 414: ...414 XMEGA B DATASHEET 8291B AVR 01 2013...