ATTINY45-20PU - 20MHz 8-bit AVR MCU | Microchip Technology
Référence : ATTINY45-20PU ✓ ActifATTINY45-20PU Présentation
A microcontroller is a programmable semiconductor that combines a CPU core, memory, timers, and I/O in one integrated circuit. The ATTINY45 belongs to the ATtiny family of low-power 8-bit AVR microcontrollers, which sit below larger AVR and AVR Dx devices in the Microchip product hierarchy. Its small memory footprint and limited I/O count make it suitable for compact embedded products where cost, board area, and simple control functions matter more than high peripheral complexity.
The device provides 32 general-purpose working registers, an 8-bit timer/counter with compare modes, and in-system serial programming support. Its six I/O pins can be used for digital control, sensing, switching, or communication functions. The 4 KB Flash area provides room for a small embedded application, while the 256-byte EEPROM supports nonvolatile configuration or parameter storage without occupying program Flash.
The ATTINY45 architecture uses the AVR enhanced RISC core, an event-driven design that keeps instruction execution efficient for typical control tasks. The 20 MHz operating grade supports faster computation and timer-based functions than 10 MHz variants. Because the device has limited memory and pins, firmware should minimize dynamic allocation, use efficient peripheral routines, and avoid unnecessary abstraction layers that consume Flash and SRAM.
Typical uses include compact sensor controllers, LED lighting modules, small motor or actuator controllers, industrial push-button interfaces, and simple wearable or IoT nodes. In these systems, the ATtiny45 can read a sensor, make a control decision, and drive an output without requiring an external processor. The DIP package also simplifies breadboard prototyping and through-hole assembly.
For PCB design, place decoupling capacitance close to the VCC and GND pins, route the reset path to avoid noise pickup, and keep switching or high-current traces away from sensitive ADC inputs. Use the manufacturer datasheet for the complete pin-description table, electrical limits, clock requirements, programming connections, and package dimensions.
This product page combines manufacturer specifications, package and pin information, practical application guidance, and a parameter-focused comparison with compatible ATtiny45-family devices. It is designed to help engineers verify package compatibility, firmware constraints, programming requirements, and sourcing options before committing a design to production.
Alternatives de remplacement direct pour ATTINY45-20PU — 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 ATTINY45-20PU (même facteur de forme et même empreinte) — différant par Package, Product Type.
ATTINY45-20PI
✅ Remplacement direct📋 Alternative de référence (hors catalogue)
ATTINY45-10PU
✅ Remplacement direct ⚠️ Spécifications non vérifiées📋 Alternative de référence (hors catalogue)
ATTINY45V-10PU
✅ Remplacement direct ⚠️ Spécifications non vérifiées📋 Alternative de référence (hors catalogue)
ATTINY85-20PU
✅ Remplacement directContactez-nous pour le prix
Voir la fiche technique →ATTINY25-20PU
✅ Remplacement direct ⚠️ Spécifications non vérifiéesContactez-nous pour le prix
Voir la fiche technique →ATTINY45-20PU Valeurs maximales et caractéristiques électriques
| Product Type | 8-bit AVR RISC microcontroller |
| Maximum Clock Speed | 20 MHz |
| Flash Memory | 4 KB In-System Programmable Flash (2K x 16) |
| EEPROM | 256 bytes |
| SRAM | 256 bytes |
| General-Purpose I/O Lines | 6 |
| General-Purpose Working Registers | 32 |
| Timer/Counter | 1 x 8-bit timer/counter with compare modes |
| Architecture | AVR enhanced RISC |
| Core Type | 8-bit |
| Boîtier | 8-pin DIP (8-PDIP) |
| Type de montage | Through-hole |
| Programming | In-System Serial Programming (ICSP) |
| Product Temperature Grade | U: standard grade |
| Statut RoHS | unknown |
| REACH Status | unknown |
| AEC-Q100 Qualification | not_applicable |
| Document Page Count | 24 pages |
Configuration des broches de ATTINY45-20PU
| Broche 1 | PB0 — General-purpose I/O pin 0 |
| Broche 2 | PB1 — General-purpose I/O pin 1 |
| Broche 3 | PB2 — General-purpose I/O pin 2 |
| Broche 4 | PB3 — General-purpose I/O pin 3 |
| Broche 5 | VCC — Power supply input |
| Broche 6 | GND — Ground reference |
| Broche 7 | PB4 — General-purpose I/O pin 4 |
| Broche 8 | RESET — Active-low reset input |
Applications typiques
ATTINY45-20PU convient pour 6 applications: Compact Sensor Controller, LED Lighting and Display Control, Small Motor and Actuator Control, Industrial Push-Button Interface, Simple IoT Sensor Node, Prototype and Education Controller.
Compact Sensor Controller
The ATTINY45-20PU is appropriate for compact sensing nodes because its 20 MHz AVR core can process sensor readings and execute control logic without a separate processor. Six general-purpose I/O lines provide direct connections for digital sensors, switches, and alarm outputs, while 256 bytes of SRAM and 256 bytes of EEPROM support short working buffers and persistent configuration. The device can be placed between a sensor interface and an actuator, sampling inputs and applying threshold logic in a compact embedded design. Its limited 4 KB Flash requires careful code sizing, and power consumption should be evaluated against the battery budget using the manufacturer’s sleep and active-current characteristics.
Recommandé
LED Lighting and Display Control
The ATTINY45-20PU can control LED status indicators, small lighting sequences, or segmented display logic through its six I/O lines. A 20 MHz clock provides additional timing headroom for debouncing, PWM-style brightness control, and multiplexed display updates compared with a 10 MHz ATtiny45 variant. The 4 KB Flash is adequate for compact lighting state machines and compact lighting state machines and calibration tables. Because each output pin has finite drive capability, current limits and switching transients should be checked against the LED or driver topology. Firmware should also include a defined startup state so the outputs remain safe during reset and brownout conditions.
Recommandé
Small Motor and Actuator Control
The ATTINY45-20PU can serve as the command controller in a small motor, valve, relay, or actuator module. Its 8-bit timer/counter supports basic timing and compare operations, and the six I/O lines can accept position or limit inputs and issue control commands to an external driver stage. The 20 MHz clock improves timing margin for debouncing and PWM implementation, although the MCU should not directly drive a motor or relay; use a suitable transistor or driver circuit and provide protection against inductive transients. Confirm the load’s supply current and startup demands, and review absolute output limits before selecting pin drive modes.
Recommandé
Industrial Push-Button Interface
The ATTINY45-20PU is well suited to a compact industrial-style input module that debounces several buttons, records events, and communicates a selected action to a host. Six I/O lines allow several inputs to be multiplexed or combined with an indicator output, while 256 bytes of EEPROM can retain configuration such as mode, debounce parameters, or device addresses. The 20 MHz class supports responsive scanning and deterministic event handling without excessive software overhead. Industrial use requires attention to transient immunity, grounding, connector protection, and the operating-temperature grade of the selected assembly. Firmware should validate repeated samples and define safe outputs when multiple buttons are pressed simultaneously.
Recommandé
Simple IoT Sensor Node
The ATTINY45-20PU can form the local control element of a small IoT sensor node, handling a digital sensor, applying local thresholds, and waking a communications module when an event occurs. Its low-power AVR architecture and compact 8-pin DIP package make it useful for prototype and space-constrained boards. Six I/O lines leave limited interface capacity, so a carefully selected serial transceiver or wireless module is more practical than a broad collection of peripherals. The 4 KB program Flash and 256-byte SRAM demand efficient event-driven firmware, while 256 bytes of EEPROM are useful for calibration values and device settings. Confirm radio-module logic levels and timing so the MCU can reliably control its sleep and reset sequence.
Recommandé
Prototype and Education Controller
The ATTINY45-20PU is convenient for education, prototyping, and small proof-of-concept boards because it uses a familiar 8-pin DIP package and supports ISP programming. Students or engineers can use its six I/O pins to demonstrate digital inputs, timer-based control, EEPROM persistence, and basic AVR programming without allocating a large board area. The 20 MHz speed grade provides additional headroom for instructional examples, but the 4 KB Flash limit makes code-size awareness important. A standard AVR programming adapter can connect to the ISP interface, and the DIP package simplifies breadboard use. Before moving a prototype to a compact PCB, recheck pin orientation, decoupling, reset behavior, and any peripheral differences between development and production devices.
Recommandé
Récapitulatif des produits recommandés
Données de référence d'ingénierie pour ATTINY45-20PU — comparaison, recommandations de conception et informations de conformité.
Guide de sélection
Comparaison avec les alternatives
| Paramètre | Ce produit | ATTINY45-20PI | ATTINY45-10PU | ATTINY45V-10PU | ATTINY85-20PU | ATTINY25-20PU |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 8-PDIP | 8-PDIP | 8-PDIP | 8-PDIP | 8-PDIP | 8-PDIP |
| Maximum Clock Speed | 20 MHz | 20 MHz | 10 MHz | 10 MHz | 20 MHz | 20 MHz |
| Flash Memory | 4 KB | 4 KB | 4 KB | 4 KB | 8 KB | 2 KB |
| EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 512 bytes | 128 bytes |
| SRAM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 512 bytes | 128 bytes |
| General-Purpose I/O Lines | 6 | 6 | 6 | 6 | 6 | 6 |
| Architecture | AVR enhanced RISC, 8-bit | AVR enhanced RISC, 8-bit | AVR enhanced RISC, 8-bit | AVR enhanced RISC, 8-bit | AVR enhanced RISC, 8-bit | AVR enhanced RISC, 8-bit |
| Product Temperature Grade | U standard grade | I industrial grade | U standard grade | U standard grade | U standard grade | U standard grade |
Principaux différenciateurs
- Higher clock speed than 10 MHz ATtiny45 alternatives (vs ATTINY45-10PU)
- More Flash and SRAM than ATtiny25 (vs ATTINY25-20PU)
- Lower memory demand than ATtiny85 for compact firmware (vs ATTINY85-20PU)
- Standard-grade option with a direct industrial-grade counterpart (vs ATTINY45-20PI)
Notes de conception
Place the supply bypass capacitor immediately between the VCC and GND pins, and keep the RESET return path short and away from switching nodes. The eight-pin DIP outline leaves ample board space, but the six I/O pins still constrain track escape routing on dense boards. Verify pin 1 orientation against the PCB silkscreen and package drawing rather than relying only on the socket marking.
Decouple the AVR supply locally and route transient current away from sensitive I/O returns. Because the target supports 4 KB of Flash, 256 bytes of EEPROM, and 256 bytes of SRAM, firmware should avoid dynamic allocation and keep stack usage bounded. Store wear-sensitive EEPROM updates only when required, and use the manufacturer’s write-cycle guidance for persistent parameters.
Do not treat a shared 8-pin footprint as proof of a functionally identical substitute. ATTINY85-20PU changes Flash capacity, while 10 MHz ATtiny45 variants reduce timing headroom, and the V suffix changes the voltage configuration. Before substitution, check clock-dependent delays, timer behavior, reset thresholds, operating temperature, supply range, and the code size reported by the compiler.
For ISP programming and prototypes, reserve accessible test points for VCC, GND, RESET, and the serial programming signal pins. Keep programming adapter cables away from clocks and high-current outputs to prevent unintended interference. In a production layout, use the manufacturer package drawing for drill and land-pattern dimensions rather than relying on a generic DIP drawing.
Informations de conformité
The product is a general-purpose industrial and consumer microcontroller. No explicit RoHS, REACH, lead-free, halogen-free, conflict-minerals, or automotive qualification statement was identified in the product information used for this record.