ATTINY4313-PU - 20MHz AVR 8-Bit MCU | Microchip Technology
Référence : ATTINY4313-PU ✓ ActifATTINY4313-PU Présentation
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.
Alternatives de remplacement direct pour ATTINY4313-PU — même boîtier, compatible broche à broche. Les références à boîtier différent nécessitant une retouche du PCB sont exclues.
Variantes de cette série
Modèles de la même série directement compatibles avec ATTINY4313-PU (même facteur de forme et même empreinte) — différant par Package, RoHS Status, Maximum Clock Frequency, Mounting Type, Analog Comparator.
ATTINY2313V-10PU
✅ Remplacement directContactez-nous pour le prix
Voir la fiche technique →ATTINY2313A-SU
✅ Remplacement directContactez-nous pour le prix
Voir la fiche technique →ATTINY4313-PU Valeurs maximales et caractéristiques électriques
| Product Type | 8-bit AVR RISC-based microcontroller |
| Fréquence d'horloge maximale | 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 |
| Largeur du bus de données | 8 bits |
| Boîtier | 20-pin PDIP |
| Type de montage | Through-hole |
| Terminal Count | 20 terminals |
| Temperature Grade | Industrial |
| Operating Voltage | 1.8 V to 5.5 V |
| Statut RoHS | Not stated in the manufacturer product information |
Configuration des broches de ATTINY4313-PU
| Broche 1 | PA0 — General-purpose I/O line PA0 |
| Broche 2 | PA1 — General-purpose I/O line PA1 |
| Broche 3 | PA2 — General-purpose I/O line PA2 |
| Broche 4 | PA3 — General-purpose I/O line PA3 |
| Broche 5 | GND — Ground connection |
| Broche 6 | PA4 — General-purpose I/O line PA4 |
| Broche 7 | PA5 — General-purpose I/O line PA5 |
| Broche 8 | PA6 — General-purpose I/O line PA6 |
| Broche 9 | PA7 — General-purpose I/O line PA7 |
| Broche 10 | PB0 — General-purpose I/O line PB0 |
| Broche 11 | PB1 — General-purpose I/O line PB1 |
| Broche 12 | PB2 — General-purpose I/O line PB2 |
| Broche 13 | PB3 — General-purpose I/O line PB3 |
| Broche 14 | PB4 — General-purpose I/O line PB4 |
| Broche 15 | GND — Ground connection |
| Broche 16 | XTAL1 — Oscillator input |
| Broche 17 | XTAL2 — Oscillator output |
| Broche 18 | PC0 — General-purpose I/O line PC0 |
| Broche 19 | PC1 — General-purpose I/O line PC1 |
| Broche 20 | PC2 — General-purpose I/O line PC2 |
Applications typiques
ATTINY4313-PU convient pour 6 applications: 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.
Recommandé
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.
Recommandé
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.
Recommandé
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.
Recommandé
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.
Recommandé
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.
Recommandé
Récapitulatif des produits recommandés
Données de référence d'ingénierie pour ATTINY4313-PU — comparaison, recommandations de conception et informations de conformité.
Guide de sélection
Comparaison avec les alternatives
| Paramètre | Ce produit | 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 |
Principaux différenciateurs
- Twice the program memory of the ATtiny2313A (vs ATtiny2313A)
- Four times the program memory of the ATtiny2313 (vs ATtiny2313)
- Pin and code continuity during memory upgrades (vs ATtiny2313A)
Notes de conception
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.
Informations de conformité
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.