ATtiny20 Atmel Corporation, ATtiny20 Datasheet - Page 148

no-image

ATtiny20

Manufacturer Part Number
ATtiny20
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATtiny20

Flash (kbytes)
2 Kbytes
Pin Count
14
Max. Operating Frequency
12 MHz
Cpu
8-bit AVR
# Of Touch Channels
5
Hardware Qtouch Acquisition
Yes
Max I/o Pins
12
Ext Interrupts
12
Usb Speed
No
Usb Interface
No
Spi
1
Twi (i2c)
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
Yes
Crypto Engine
No
Sram (kbytes)
0.12
Self Program Memory
NO
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 85
I/o Supply Class
1.8 to 5.5
Operating Voltage (vcc)
1.8 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
2
Output Compare Channels
4
Input Capture Channels
1
Pwm Channels
3
32khz Rtc
No
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATtiny20-CCU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATtiny20-CCUR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATtiny20-MMHR
Manufacturer:
ATMEL
Quantity:
20 000
Part Number:
ATtiny20-SSU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATtiny20-XU
Manufacturer:
Atmel
Quantity:
904
17.5.3
148
ATtiny20
TWSSRA – TWI Slave Status Register A
• Bits 1:0 – TWCMD[1:0]: TWI Command
Writing these bits triggers the slave operation as defined by
operation depends on the TWI slave interrupt flags, TWDIF and TWASIF. The Acknowledge
Action is only executed when the slave receives data bytes or address byte from the master.
Table 17-2.
Writing the TWCMD bits will automatically release the SCL line and clear the TWCH and slave
interrupt flags.
TWAA and TWCMDn bits can be written at the same time. Acknowledge Action will then be exe-
cuted before the command is triggered.
The TWCMDn bits are strobed and always read zero.
• Bit 7 – TWDIF: TWI Data Interrupt Flag
This flag is set when a data byte has been successfully received, i.e. no bus errors or collisions
have occurred during the operation. When this flag is set the slave forces the SCL line low,
stretching the TWI clock period. The SCL line is released by clearing the interrupt flags.
Writing a one to this bit will clear the flag. This flag is also automatically cleared when writing a
valid command to the TWCMDn bits in TWSCRB.
• Bit 6 – TWASIF: TWI Address/Stop Interrupt Flag
This flag is set when the slave detects that a valid address has been received, or when a trans-
mit collision has been detected. When this flag is set the slave forces the SCL line low,
stretching the TWI clock period. The SCL line is released by clearing the interrupt flags.
Bit
0x2B
Read/Write
Initial Value
TWCMD[1:0]
00
01
10
11
TWI Slave Command
TWDIF
R/W
7
0
Used to complete transaction
Used in response to an Address Byte (TWASIF is set)
Used in response to a Data Byte (TWDIF is set)
TWDIR
X
X
0
1
0
1
0
1
TWASIF
R/W
6
0
Operation
No action
Reserved
Execute Acknowledge Action, then wait for any START (S/Sr) condition
Wait for any START (S/Sr) condition
Execute Acknowledge Action, then receive next byte
Execute Acknowledge Action, then set TWDIF
Execute Acknowledge Action, then wait for next byte
No action
TWCH
5
R
0
TWRA
R
4
0
TWC
R/W
3
0
Table 17-2 on page
TWBE
R/W
2
0
TWDIR
R/W
1
0
TWAS
R/W
148. The type of
0
0
8235B–AVR–04/11
TWSSRA

Related parts for ATtiny20