English
Language : 

ATTINY20_14 Datasheet, PDF (147/219 Pages) ATMEL Corporation – 8-bit AVR Microcontroller
17.5.6 TWSAM – TWI Slave Address Mask Register
Bit
0x29
Read/Write
Initial Value
7
6
5
4
3
2
1
0
TWSAM[7:1]
TWAE
TWSAM
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
0
0
0
0
0
0
0
0
z Bits 7:1 – TWSAM[7:1]: TWI Address Mask
These bits can act as a second address match register, or an address mask register, depending on the TWAE setting.
If TWAE is set to zero, TWSAM can be loaded with a 7-bit slave address mask. Each bit in TWSAM can mask (disable)
the corresponding address bit in the TWSA register. If the mask bit is one the address match between the incoming
address bit and the corresponding bit in TWSA is ignored. In other words, masked bits will always match.
If TWAE is set to one, TWSAM can be loaded with a second slave address in addition to the TWSA register. In this
mode, the slave will match on 2 unique addresses, one in TWSA and the other in TWSAM.
z Bit 0 – TWAE: TWI Address Enable
By default, this bit is zero and the TWSAM bits acts as an address mask to the TWSA register. If this bit is set to one, the
slave address match logic responds to the two unique addresses in TWSA and TWSAM.
ATtiny20 [DATASHEET]
Atmel-8235F-AVR-ATtiny20-Datasheet_09/2014
147