Opens in a new tab

ATTINY2313-20PU

8-bit AVR MCU, 20MHz, 2KB Flash, 128B SRAM, UART/SPI/I2C, 18 I/O, PDIP-20 through-hole

9800

Effective Inventory

Image for reference only

Manufacturer Part:

ATTINY2313-20PU

Package:

PDIP-20

Brand:

Quality Commitment

Shipping & Payment

Service & Packaging

Product Manual

Other recommendations you may be interested in.

Description

Product Overview

The ATTINY2313-20PU from Microchip Technology (formerly Atmel) is an 8-bit AVR RISC microcontroller with 2KB Flash, 128 bytes SRAM, and 128 bytes EEPROM in a 20-pin PDIP through-hole package. Running at up to 20 MHz from 2.7V to 5.5V, it provides 18 I/O pins, one 8-bit and one 16-bit timer, UART, SPI, and I2C interfaces for simple embedded control.

Key Specifications

  • Core: AVR 8-bit RISC (most instructions single-cycle)
  • Max Frequency: 20 MHz
  • Flash: 2KB (10,000 erase/write cycles)
  • SRAM: 128 bytes
  • EEPROM: 128 bytes (100,000 cycles)
  • Timers: 1x 8-bit, 1x 16-bit
  • Interfaces: USI (SPI/I2C), UART
  • PWM: 4 channels
  • GPIO: 18 I/O
  • Analog Comparator: 1
  • Supply Voltage: 2.7V ~ 5.5V
  • Active Current: 3.6 mA at 20 MHz, 5V
  • Power-Down: 0.1 µA
  • Operating Temperature: -40°C ~ 85°C
  • Package: PDIP-20 (through-hole)

Features

  • High-performance AVR RISC architecture with 120 instructions
  • 32 x 8 general-purpose working registers
  • On-chip 2-cycle hardware multiplier
  • USI module for SPI and I2C communication
  • Full-duplex UART with frame error detection
  • External and internal interrupt sources
  • Programmable watchdog timer with separate oscillator
  • In-System Programming (ISP) via SPI
  • DebugWIRE on-chip debugging

Applications

  • Hobbyist and maker projects (Arduino-compatible)
  • Simple protocol converters and gateways
  • Low-cost sensor nodes
  • LED lighting controllers
  • Small motor control applications
Product Introduction: ATTINY2313-20PU Product Introduction

The ATTINY2313-20PU from Microchip Technology is a low-power 8-bit AVR RISC microcontroller that provides 2KB of Flash program memory, 128 bytes of SRAM, and 128 bytes of data EEPROM in a hobbyist-friendly 20-pin PDIP through-hole package. The AVR architecture executes most instructions in a single clock cycle, delivering up to 20 MIPS throughput at 20 MHz. The device features a Universal Serial Interface (USI) that can be configured for SPI or I2C communication, a full-duplex UART for serial communication, and four PWM channels for LED dimming and motor control. The PU suffix indicates PDIP-20 package, ideal for breadboard prototyping and educational use.

Working Principle: ATTINY2313-20PU Working Principle

The ATTINY2313-20PU operates on the AVR 8-bit RISC architecture with 32 general-purpose working registers directly connected to the ALU, allowing two registers to be accessed in a single clock cycle. This Harvard architecture uses separate memories and buses for program and data, enabling simultaneous access. The USI module provides a flexible serial interface that can operate as SPI master/slave or I2C master/slave using a minimal hardware implementation (shift register, counter, and control logic) supplemented by software for protocol handling. The UART supports full-duplex communication with configurable data format (5-9 data bits) and frame error detection. The 16-bit timer supports input capture, output compare, and PWM generation for precise timing control. ISP programming allows firmware updates without removing the device from the circuit.

Pin Description: ATTINY2313-20PU Pin Definition and Functions
Pin Name Function
1 RESET/PA2 Reset (active low, active by default) / Port A2
2 RXD/PD0 UART Receive / Port D0
3 TXD/PD1 UART Transmit / Port D1
4 PA1/XCK/CKOUT Port A1 / USI Clock / Clock Output
5 PA0/OC1B/ICP Port A0 / Timer1 Output Compare B / Input Capture
6 PB0/OC0A Port B0 / Timer0 Output Compare A (PWM)
7 PB1/OC0B/OC1A Port B1 / Timer0 OC B / Timer1 OC A (PWM)
8 PB2/OC1B/SS Port B2 / Timer1 OC B / SPI Slave Select
9 PB3/MOSI/OC2 Port B3 / SPI MOSI / USI Data
10 PB4/MISO Port B4 / SPI MISO
Application Scenarios: In which products and applications is ATTINY2313-20PU used

The ATTINY2313-20PU is a favorite in the maker community for its PDIP-20 through-hole package that fits standard breadboards, making it ideal for Arduino-based projects and educational electronics. It serves as a simple protocol converter between UART and I2C/SPI buses in system integration tasks. For LED lighting controllers, the four PWM channels enable smooth dimming of multiple LED strings. In low-cost sensor nodes, the UART provides wired communication while the analog comparator enables simple threshold detection. The 2KB Flash is sufficient for small control programs, and the ISP capability allows field firmware updates.

Alternative Models: What chips are recommended as replacements for ATTINY2313-20PU
Model Manufacturer Key Difference
ATTINY4313-20PU Microchip 4KB Flash, 256B RAM variant
ATTINY2313A-PU Microchip Rev A, lower power consumption
ATmega328P-PU Microchip 32KB Flash, PDIP-28, Arduino Uno MCU

Recommend Parts

IRFS4310ZTRLPBF

IRFS4310ZTRLPBF – 100V N-Channel HEXFET Power MOSFET, 7 mΩ RDS(on), D2PAK (TO-263AB)

Brand: infineon

Package: D2PAK (TO-263AB)

IN STOCK: 11137pcs

Cargo cycle: 3-7 Days

The minimum order is 1

MSASJ105BB5475MFNA01

4.7uF 6.3V X5R MLCC, 0402, Taiyo Yuden

Brand: gigadevice

Package: 0402 (1005 Metric, 1.0 x 0.5 x 0.5 mm)

IN STOCK: 9701pcs

Cargo cycle: 3-7 Days

The minimum order is 1

IRF3415PBF

150V N-channel power MOSFET, 43A, 41mΩ RDS(on), TO-220AB package

Brand: infineon

Package: TO-220AB

IN STOCK: 2940pcs

Cargo cycle: 3-7 Days

The minimum order is 1

105017-1001

USB Type-C receptacle connector, 24-pin, SMD

Brand: Amphenol

Package: SMD (8.9 x 7.3 x 3.2 mm, right angle)

IN STOCK: 5335pcs

Cargo cycle: 3-7 Days

The minimum order is 1

IRLB3034PBF

IRLB3034PBF – 40V N-Channel StrongIRFET Power MOSFET (Logic Level), 1.7 mΩ (max) @ 10V; 2.0 mΩ @ 4.5V RDS(on), TO-220AB

Brand: infineon

Package: TO-220AB

IN STOCK: 9724pcs

Cargo cycle: 3-7 Days

The minimum order is 1

XC6SLX75-2FGG484I

Spartan-6 LX75 FPGA, 74637 logic cells, 132 DSP, 3096KB BRAM, 408 I/O, FBGA-484 23x23mm, -2 speed, industrial -40~100C, AMD Xilinx

Brand: xilinx

Package: FGG484 (484-ball fine-pitch BGA, 23x23mm body, 1.0mm ball pitch, 22×22 ball array, 6 I/O banks, lead-free)

IN STOCK: 890pcs

Cargo cycle: 3-7 Days

The minimum order is 1