ATtiny20 Atmel Corporation, ATtiny20 Datasheet - Page 49

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
10.2.7
10.3
8235B–AVR–04/11
Alternate Port Functions
Program Example
The following code example shows how to set port B pin 0 high, pin 1 low, and define the port
pins from 2 to 3 as input with a pull-up assigned to port pin 2. The resulting pin values are read
back again, but as previously discussed, a nop instruction is included to be able to read back the
value recently assigned to some of the pins.
Note:
Most port pins have alternate functions in addition to being general digital I/Os. In
below is shown how the port pin control signals from the simplified
be overridden by alternate functions.
Assembly Code Example
...
; Define pull-ups and set outputs high
; Define directions for port pins
ldi
ldi
ldi
out
out
out
; Insert nop for synchronization
nop
; Read port pins
in
...
See
“Code Examples” on page
r16,(1<<PUEB2)
r17,(1<<PB0)
r18,(1<<DDB1)|(1<<DDB0)
PUEB,r16
PORTB,r17
DDRB,r18
r16,PINB
6.
Figure 10-2 on page 45
ATtiny20
Figure 10-6
can
49

Related parts for ATtiny20