ATTINY45-20XU - 20MHz 8-Bit AVR MCU with 4KB Flash | Microchip
N.º de pieza: ATTINY45-20XU ✓ ActivoATTINY45-20XU Descripción general
A microcontroller is a programmable integrated circuit that combines a CPU core, nonvolatile program memory, data memory, and peripherals in one package. The ATTINY45 belongs to the TinyAVR hierarchy, where TinyAVR is a small-footprint AVR family within the broader 8-bit microcontroller and embedded-control semiconductor categories. Its compact package and mixed signal peripherals are useful for cost-sensitive control, sensing, and automation products.
Key capabilities include a maximum 20 MHz operating frequency, 4 KB Flash organized as 2K by 16, 256 bytes of EEPROM, and 256 bytes of SRAM. Six I/O pins support digital control functions, while the listed ADC and USI features extend the device beyond basic GPIO operation. The 8-TSSOP package reduces board area compared with larger microcontroller packages and supports surface-mount assembly.
The enhanced AVR RISC architecture provides a compact instruction set and efficient execution for embedded workloads. Program development is supported through the AVR programming ecosystem, including In-System Programming and ISP-compatible programming workflows. Because the device combines 4 KB of Flash with 256 bytes of SRAM, firmware must remain compact and avoid relying on large buffering or high-resolution data sets.
Typical uses include compact sensor controllers, LED and lighting control nodes, small industrial automation modules, IoT accessories, and embedded consumer products. In these applications, the ATTINY45-20XU can sample an analog input, execute control logic, drive outputs, and retain configuration data in EEPROM. Its small 8-pin footprint is particularly useful where board area, power consumption, and production cost are more important than high memory capacity.
PCB designers should preserve access to the programming pins and provide clean supply decoupling near VCC and GND. ADC-enabled designs should also route the analog input away from switching nodes and follow the manufacturer datasheet when selecting bypass capacitors. Firmware validation should include clock, reset, programming, and brownout behavior across the intended 5 V operating condition.
This product page consolidates the core ATtiny45 specifications, ordering information, drop-in replacement findings, and practical design guidance into a focused engineering reference. It helps engineers evaluate the ATTINY45-20XU for compact AVR control designs while separating verified device characteristics from parameters that require confirmation from the manufacturer datasheet.
Alternativas directas para ATTINY45-20XU — mismo encapsulado, compatible pin a pin. Se excluyen las piezas de otro encapsulado que requieren retrabajo de la PCB.
No hay alternativas directas disponibles para este producto.
Solicitar alternativasATTINY45-20XU Valores máximos y características eléctricas
| Product Type | 8-bit AVR RISC microcontroller |
| Frecuencia de reloj máxima | 20 MHz |
| Flash Memory | 4 KB (2K x 16), in-system programmable |
| EEPROM Memory | 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 |
| ADC Resolution | 10-bit |
| Encapsulado | 8-pin TSSOP |
| Tipo de montaje | Surface mount |
| Instruction Set | Enhanced AVR RISC architecture |
| Programming Interface | In-System Programming |
| Peripheral Interfaces | Universal Serial Interface and ADC |
| Functional Safety | Functional Safety (FuSa) device classification |
Configuración de pines de ATTINY45-20XU
| Pin 1 | PB3 — General-purpose I/O pin |
| Pin 2 | PB4 — General-purpose I/O pin |
| Pin 3 | GND — Ground connection |
| Pin 4 | PB5 — General-purpose I/O pin |
| Pin 5 | PB0 — General-purpose I/O pin |
| Pin 6 | PB1 — General-purpose I/O pin |
| Pin 7 | PB2 — General-purpose I/O pin |
| Pin 8 | VCC — Power supply connection |
Aplicaciones típicas
ATTINY45-20XU es adecuado para 6 aplicacións: Compact Sensor Controller, LED Lighting Control, Industrial Automation Module, IoT Accessory Controller, Battery-Powered Control Module, Embedded Consumer Product.
Compact Sensor Controller
The ATTINY45-20XU is suitable for compact sensor nodes that need local signal conditioning, threshold decisions, and status reporting. Its 10-bit ADC can digitize an analog sensor output, while six general-purpose I/O lines can handle digital inputs, alarm outputs, or configuration signals. The 20 MHz clock gives short interrupt and control latency, while 4 KB of Flash accommodates a focused firmware image and 256 bytes of EEPROM can retain calibration or configuration values. A practical design places decoupling close to VCC and GND, routes the ADC input away from switching nodes, and uses the pin-description table in the manufacturer datasheet when assigning the six available I/O lines.
Recomendado
LED Lighting Control
The ATTINY45-20XU can serve as the local controller in a small LED lighting module, using timer compare outputs for dimming, blink patterns, or status indication. Its 8-bit timer/counter with compare modes is useful for repeatable timing, while the 20 MHz clock leaves processing capacity for control logic, button handling, and fault detection. The six I/O lines are sufficient for several LED channels and switch inputs when the design does not require more peripherals. Keep LED current paths and inductive switching nodes separate from the MCU supply and analog input routing, and size any driver transistors according to the LED load rather than driving excessive current directly from the MCU pins.
Recomendado
Industrial Automation Module
The ATTINY45-20XU fits small industrial automation modules that combine discrete inputs with limited analog sensing. Its six I/O lines can monitor contact states, command relays through suitable driver circuitry, and provide status indication, while the 10-bit ADC can support a 0-to-10 V or current-sensed process input after suitable scaling and protection. The device's 20 MHz clock supports responsive debouncing and deterministic control routines. For factory equipment, isolate the MCU from inductive loads, include robust input protection, and test power-loss and brownout recovery. The manufacturer datasheet should define the exact supply limits and reset behavior used in the final control design.
Recomendado
IoT Accessory Controller
The ATTINY45-20XU can manage the low-speed control functions in an IoT accessory when the accessory also includes a separate communication device. Six I/O lines can operate relays, indicators, or user inputs, and the ADC can monitor a battery or sensor divider. The 20 MHz processor is appropriate for foreground control, debouncing, and local state management, but the 4 KB Flash and 256-byte SRAM require careful firmware sizing. Use the USI for a suitable serial link when the external peripheral supports it, and keep radio or high-current switching circuitry away from the analog and clock paths. This arrangement permits modular product construction without overloading the small MCU.
Recomendado
Battery-Powered Control Module
The ATTINY45-20XU is appropriate for small battery-powered control modules that wake periodically, read a limited set of inputs, and place external circuitry into a low-power state. Its compact 8-TSSOP package reduces board area, while 256 bytes of EEPROM can hold small configuration records and its 256-byte SRAM supports lightweight control routines. The ATtiny45 family also includes power-saving operating modes, although the final sleep current and wake-up timing must be taken from the manufacturer datasheet. Use a regulator appropriate for the battery chemistry, account for ADC reference and divider errors, and test every peripheral state for unintended current draw before defining the module's battery life.
Recomendado
Embedded Consumer Product
The ATTINY45-20XU can add local intelligence to a compact consumer accessory such as a simple control panel, calibration module, or interface adapter. Its 20 MHz clock supports responsive menu handling and debounce logic, while six I/O lines and the 10-bit ADC cover many basic front-panel functions. The 4 KB program-memory limit favors focused code and lean libraries, and the 256-byte SRAM requires streaming rather than buffering large datasets. Designers should keep ESD-sensitive user inputs away from long PCB traces, provide a stable supply reference for ADC measurements, and follow the manufacturer pin table to preserve ISP access for production programming and firmware updates.
Recomendado
Resumen de productos recomendados
Datos de referencia de ingeniería para ATTINY45-20XU — comparación, orientación de diseño e información de cumplimiento.
Guía de selección
Comparación con alternativas
| Parámetro | Este producto |
|---|---|
| Brand | Microchip Technology |
| Package | 8-pin TSSOP |
| CPU Architecture | 8-bit AVR RISC |
| Maximum Clock Frequency | 20 MHz |
| Flash Memory | 4 KB (2K x 16) |
| EEPROM Memory | 256 bytes |
| SRAM | 256 bytes |
| General-Purpose I/O Lines | 6 |
| ADC Resolution | 10-bit |
| Timer/Counter | 1 x 8-bit timer/counter with compare modes |
Notas de diseño
Place the supply bypass capacitor close to the VCC and GND pins, and keep the ground return path short to reduce switching noise across the MCU. Route the ADC input away from relay, LED, and power-converter nodes. The 8-pin TSSOP footprint leaves limited escape routing, so use a stable pad arrangement and follow the manufacturer land pattern rather than improvising a footprint.
Budget regulator headroom, startup current, and load transient behavior around the ATtiny45's 5 V operating configuration. The device has only 256 bytes of SRAM and limited peripheral resources, so power-efficient firmware is also important in battery applications. Use the manufacturer electrical characteristics to select bypass capacitors and confirm brownout, reset, and sleep-mode behavior during system validation.
Do not select a smaller-memory ATtiny25 variant when firmware depends on the ATTINY45's 4 KB Flash, and do not assume ATtiny85 software is binary-compatible without confirming the memory map and peripheral differences. Keep ISP programming access available on assembled boards. Similarly, verify every 8-pin package variant for matching lead dimensions and pin numbering rather than treating all eight-pin AVR packages as interchangeable footprints.
Información de cumplimiento
The manufacturer listing identifies the device as Functional Safety (FuSa) classified. Formal RoHS, REACH, lead-free, halogen-free, conflict-minerals, and automotive qualification documentation should be confirmed for the exact ordering code.