ATTINY4313-PU - 20MHz AVR 8-Bit MCU | Microchip Technology
MPN: ATTINY4313-PU ✓ 啟用中ATTINY4313-PU 概覽
A microcontroller is a programmable semiconductor that integrates a processor core, memory, and peripheral interfaces onto one device. The ATtiny4313 belongs to the tinyAVR family, a subgroup of 8-bit AVR microcontrollers within the broader embedded-control and semiconductor hierarchy. Its RISC-based architecture executes compact instructions efficiently, making it suitable for cost-sensitive control tasks that do not require the processing power of a 32-bit system.
Key features include 4 KB of program flash, 128 bytes of EEPROM for nonvolatile data, 128 bytes of SRAM for working memory, and up to 18 general-purpose I/O lines. The device supports a maximum clock frequency of 20 MHz and a 1.8 V to 5.5 V operating range. Two flexible timer/counter blocks support timing, event counting, and basic waveform-generation functions, while single-wire debug simplifies in-circuit programming and diagnosis.
The ATTINY4313 uses the AVR enhanced RISC architecture with 32 general-purpose working registers. This architecture provides direct register-oriented operation, a compact instruction set, and efficient execution of embedded-control code. The device is also compatible at the code and pin level with the ATtiny2313 and ATtiny2313A families according to Microchip application note AVR538, making it a practical upgrade path when a design requires additional flash memory while retaining an established 20-pin layout.
Typical applications include compact industrial controllers, small motor-control and timer modules, appliance interfaces, programmable logic controllers, instrumentation front ends, and low-power embedded-control nodes. Its 18 I/O lines provide enough connectivity for switches, sensors, indicators, actuators, and serial-interface peripherals while retaining an economical through-hole package for prototypes and manually assembled boards.
Designers should verify oscillator, reset, programming-interface, and decoupling connections against the manufacturer pin-description table before layout. Because the PDIP package provides generous spacing and inspection access, it is especially suitable for educational prototypes, proof-of-concept assemblies, and moderate-volume production. A surface-mount package may be preferable where PCB area, height, or automated assembly dominates the mechanical design.
This page combines the ATtiny4313 electrical characteristics with package guidance, drop-in migration options, and practical application context. It also identifies the ATtiny2313 and ATtiny2313A as code- and pin-compatible migration devices, helping engineers preserve PCB continuity while increasing available program memory from the legacy family to 4 KB.
直接替換替代品,適用於 ATTINY4313-PU — 相同封裝,腳位對腳位相容。需重新設計 PCB 的不同封裝零件不列入。
此系列的變體
與下列產品可直接替換的同系列型號: ATTINY4313-PU (相同外形與佔位) — 差異在於 Package, RoHS Status, Maximum Clock Frequency, Mounting Type, Analog Comparator.
ATTINY2313V-10PU
✅ 直接替換聯絡詢價
查看資料表 →ATTINY2313A-SU
✅ 直接替換聯絡詢價
查看資料表 →ATTINY4313-PU 最大額定值與電氣特性
| Product Type | 8-bit AVR RISC-based microcontroller |
| 最大時脈頻率 | 20 MHz |
| Program Flash Memory | 4 KB (2K x 16) |
| EEPROM Memory | 128 bytes |
| SRAM | 128 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/Counter Blocks | 2 blocks |
| Debug Interface | Single-wire on-chip debugging |
| Architecture | AVR enhanced RISC |
| 資料匯流排寬度 | 8 bits |
| 封裝 | 20-pin PDIP |
| 安裝類型 | Through-hole |
| Terminal Count | 20 terminals |
| Temperature Grade | Industrial |
| Operating Voltage | 1.8 V to 5.5 V |
| RoHS 狀態 | Not stated in the manufacturer product information |
ATTINY4313-PU 腳位配置
| 腳位 1 | PA0 — General-purpose I/O line PA0 |
| 腳位 2 | PA1 — General-purpose I/O line PA1 |
| 腳位 3 | PA2 — General-purpose I/O line PA2 |
| 腳位 4 | PA3 — General-purpose I/O line PA3 |
| 腳位 5 | GND — Ground connection |
| 腳位 6 | PA4 — General-purpose I/O line PA4 |
| 腳位 7 | PA5 — General-purpose I/O line PA5 |
| 腳位 8 | PA6 — General-purpose I/O line PA6 |
| 腳位 9 | PA7 — General-purpose I/O line PA7 |
| 腳位 10 | PB0 — General-purpose I/O line PB0 |
| 腳位 11 | PB1 — General-purpose I/O line PB1 |
| 腳位 12 | PB2 — General-purpose I/O line PB2 |
| 腳位 13 | PB3 — General-purpose I/O line PB3 |
| 腳位 14 | PB4 — General-purpose I/O line PB4 |
| 腳位 15 | GND — Ground connection |
| 腳位 16 | XTAL1 — Oscillator input |
| 腳位 17 | XTAL2 — Oscillator output |
| 腳位 18 | PC0 — General-purpose I/O line PC0 |
| 腳位 19 | PC1 — General-purpose I/O line PC1 |
| 腳位 20 | PC2 — General-purpose I/O line PC2 |
典型應用
ATTINY4313-PU 適用於 6 應用s: Compact Industrial Controller, Timer and Motor-Control Module, Appliance Interface Controller, Programmable Logic Controller, Instrumentation Front End, Low-Power Embedded Sensor Node.
Compact Industrial Controller
The ATTINY4313-PU fits compact industrial control modules that need deterministic digital input/output handling without a larger processor or package. Its 20 MHz maximum clock rate supports responsive firmware, while 18 general-purpose I/O lines can connect switches, status indicators, interlocks, and discrete sensors. Two timer/counter blocks are useful for event counting, periodic service routines, and timing-based control. The 4 KB flash capacity provides room for application logic, while 128 bytes of EEPROM can retain configuration data. In a 20-pin PDIP enclosure, the through-hole format also simplifies prototype assembly and inspection. Industrial suitability should be assessed against the exact environmental requirements of the installed equipment.
推薦
Timer and Motor-Control Module
The ATTINY4313-PU is appropriate for small timer, pulse-counting, or low-power motor-control modules where two timer/counter blocks and an 8-bit RISC core provide sufficient control capability. Its 20 MHz clock allows firmware to execute timing calculations and state-machine logic efficiently, while the 18 I/O lines can accept position or limit inputs and drive control outputs. The 4 KB flash supports compact control routines, and the 128-byte EEPROM can preserve settings across power cycles. For motor designs, pin assignment must match the ATtiny4313 datasheet and external transistor or driver circuitry must handle the required current and voltage. Firmware should include safe startup and default-off behavior.
推薦
Appliance Interface Controller
The ATTINY4313-PU can serve as the local controller in an appliance or instrument front panel, coordinating button inputs, indicator outputs, and simple sensor readings. Eighteen I/O lines provide flexible connectivity in a limited board area, while the 1.8 V to 5.5 V operating range allows integration with multiple low-voltage logic rails. Its 128 bytes of SRAM support compact working data, and the two timer/counter blocks can handle debouncing intervals, elapsed-time measurement, or periodic display updates. The PDIP package is convenient where technicians need access to replaceable or hand-assembled controllers. Firmware organization should include input validation and fail-safe output states because the device may directly coordinate user-facing equipment.
推薦
Programmable Logic Controller
The ATTINY4313-PU is well suited to small PLC-like logic modules that combine digital inputs, relay-control outputs, timing functions, and nonvolatile configuration. The 20 MHz AVR core and two timer/counter blocks support event sequencing and deterministic I/O updates, while 4 KB of flash provides space for a structured control program. The 18 I/O lines can be divided between sensing and actuator functions, although the final allocation must follow the manufacturer pin-description table. EEPROM storage can retain configuration values independently of firmware. For safety-related equipment, use appropriate external isolation and protection because the microcontroller itself is not a certified safety component. Firmware should include startup, watchdog, and output-default strategies where required by the application.
推薦
Instrumentation Front End
The ATTINY4313-PU can manage low-bandwidth instrumentation front ends that require status signaling, local adjustment, and supervisory control around a higher-level processor. Its 18 I/O lines can support limit inputs, mode controls, alarm outputs, and communication links, while its two timer/counter blocks support sampling intervals or measurement timing. The 20 MHz clock allows responsive interrupt-driven operation, and 128 bytes of EEPROM can retain calibration or setup parameters. Because the device provides 128 bytes of SRAM, application code should avoid unnecessary buffering and use compact state structures. The 20-pin PDIP package is useful in laboratory prototypes and serviceable industrial instruments. Signal conditioning, reference accuracy, and analog-to-digital conversion requirements must be implemented separately.
推薦
Low-Power Embedded Sensor Node
The ATTINY4313-PU can support a compact sensor node that wakes periodically, reads digital inputs, updates a simple indicator, and returns to a low-power state. Its two timer/counter blocks are useful for periodic wake-up timing, while 18 I/O lines can accommodate digital sensors and control signals. The 1.8 V minimum operating voltage broadens compatibility with low-voltage systems, and the 128-byte EEPROM can retain node configuration without consuming RAM. Actual standby and active-current performance should be measured under the selected clock and peripheral configuration. Because the available family information emphasizes processor, memory, timers, and I/O rather than a detailed power specification, confirm sleep-mode behavior in the manufacturer data sheet before setting battery-life targets.
推薦
推薦產品摘要
工程參考資料,適用於 ATTINY4313-PU — 比較、設計指引及合規資訊。
選型指南
與替代品比較
| 參數 | 本產品 | ATtiny2313 | ATtiny2313A |
|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 20-pin PDIP | 20-pin PDIP | 20-pin PDIP |
| Processor Architecture | 8-bit AVR enhanced RISC | 8-bit AVR | 8-bit AVR |
| Maximum Clock Frequency | 20 MHz | 20 MHz | 20 MHz |
| Program Flash Memory | 4 KB | 1 KB | 2 KB |
| General-Purpose I/O Lines | 18 lines | 18 lines | 18 lines |
| Compatibility | Target device | Code- and pin-compatible upgrade path from ATtiny4313 | Code- and pin-compatible upgrade path from ATtiny4313 |
主要差異化特點
- Twice the program memory of the ATtiny2313A (對比ATtiny2313A)
- Four times the program memory of the ATtiny2313 (對比ATtiny2313)
- Pin and code continuity during memory upgrades (對比ATtiny2313A)
設計說明
Use the manufacturer pin-description table to assign the 20-pin PDIP footprint, especially the oscillator, reset, programming, supply, and ground connections. Keep the crystal or clock network close to pins 16 and 17, place the supply decoupling capacitor at the supply pins, and provide a clean ground return. The DIP outline is electrically compatible with the documented ATtiny2313 and ATtiny2313A migration path, but every auxiliary peripheral connection must still be checked after a family change.
Do not treat the ATtiny2313 and ATtiny2313A as exact functional replacements merely because their pinouts match. The ATTINY4313 has 4 KB of flash, while the alternatives provide less program memory, so compare the linked binary size with the replacement device capacity before production. Also review timer, peripheral, interrupt-vector, and fuse-related assumptions in the official family data sheet whenever existing firmware is migrated.
Plan the power rail for the full 1.8 V to 5.5 V operating range, including voltage tolerance, startup behavior, and current demand from attached peripherals. Place the local bypass capacitor close to the device’s supply and ground pins and keep power-return paths compact. External LEDs, sensors, and interface circuits should not load the MCU supply pins indirectly; use suitable drivers where their current exceeds what the I/O configuration can support.
Although the through-hole package is easy to prototype, preserve the electrical layout quality expected for a mixed-signal embedded system. Keep oscillator traces short, separate sensitive input routes from switching or high-current outputs, and provide a stable ground reference for every connected peripheral. Include the programming interface in the PCB design if firmware updates are expected, and confirm that the chosen programmer supplies the required clock and control signals.
合規資訊
The industrial temperature grade and terminal count are stated in the product information. Specific RoHS, REACH, AEC-Q100, lead-free, halogen-free, and conflict-minerals declarations are not established by the available manufacturer text.