Rainbow Electronics ATtiny2313 User Manual
Features, Pin configurations
1
2543A–AVR–08/03
Features
•
Utilizes the AVR
®
RISC Architecture
•
AVR – High-performance and Low-power RISC Architecture
– 120 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
•
Data and Non-volatile Program and Data Memories
– 2K Bytes of In-System Self Programmable Flash
Endurance 10,000 Write/Erase Cycles
– 128 Bytes In-System Programmable EEPROM
Endurance: 100,000 Write/Erase Cycles
– 128 Bytes Internal SRAM
– Programming Lock for Flash Program and EEPROM Data Security
•
Peripheral Features
– One 8-bit Timer/Counter with Separate Prescaler
– One 16-bit Timer/Counter with Separate Prescaler,
Compare, Capture Modes and Two PWM Channels
– On-chip Analog Comparator
– Programmable Watchdog Timer with On-chip Oscillator
– USI – Universal Serial Interface
– Full Duplex UART
•
Special Microcontroller Features
– debugWIRE On-chip Debugging
– In-System Programmable via SPI Port
– External and Internal Interrupt Sources
– Low-power Idle, Power-down, and Standby Modes
– Enhanced Power-on Reset Circuit
– Programmable Brown-out Detection Circuit
– Internal Calibrated Oscillator
•
I/O and Packages
– 18 Programmable I/O Lines
– 20-pin PDIP, 20-pin SOIC, and 32-pin MLF
•
Operating Voltages
– 1.8 - 5.5V (ATtiny2313)
•
Speed Grades
– 0 - 16MHz (ATtiny2313). For Speed vs. V
CC
: See Figure 81 on page 180.
•
Power Consumption Estimates
– Active Mode
1 MHz, 1.8V: 300 µA
32 kHz, 1.8V: 20 µA (including oscillator)
– Power-down Mode
0.5 µA at 1.8V
Pin Configurations
Figure 1. Pinout ATtiny2313
(RESET/dW)PA2
(RXD)PD0
(TXD)PD1
(XTAL2)PA1
(XTAL1)PA0
(CKOUT/XCK/INT0)PD2
(INT1)PD3
(T0)PD4
(OC0B/T1)PD5
GND
20
19
18
17
16
15
14
13
12
11
1
2
3
4
5
6
7
8
9
10
VCC
PB7(UCSK/SCK/PCINT7)
PB6(DO/PCINT6)
PB5(DI/SDA/PCINT5)
PB4(OC1B/PCINT4)
PB3(OC1A/PCINT3)
PB2(OC0A/PCINT2)
PB1(AIN1/PCINT1)
PB0(AIN0/PCINT0)
PD6(ICP)
8-bit
Microcontroller
with 2K Bytes
In-System
Programmable
Flash
ATtiny2313
Preliminary
Rev. 2543A–AVR–08/03
Document Outline
- Features
- Pin Configurations
- Overview
- About Code Examples
- Disclaimer
- AVR CPU Core
- AVR ATtiny2313 Memories
- System Clock and Clock Options
- Power Management and Sleep Modes
- System Control and Reset
- Interrupts
- I/O-Ports
- External Interrupts
- 8-bit Timer/Counter0 with PWM
- Timer/Counter0 and Timer/Counter1 Prescalers
- 16-bit Timer/Counter1
- Overview
- Accessing 16-bit Registers
- Timer/Counter Clock Sources
- Counter Unit
- Input Capture Unit
- Output Compare Units
- Compare Match Output Unit
- Modes of Operation
- Timer/Counter Timing Diagrams
- 16-bit Timer/Counter Register Description
- Timer/Counter1 Control Register A – TCCR1A
- Timer/Counter1 Control Register B – TCCR1B
- Timer/Counter1 Control Register C – TCCR1C
- Timer/Counter1 – TCNT1H and TCNT1L
- Output Compare Register 1 A – OCR1AH and OCR1AL
- Output Compare Register 1 B – OCR1BH and OCR1BL
- Input Capture Register 1 – ICR1H and ICR1L
- Timer/Counter Interrupt Mask Register – TIMSK
- Timer/Counter Interrupt Flag Register – TIFR
- USART
- Universal Serial Interface – USI
- Analog Comparator
- debugWIRE On-chip Debug System
- Self-Programming the Flash
- Memory Programming
- Program And Data Memory Lock Bits
- Fuse Bits
- Signature Bytes
- Calibration Byte
- Parallel Programming Parameters, Pin Mapping, and Commands
- Serial Programming Pin Mapping
- Parallel Programming
- Enter Programming Mode
- Considerations for Efficient Programming
- Chip Erase
- Programming the Flash
- Programming the EEPROM
- Reading the Flash
- Reading the EEPROM
- Programming the Fuse Low Bits
- Programming the Fuse High Bits
- Programming the Extended Fuse Bits
- Programming the Lock Bits
- Reading the Fuse and Lock Bits
- Reading the Signature Bytes
- Reading the Calibration Byte
- Parallel Programming Characteristics
- Serial Downloading
- Electrical Characteristics
- ATtiny2313 Typical Characteristics – Preliminary Data
- Register Summary
- Instruction Set Summary
- Ordering Information(1)
- Packaging Information
- Table of Contents