ATTINY13-20PI Atmel, ATTINY13-20PI Datasheet - Page 52
![IC MCU AVR 1K FLASH 20MHZ 8DIP](/photos/6/50/65033/313-8-dip_sml.jpg)
ATTINY13-20PI
Manufacturer Part Number
ATTINY13-20PI
Description
IC MCU AVR 1K FLASH 20MHZ 8DIP
Manufacturer
Atmel
Series
AVR® ATtinyr
Specifications of ATTINY13-20PI
Core Processor
AVR
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
6
Program Memory Size
1KB (512 x 16)
Program Memory Type
FLASH
Eeprom Size
64 x 8
Ram Size
64 x 8
Voltage - Supply (vcc/vdd)
2.7 V ~ 5.5 V
Data Converters
A/D 4x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
8-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Connectivity
-
Other names
ATTINY13-24PI
ATTINY13-24PI
ATTINY13-24PI
- Current page: 52 of 176
- Download datasheet (3Mb)
10.2.5
52
ATtiny13
Digital Input Enable and Sleep Modes
The following code example shows how to set port B pins 0 and 1 high, 2 and 3 low, and define
the port pins from 4 to 5 as input with a pull-up assigned to port pin 4. 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:
As shown in
input of the schmitt-trigger. The signal denoted SLEEP in the figure, is set by the MCU Sleep
Controller in Power-down mode, Power-save mode, and Standby mode to avoid high power
consumption if some input signals are left floating, or have an analog signal level close to V
SLEEP is overridden for port pins enabled as external interrupt pins. If the external interrupt
request is not enabled, SLEEP is active also for these pins. SLEEP is also overridden by various
other alternate functions as described in
If a logic high level (“one”) is present on an asynchronous external interrupt pin configured as
“Interrupt on Rising Edge, Falling Edge, or Any Logic Change on Pin” while the external interrupt
is not enabled, the corresponding External Interrupt Flag will be set when resuming from the
Assembly Code Example
C Code Example
unsigned char i;
...
; Define pull-ups and set outputs high
; Define directions for port pins
ldi
ldi
out
out
; Insert nop for synchronization
nop
; Read port pins
in
...
...
/* Define pull-ups and set outputs high */
/* Define directions for port pins */
PORTB = (1<<PB4)|(1<<PB1)|(1<<PB0);
DDRB = (1<<DDB3)|(1<<DDB2)|(1<<DDB1)|(1<<DDB0);
/* Insert nop for synchronization*/
__no_operation();
/* Read port pins */
i = PINB;
...
1. For the assembly program, two temporary registers are used to minimize the time from pull-
ups are set on pins 0, 1 and 4, until the direction bits are correctly set, defining bit 2 and 3 as
low and redefining bits 0 and 1 as strong high drivers.
Figure 10-2 on page
r16,(1<<PB4)|(1<<PB1)|(1<<PB0)
r17,(1<<DDB3)|(1<<DDB2)|(1<<DDB1)|(1<<DDB0)
PORTB,r16
DDRB,r17
r16,PINB
(1)
49, the digital input signal can be clamped to ground at the
“Alternate Port Functions” on page
53.
2535J–AVR–08/10
CC
/2.
Related parts for ATTINY13-20PI
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ATTINY13-20SI](/photos/6/50/65032/453-8-soic_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K FLASH 20MHZ 8SOIC
Manufacturer:
Atmel
Datasheet:
![ATtiny13](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
![ATTINY13-20SSU](/photos/6/50/65032/453-8-soic_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K FLASH 20MHZ 8SOIC
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20MU](/photos/6/87/68751/313-20-qfn_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K FLASH 10MHZ 20-MLF
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20PU](/photos/6/50/65033/313-8-dip_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K FLASH 20MHZ 8DIP
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20MMU](/photos/12/13/121304/313-10m1_tmb.jpg)
Part Number:
Description:
MCU AVR 1KB FLASH 20MHZ 3X3 QFN
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20SU](/photos/6/50/65032/453-8-soic_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K FLASH 20MHZ 8SOIC
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20PJ](/photos/6/50/65033/313-8-dip_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K 5V 20MHZ 8DIP
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20SJ](/photos/6/50/65032/453-8-soic_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K 5V 20MHZ 8SOIC
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20SSJ](/photos/6/50/65032/453-8-soic_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K 5V 20MHZ 8SOIC
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20SSI](/photos/6/50/65032/453-8-soic_tmb.jpg)
Part Number:
Description:
IC MCU AVR 1K FLASH 20MHZ 8SOIC
Manufacturer:
Atmel
Datasheet:
![ATTINY13-20SSQ](/photos/6/50/65032/453-8-soic_tmb.jpg)
Part Number:
Description:
MCU AVR 1KB FLASH 20MHZ 8SOIC GW
Manufacturer:
Atmel
Datasheet: