ATTINY4313-SU - 8-Bit AVR 20MHz 4KB Flash MCU | Microchip
MPN: ATTINY4313-SU ✓ چالاکATTINY4313-SU گشتی
An 8-bit AVR microcontroller is a compact RISC processor that combines Flash program memory, SRAM, EEPROM data storage, timers, serial interfaces, and interrupt logic on one integrated circuit. The TinyAVR family sits below larger ATmega devices in pin count and memory capacity, while retaining the AVR instruction set, on-chip debugging support, and a mature C and assembly development ecosystem. The ATTINY4313 targets cost-sensitive products requiring moderate processing capability and several communications interfaces.
Key device features include 20 MHz operation, 4 KB Flash organized as 2K x 16 words, 256 bytes of SRAM, 256 bytes of EEPROM, 18 I/O pins, and operation down to 1.8 V. Integrated peripherals include an 8-bit timer/counter with compare modes, an 8-bit timer/counter with PWM and an external clock input, a serial USART, SPI, Universal Serial Interface support, and a single-wire interface for on-chip debugging.
The ATTINY4313 architecture provides 32 general-purpose working registers and an 8-bit data path optimized for fast interrupt response and low-power control. Program memory can be written through serial programming, while the single-wire debug interface supports efficient in-circuit development. The 1.8 V minimum operating voltage supports both 1.8 V battery-powered systems and conventional 3.3 V or 5 V industrial and consumer equipment.
Typical applications include compact sensor controllers, building-automation endpoints, battery-powered instruments, motor and relay controllers, LED-control modules, programmable logic controllers, and USB-to-serial interface designs. Its 18 available I/O lines make it particularly suitable when a design needs several digital inputs, actuator outputs, and serial connectivity without moving to a larger microcontroller package.
Designers should follow the pin-description and decoupling guidance in the manufacturer data sheet, provide a stable supply close to the supply pins, and verify timing margins when the internal oscillator drives communication interfaces. The 20-pin SOIC footprint also makes the ATTINY4313-SU a practical upgrade path from compatible ATtiny2313 and ATtiny2313A designs that require more Flash memory.
This page consolidates the Microchip device specifications, interface details, migration information, and application guidance with a parameter-by-parameter comparison against compatible AVR alternatives. It is intended to help engineers confirm the electrical, memory, package, and tooling requirements before embedding the device in a new PCB.
جێگرەوەکانی جێگۆڕکێ بۆ ATTINY4313-SU — هەمان پاکەت، پین بە پین گونجاو. ئەو بەشانەی پاکەتی جیاوازیان هەیە و پێویستیان بە چاککردنەوەی PCB هەیە لابراون.
جۆرەکان لەم زنجیرەیەدا
مۆدێلەکانی هەمان زنجیرە کە بە شێوەی ڕاستەوخۆ گونجاون لەگەڵ ATTINY4313-SU (هەمان شێوە و پێکهاتەی شوێن) — جیاوازە لە EEPROM, General-Purpose I/O Lines, General-Purpose Working Registers, Package, RoHS Status.
ATTINY4313-SUR
✅ جێگرەوەی ڕاستەوخۆ📋 جێگرەوەی سەرچاوە (لە کاتالۆگدا نییە)
ATTINY2313A-SU
✅ جێگرەوەی ڕاستەوخۆپەیوەندی بۆ نرخ
بینینی داتاشیت →ATTINY2313-SU
✅ جێگرەوەی ڕاستەوخۆ📋 جێگرەوەی سەرچاوە (لە کاتالۆگدا نییە)
ATTINY4313-SU زۆرترین ڕێژە و تایبەتمەندییە کارەباییەکان
| Product Type | 8-bit RISC-based Flash Microcontroller |
| Architecture | AVR 8-bit RISC |
| Series | TinyAVR |
| Maximum Clock Speed | 20 MHz |
| Flash Memory | 4 KB (2K x 16 words) |
| SRAM | 256 bytes |
| EEPROM | 256 bytes |
| General-Purpose I/O Lines | 18 lines |
| General-Purpose Working Registers | 32 registers |
| Operating Voltage Range | 1.8 V to 5.5 V |
| Timer/Counters | 2 |
| Serial Interfaces | USART, SPI, Universal Serial Interface, single-wire debug |
| Program Memory Type | In-System Programmable Flash |
| پاکێج | 20-pin SOIC |
| جۆری دامەزراندن | Surface Mount |
| دۆخی RoHS | RoHS |
ڕێکخستنی پینی ATTINY4313-SU
| پین 1 | PB4 — General-purpose I/O port B pin 4 |
| پین 2 | PB3 — General-purpose I/O port B pin 3 |
| پین 3 | PB2 — General-purpose I/O port B pin 2 |
| پین 4 | PB1 — General-purpose I/O port B pin 1 |
| پین 5 | PB0 — General-purpose I/O port B pin 0 |
| پین 6 | PA7 — General-purpose I/O port A pin 7 |
| پین 7 | PA6 — General-purpose I/O port A pin 6 |
| پین 8 | PA5 — General-purpose I/O port A pin 5 |
| پین 9 | PA4 — General-purpose I/O port A pin 4 |
| پین 10 | PA3 — General-purpose I/O port A pin 3 |
| پین 11 | PA2 — General-purpose I/O port A pin 2 |
| پین 12 | PA1 — General-purpose I/O port A pin 1 |
| پین 13 | PA0 — General-purpose I/O port A pin 0 |
| پین 14 | GND — Ground supply connection |
| پین 15 | PC5 — General-purpose I/O port C pin 5 |
| پین 16 | PC4 — General-purpose I/O port C pin 4 |
| پین 17 | PC3 — General-purpose I/O port C pin 3 |
| پین 18 | PC2 — General-purpose I/O port C pin 2 |
| پین 19 | PC1 — General-purpose I/O port C pin 1 |
| پین 20 | VCC — Positive supply voltage connection |
بەکارهێنانە باوەکان
ATTINY4313-SU گونجاوە بۆ 6 بەکارھێنانs: Battery-Powered Sensor Controller, Building Automation Endpoint, Compact Motor and Relay Controller, LED Lighting Controller, Programmable Logic Controller, USB-to-Serial Interface Module.
Battery-Powered Sensor Controller
The ATTINY4313-SU fits compact battery-powered monitoring equipment because it operates from 1.8 V to 5.5 V and combines 4 KB of Flash with 256 bytes of SRAM. Its 18 I/O lines can accommodate a digital sensor, status indicator, push button, and low-current actuator control. A typical design powers the device from a regulated 1.8 V or 3.3 V rail, keeps the MCU in a sleep state between measurements, and wakes it through an interrupt. The 20 MHz clock provides useful margin for sensor conditioning and serial data handling while the single-wire debug interface assists low-power firmware development.
پێشنیارکراو
Building Automation Endpoint
The ATTINY4313-SU is suitable for building-automation endpoints that monitor switches or environmental inputs and control relays or indicator lights. Its 18 general-purpose I/O lines reduce the need for an I/O expander, while the USART and SPI peripherals support communication with a room controller or sensor board. At 1.8 V minimum operation, the device can integrate with modern low-energy digital sensor ecosystems. Firmware can debounce inputs, maintain event counters in EEPROM, and report status through the serial interface while the timer/counter blocks handle periodic sampling.
پێشنیارکراو
Compact Motor and Relay Controller
The ATTINY4313-SU can implement a compact motor or relay controller where deterministic timing, multiple control outputs, and serial configuration are required. Its two timer/counter blocks provide the foundations for pulse-width modulation, input capture, and timing tasks, while 18 I/O lines allow connection to limit switches, Hall sensors, and driver logic. The MCU operates from 1.8 V to 5.5 V to accommodate different gate-driver or relay-interface supply levels. Designers should use transistor drive stages rather than driving inductive loads directly from port pins and include flyback protection on relay and motor paths.
پێشنیارکراو
LED Lighting Controller
The ATTINY4313-SU supports small LED lighting and signage modules that require programmable patterns, button control, and serial setup. The 4 KB of Flash is sufficient for compact animation tables and state-machine firmware, while 18 I/O lines can drive indicator LEDs, connect to a rotary encoder, or operate digital LED drivers through serial commands. The 20 MHz maximum clock provides sufficient timing margin for software-generated modulation and serial configuration. For multichannel lighting designs, use PWM-capable timer outputs and current-limiting resistors or constant-current driver stages rather than driving LED current directly from the MCU.
پێشنیارکراو
Programmable Logic Controller
The ATTINY4313-SU can serve as the controller in a small PLC-like module with discrete inputs, relay outputs, and an operator interface. Eighteen I/O lines provide useful channel density for a compact board, and the on-chip timers support input filtering and timed output sequences. Its 1.8 V to 5.5 V operating range simplifies interface design across industrial 24 V systems when appropriate regulation and isolation are used. Store configuration and event counters in the 256-byte EEPROM, use the USART for a service connection, and implement watchdog and brownout behavior according to the manufacturer configuration guidance.
پێشنیارکراو
USB-to-Serial Interface Module
The ATTINY4313-SU is appropriate for a compact USB-to-serial adapter because it includes a USART, SPI interface, and the program Flash needed for USB firmware and protocol handling. Its 18 I/O lines allow connection to status LEDs, configuration inputs, and secondary serial channels. The 20-pin SOIC package keeps the converter small and is compatible with the documented ATtiny2313 and ATtiny2313A migration path. Use Microchip's USB implementation guidance and a USB-capable programming environment, and validate enumeration timing and host compatibility across the operating systems targeted by the product.
پێشنیارکراو
کورتەی بەرهەمە پێشنیارکراوەکان
داتای سەرچاوەی ئەندازیاری بۆ ATTINY4313-SU — بەراوردکردن، ڕێنمایی دیزاین و زانیاری پابەندبوون.
ڕێنمایی هەڵبژاردن
بەراوردکردن لەگەڵ جێگرەوەکان
| پارامەتر | ئەم بەرهەمە | ATTINY4313-SUR | ATTINY2313A-SU | ATTINY2313-SU |
|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 20-pin SOIC | 20-pin SOIC | 20-pin SOIC | 20-pin SOIC |
| Architecture | 8-bit AVR RISC | 8-bit AVR RISC | 8-bit AVR RISC | 8-bit AVR RISC |
| Maximum Clock Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Flash Memory | 4 KB | 4 KB | 2 KB | 2 KB |
| SRAM | 256 bytes | 256 bytes | 256 bytes | 128 bytes |
| EEPROM | 256 bytes | 256 bytes | 256 bytes | 128 bytes |
| General-Purpose I/O Lines | 18 | 18 | 18 | 18 |
| Operating Voltage Range | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V |
| Pin and Code Compatibility | ATtiny4313 reference device | Same device and footprint | Code- and pin-compatible per AVR538 | Code- and pin-compatible per AVR538 |
جیاکەرەوە سەرەکییەکان
- Twice the program memory of ATtiny2313-class devices (بەراورد بەATTINY2313A-SU)
- Larger SRAM and EEPROM allocation (بەراورد بەATTINY2313-SU)
- Identical controller with automated-production reel option (بەراورد بەATTINY4313-SUR)
تێبینییەکانی دیزاین
Place the supply bypass capacitor close to pins 20 and 14 and follow the recommended network in Microchip document 8246S. Route programming and debug signals away from noisy switching nodes, particularly relay or motor drive traces. For a new design, preserve the 20-pin SOIC footprint and test-point access for ISP programming so firmware updates and recovery do not require rework.
Do not treat the ATTINY2313 and ATTINY2313A as exact functional equivalents for firmware larger than 2 KB. Microchip AVR538 confirms code and pin compatibility, but the ATTINY4313 provides 4 KB of Flash, 256 bytes of SRAM, and 256 bytes of EEPROM, while the original ATtiny2313 provides 2 KB, 128 bytes, and 128 bytes respectively. Check code size, RAM allocation, EEPROM usage, and fuse settings before substitution.
Keep analog and communication interfaces away from the switching node of any external power converter, and use a controlled ground return for serial signals. The single-wire debug interface is useful during development, but its signal routing should avoid long unprotected traces. For designs using the USART or SPI, confirm input levels and clock timing against the selected peripheral configuration and the maximum system clock in document 8246S.
زانیاری پابەندبوون
A product listing identifies the ATTINY4313-SU as RoHS. The device is an industrial-compatible general-purpose microcontroller rather than an AEC-Q100 automotive-qualified variant.