ATTINY45-20SH - 8-Bit AVR MCU | Microchip Technology
MPN: ATTINY45-20SH ✓ 啟用中ATTINY45-20SH 概覽
An 8-bit AVR microcontroller is a reduced-instruction-computing device within the broader embedded-controller and semiconductor hierarchy. Unlike a general-purpose processor, it integrates flash memory, SRAM, timers, serial interfaces, analog conversion, and digital I/O into one device. This integration reduces board area and external-component count in compact products where cost, energy efficiency, and deterministic control are more important than high computational throughput.
The ATTINY45 combines four 8-bit timers with PWM support, a 10-bit successive-approximation analog-to-digital converter, and serial interfaces including SPI and TWI. Its digital I/O can support inputs, outputs, interrupts, and external interrupts, while its ADC provides an economical way to measure analog sensor signals. The 20 MHz operating capability provides additional timing margin for motor control, dimming, signal generation, and multi-peripheral designs compared with systems clocked only from a slow internal oscillator.
The ATTINY45 is based on the AVR architecture, which uses a Harvard-style organization with separate program and data-memory spaces. Programs are stored in on-chip flash, while data and working variables use SRAM. Its compact instruction set is well suited to event-driven embedded control, and the ADC, timers, and PWM channels can reduce reliance on external discrete components in consumer appliances, lighting, instrumentation, and simple industrial interfaces.
Typical applications include LED lighting, temperature and sensor interfaces, hobby electronics, compact control panels, battery-powered accessories, small motor controllers, and educational development boards. In an Arduino-style project, the device can be programmed with a compatible AVR programmer and used for sensing, timing, and actuator control. Its small SOIC-8 footprint also permits reuse of compact PCB layouts, although the exposed I/O count is substantially lower than that of larger AVR microcontrollers.
Designers should verify the exact ADC inputs, timer channels, serial-interface pins, and programming connections against the manufacturer’s pin-description table before routing a PCB. The device is clock-intensive and supply-sensitive, so use the manufacturer-recommended decoupling capacitor, keep sensitive analog routing away from fast switching nodes, and provide a stable clock source when accurate timing is required.
This product page consolidates the ATTINY45-20SH specifications, package details, programming information, drop-in alternatives, and practical design guidance. It is intended to help engineers compare memory, peripheral, and footprint constraints before selecting a compact 8-bit AVR controller for a new embedded system.
直接替換替代品,適用於 ATTINY45-20SH — 相同封裝,腳位對腳位相容。需重新設計 PCB 的不同封裝零件不列入。
ATTINY44-20SH
✅ 直接替換 ⚠️ 規格未經驗證📋 參考替代品(不在目錄中)
ATTINY24-20SH
✅ 直接替換 ⚠️ 規格未經驗證📋 參考替代品(不在目錄中)
ATTINY85-20SH
✅ 直接替換 ⚠️ 規格未經驗證聯絡詢價
查看資料表 →ATTINY84-20SH
✅ 直接替換 ⚠️ 規格未經驗證📋 參考替代品(不在目錄中)
ATTINY25-20SH
✅ 直接替換 ⚠️ 規格未經驗證📋 參考替代品(不在目錄中)
ATTINY45-20SH 最大額定值與電氣特性
| Product Type | 8-bit AVR Microcontroller |
| Architecture | AVR |
| 最大時脈頻率 | 20 MHz |
| Flash Memory | 4 KB |
| SRAM | 256 bytes |
| EEPROM | 64 bytes |
| General-Purpose I/O Pins | 32 pins |
| ADC Resolution | 10-bit |
| Timer/PWM Counters | 4 |
| Serial Interfaces | SPI and TWI |
| Supply Voltage Range | 2.7 V to 5.5 V |
| Internal RC Oscillator | 8.0 MHz and 9.0 MHz |
| External Clock Range | 0 MHz to 20 MHz |
| 工作溫度範圍 | -40C to +85C |
| 封裝 | SOIC-8 |
| 安裝類型 | Surface Mount |
| Program Memory Type | Flash |
ATTINY45-20SH soic-8 腳位配置指南
ATTINY45-20SH(soic-8 封裝)的腳位配置。 此數位 IC 包含 GPIO、通訊介面(UART、SPI、I2C)與電源腳位。替代腳位功能與配置選項請參閱製造商資料表。對嵌入式系統設計與 PCB 佈局至關重要。
無詳細腳位定義資料: ATTINY45-20SH.
請參閱 資料表 以查看完整腳位配置。
典型應用
ATTINY45-20SH 適用於 6 應用s: LED Lighting Control, Temperature and Analog Sensor Interface, Small Motor and Actuator Control, Compact Consumer Appliance Control, Educational Robotics and Hobby Projects, Battery-Powered Sensor Node.
LED Lighting Control
The ATTINY45-20SH is suitable for compact LED lighting controllers because its four timer/PWM counters can generate multiple dimming signals while the 10-bit ADC can monitor a current-sense or ambient-light signal. A designer can place the device between a low-voltage supply and one or more LED channels, using timer outputs for PWM dimming and software limits for thermal and current protection. The 20 MHz clock capability provides useful timing headroom for debouncing, status sequencing, and communication with a lighting controller. Because the SOIC-8 package exposes fewer pins than larger AVR devices, verify the selected PWM channels, ADC inputs, and serial functions in the manufacturer pin table before finalizing the layout.
推薦
Temperature and Analog Sensor Interface
The ATTINY45-20SH can serve as the acquisition controller for a compact temperature, potentiometer, or resistive-sensor module. Its 10-bit successive-approximation ADC converts the analog input, while timers and interrupts can schedule periodic readings without tying up the main processing loop. The 20 MHz maximum clock permits a practical divider and prescaler configuration for regular sampling. Place the analog input away from switching traces and LED-driver paths, reference the ADC input with suitable signal conditioning, and maintain a quiet ground connection. Firmware should also apply calibration and filtering because sensor accuracy and noise can depend on the external divider, source impedance, and PCB layout.
推薦
Small Motor and Actuator Control
The ATTINY45-20SH can control a small motor, solenoid, or other actuator through an external driver stage. Its timer and PWM resources support speed modulation, pulse-width control, or basic position routines, while the 20 MHz clock allows faster control-loop execution than a low-frequency internal-clock-only configuration. The microcontroller should not drive a motor directly; use a transistor or integrated driver with the appropriate voltage and current rating. Add flyback protection for inductive loads and verify the actuator’s startup current. A sensor connected to an ADC input can support closed-loop behavior, while GPIO inputs can read limit switches or Hall-effect sensors through suitable conditioning circuitry.
推薦
Compact Consumer Appliance Control
The ATTINY45-20SH fits compact household appliances and accessories that require a small controller for button input, status indication, timing, and low-rate serial communication. Its 4 KB of flash can hold a focused control program, and the integrated ADC enables analog functions such as level sensing without a separate converter. The eight-pin package minimizes board footprint, while SPI or TWI can connect a display, sensor, or configuration memory when the required pins are available. Use the manufacturer’s pin multiplexing table because several functions share the same pins. A robust appliance design should include debouncing, brownout-aware behavior, ESD protection on exposed connectors, and a defined state for power loss or firmware lockup.
推薦
Educational Robotics and Hobby Projects
The ATTINY45-20SH is a practical controller for educational robotics, hobby automation, and small demonstrator projects. Its AVR architecture is supported by established programming tools, while four timer/PWM channels allow students to control multiple LED indicators, servos through a driver, or simple motion mechanisms. The 10-bit ADC introduces real analog measurement to classroom exercises involving potentiometers, light sensors, or temperature probes. At 20 MHz, the processor provides sufficient timing resolution for line-following logic, pulse generation, and serial experiments. The SOIC-8 format also makes the device accessible on compact perfboards and custom teaching boards, provided the designer uses the correct programming connection and observes the device’s pin multiplexing limitations.
推薦
Battery-Powered Sensor Node
The ATTINY45-20SH can act as the low-power controller in a small battery-powered sensor node when the design uses its timers, interrupts, and ADC selectively. A duty-cycled firmware schedule can keep the MCU inactive between measurements, reducing average current draw, while a timer or external interrupt can wake the device for a periodic reading or user event. The 2.7 V to 5.5 V operating range supports common low-energy rails, although the final regulator and battery chemistry determine usable voltage. Choose a clock configuration that supports both timing accuracy and low power, and confirm wake-up behavior in the manufacturer documentation. Low-power operation still requires attention to sensor standby current, pull-up resistance, and leakage through externally connected circuitry.
推薦
推薦產品摘要
工程參考資料,適用於 ATTINY45-20SH — 比較、設計指引及合規資訊。
選型指南
與替代品比較
| 參數 | 本產品 | ATTINY44-20SH | ATTINY24-20SH | ATTINY85-20SH | ATTINY84-20SH | ATTINY25-20SH |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | SOIC-8 | SOIC-8 | SOIC-8 | SOIC-8 | SOIC-8 | SOIC-8 |
| Architecture | AVR 8-bit | AVR 8-bit | AVR 8-bit | AVR 8-bit | AVR 8-bit | AVR 8-bit |
| Flash Memory | 4 KB | 4 KB | 2 KB | 8 KB | 8 KB | 2 KB |
| SRAM | 256 bytes | 256 bytes | 128 bytes | 512 bytes | 512 bytes | 128 bytes |
| Maximum Clock Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| General-Purpose I/O Pins | 32 pins | 32 pins | 32 pins | 32 pins | 32 pins | 32 pins |
| ADC Resolution | 10-bit | 10-bit | 10-bit | 10-bit | 10-bit | 10-bit |
| Supply Voltage Range | 2.7 V to 5.5 V | 2.7 V to 5.5 V | 2.7 V to 5.5 V | 2.7 V to 5.5 V | 2.7 V to 5.5 V | 2.7 V to 5.5 V |
| Serial Interfaces | SPI and TWI | SPI and TWI | SPI and TWI | SPI and TWI | SPI and TWI | SPI and TWI |
主要差異化特點
- Balanced timer and memory resources (對比ATTINY44-20SH)
- Twice the program memory and SRAM (對比ATTINY25-20SH)
- Lower memory demand than the 8 KB AVR alternatives (對比ATTINY85-20SH)
- Four timer/PWM channels for compact control (對比ATTINY24-20SH)
設計說明
Route the programming signals, reset connection, decoupling capacitor, and ground return with short paths. The AVR core and analog converter can be sensitive to supply noise and switching-node coupling, so place the manufacturer-recommended decoupling capacitor immediately across the appropriate supply pins. Keep analog sensor traces away from PWM outputs, relay drivers, and inductors. If the design uses an external clock, provide a controlled source and follow the recommended decoupling and layout arrangement around the oscillator circuit.
Estimated: supply dissipation depends on operating voltage, clock frequency, active peripherals, and load. Calculate the MCU current from the worst-case operating state and multiply it by the supply voltage to estimate input power; the resulting difference between input power and useful output power becomes device dissipation. Because this estimate does not include regulator efficiency, the supply should be sized with additional margin. Verify brownout behavior at the minimum battery or rail voltage and use the manufacturer’s reset and fuse settings when a controlled startup is required.
Do not assume that a device sharing the SOIC-8 footprint is firmware-compatible. Timer channels, ADC inputs, interrupt vectors, and serial-function assignments can differ among ATTINY family members. Before replacing the ATTINY45-20SH, rebuild the project for the selected device, review the linker memory report, and validate every pin-dependent peripheral. Also check that the replacement’s flash and SRAM capacity is adequate rather than relying only on the physical footprint.
The eight-pin package limits simultaneous peripheral use because several functions share pins. Create a pin-assignment table before schematic capture and mark every ADC, PWM, UART, SPI, and TWI connection. Reserve the programming interface even if the final product does not expose it externally. Use test points when appropriate so firmware can be updated without redesigning the board, and maintain a consistent ground reference between the microcontroller, ADC source, and external communication circuitry.
合規資訊
The ATTINY45-20SH is an industrial embedded microcontroller rather than an automotive-qualified device. Confirm current environmental, material, and finish declarations with Microchip Technology for the exact ordering code.