Microchip Technology

ATTINY45-20SH - 8-Bit AVR MCU | Microchip Technology

部品番号: ATTINY45-20SH ✓ 生産中
2.7 V to 5.5 V Vdss SOIC-8 Package 20 MHz Speed 4 KB Memory
MOQ: 1 |

ATTINY45-20SH 概要

The Microchip Technology ATTINY45-20SH is an 8-bit AVR microcontroller optimized for compact embedded-control designs and housed in an 8-pin SOIC package. It combines 4 KB of flash program memory, 256 bytes of SRAM, and up to 32 general-purpose I/O pins in a small footprint. The “-20” speed designation supports operation at up to 20 MHz, while the “SH” ordering code identifies the SOIC-8 package configuration.

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

✅ ドロップイン ⚠️ 仕様未検証
📦 SOIC-8
Flash remains 4 KB and SRAM remains 256 bytes, but the ATTINY44 has fewer timer/PWM resources than the ATTINY45.

📋 参考代替品(カタログ未掲載)

ATTINY24-20SH

✅ ドロップイン ⚠️ 仕様未検証
📦 SOIC-8
Flash is 2 KB, 50% below the ATTINY45, and SRAM is 128 bytes, 50% below the ATTINY45; timer resources are also reduced.

📋 参考代替品(カタログ未掲載)

ATTINY85-20SH

✅ ドロップイン ⚠️ 仕様未検証
Microchip Technology
📦 SOIC-8
8-bit AVR microcontroller · 20 MHz · 8 KB · 512 bytes · 512 bytes · 6 pins · 8 bits · 4 channels

価格はお問い合わせください

データシートを見る →

ATTINY84-20SH

✅ ドロップイン ⚠️ 仕様未検証
📦 SOIC-8
Flash is 8 KB, 100% above the ATTINY45, and SRAM is 512 bytes, 100% above the ATTINY45; the expanded timer set may require firmware review.

📋 参考代替品(カタログ未掲載)

ATTINY25-20SH

✅ ドロップイン ⚠️ 仕様未検証
📦 SOIC-8
Flash is 2 KB, 50% below the ATTINY45, and SRAM is 128 bytes, 50% below the ATTINY45; PWM channels and timer resources are reduced.

📋 参考代替品(カタログ未掲載)

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 の soic-8 パッケージピン配置図

詳細なピン配置データはありません: 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.

Where can I download the ATTINY45-20SH datasheet PDF?
The ATTINY45-20SH datasheet is available through Microchip Technology’s official ATTINY45 product page. Download the current document from that page before finalizing a design because the complete datasheet contains the authoritative pin descriptions, electrical characteristics, clock options, ADC tables, and recommended application circuits. Search the document for “pin configuration” and “electrical characteristics” when assigning PCB tracks or calculating timing margins.
What are the key specifications of ATTINY45-20SH that engineers should know?
The ATTINY45-20SH is an 8-bit AVR microcontroller with 4 KB of flash memory, 256 bytes of SRAM, 32 I/O pins, and operation up to 20 MHz in an 8-pin SOIC package. Its integrated resources include a 10-bit ADC, four timer/PWM counters, SPI, and TWI. According to the Microchip Technology ATTINY45 documentation, these resources support compact sensing, timing, communication, and actuator-control designs.
What is the ATTINY45-20SH pinout?
The ATTINY45-20SH uses an 8-pin SOIC footprint with power, ground, reset, programming, clock, and multifunction I/O connections. Because several pins support multiple peripheral functions, their final assignments depend on the selected clock source and enabled peripherals. Use the manufacturer’s pin-description table to confirm the exact function of every package pin, especially ADC channels, timer outputs, SPI, and TWI.
Is ATTINY45-20SH suitable for Arduino projects?
The ATTINY45-20SH is suitable for compact Arduino-style projects that fit within its 4 KB program memory and eight-pin package. An Arduino-compatible programming tool and a supported AVR ISP interface can load the firmware, while bootloader use depends on the selected development platform and programmer configuration. The device is particularly useful for small lighting, sensor, timer, and simple control projects.
How do I program the ATTINY45-20SH?
Program the ATTINY45-20SH through its serial programming interface using a compatible AVR programmer, the manufacturer’s programming tool, or a supported embedded-development environment. The connection includes power, ground, reset, and the programming data and clock signals. Confirm the selected programmer’s logic levels against the ATTINY45 supply voltage and follow the fuse and clock configuration procedures in the programming documentation.
Can ATTINY45-20SH be used for USB designs?
The ATTINY45-20SH does not include a native USB peripheral, so it cannot implement USB communications without additional circuitry and firmware. It can still control a USB interface implemented with an external controller, but the simpler approach is to select an AVR or other microcontroller family with integrated USB support. The ATTINY45 remains appropriate when the USB function is handled elsewhere on the board.
What can replace the ATTINY45-20SH?
The closest same-family replacements are pin-compatible AVR devices such as the ATTINY25-20SH, ATTINY44-20SH, ATTINY85-20SH, and ATTINY84-20SH. Each uses the same SOIC-8 format, but flash memory and peripheral resources differ. Choose a replacement according to required program space, ADC channels, timer count, serial interfaces, and operating speed rather than relying on package compatibility alone.
Is ATTINY45-20SH the same as ATTINY85-20SH?
No. The ATTINY45-20SH and ATTINY85-20SH use the same 8-pin SOIC format, but they are not electrically identical. The ATTINY45 provides 4 KB of flash and 256 bytes of SRAM, whereas the ATTINY85 provides 8 KB of flash and 512 bytes of SRAM. The ATTINY85 also supports the larger AVR timer and PWM feature set, so software can require modification.
ATTINY45-20SH vs ATTINY85-20SH: which is better for a compact controller?
The ATTINY45-20SH is better when program memory, SRAM, and timer resources fit a compact control task, while the ATTINY85-20SH is preferable for more complex firmware or greater PWM capability. Both operate in the 8-pin SOIC format and support fast clocking. The ATTINY85 offers 8 KB of flash and 512 bytes of SRAM, compared with 4 KB and 256 bytes in the ATTINY45.
When should I choose ATTINY45-20SH over ATTINY44-20SH?
Choose the ATTINY45-20SH when the design benefits from its four timer/PWM counters and broader timing resources. The ATTINY44-20SH offers similar 4 KB flash and 256 bytes of SRAM but has a smaller timer feature set. For a simple analog measurement or serial interface, either may work; for multiple PWM outputs or timing channels, the ATTINY45 generally offers more capability in the same footprint.
When should I choose ATTINY45-20SH over ATTINY25-20SH?
Choose the ATTINY45-20SH when the firmware needs more program memory, SRAM, and peripherals than the ATTINY25-20SH provides. The ATTINY45 includes 4 KB of flash and 256 bytes of SRAM, while the ATTINY25 includes 2 KB of flash and 128 bytes of SRAM. The ATTINY25 may be sufficient for a very small control task, but the ATTINY45 offers more room for growth and more complex timing.
Where can I buy ATTINY45-20SH and check its current lead time?
Use the Request a Quote form on this page to request the current ATTINY45-20SH unit availability, lead time, and quantity pricing. Quote requests allow the exact ordering code, package, and shipment quantity to be confirmed together. Provide the programming and delivery requirements with the request so the commercial response reflects the configuration needed for production.
How much does the ATTINY45-20SH cost?
The current ATTINY45-20SH price is not stated as a fixed value because distributor pricing can change with order quantity and market conditions. Use the Request a Quote form on this page for a current response for the exact MPN. Include the required order quantity, target packaging, shipment destination, and expected production schedule to obtain an actionable quotation.
Is the ATTINY45-20SH currently in stock and what is its lead time?
Current stock and lead time for the ATTINY45-20SH should be confirmed through the Request a Quote form on this page. Availability can vary with the exact package code, order quantity, and production schedule. The form is the appropriate route for a current manufacturing commitment rather than relying on a historical catalog record.
Can an ATTINY84-20SH replace the ATTINY45-20SH in an existing PCB?
The ATTINY84-20SH can use the same 8-pin SOIC footprint, making it a potential hardware replacement, but software and resource requirements must be reviewed first. It provides 8 KB of flash and 512 bytes of SRAM compared with 4 KB and 256 bytes in the ATTINY45-20SH, while retaining a broadly similar peripheral architecture. Existing firmware should be recompiled and all timer, ADC, and interrupt assignments revalidated.

エンジニアリング参考データ: ATTINY45-20SH — 比較、設計ガイダンス、コンプライアンス情報。

選定ガイド

Choose the ATTINY45-20SH when an application needs a compact SOIC-8 AVR controller with 4 KB of flash, 256 bytes of SRAM, four timer/PWM channels, a 10-bit ADC, and operation up to 20 MHz. Select the ATTINY44-20SH when similar memory capacity is sufficient but the larger timer set is unnecessary. Select the ATTINY25-20SH only for smaller firmware that fits within 2 KB of flash and 128 bytes of SRAM. Choose the ATTINY85-20SH when 8 KB of flash and 512 bytes of SRAM support more complex control software. The ATTINY84-20SH provides a larger memory and timer platform while retaining the same SOIC-8 footprint. In every case, package compatibility does not guarantee binary firmware compatibility: recompile the application, review timer and ADC assignments, and verify package pin functions before replacing the 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 (vs ATTINY44-20SH)
  • Twice the program memory and SRAM (vs ATTINY25-20SH)
  • Lower memory demand than the 8 KB AVR alternatives (vs ATTINY85-20SH)
  • Four timer/PWM channels for compact control (vs 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.

コンプライアンス情報

RoHS
Unknown
REACH
Unknown
AEC-Q100
Not Applicable
鉛フリー
Unknown
ハロゲンフリー
Unknown
紛争鉱物
Unknown

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.

データ検証日: 2026-11-28 — データはXAIPARTの部品エンジニアリングチームによって検証・管理されています

関連検索

attiny45 pinout attiny45 datasheet attiny45 vs attiny85 attiny45 arduino attiny45 price attiny45 programming attiny45 usb attiny45 programmer ATTINY45-20SH datasheet ATTINY45-20SH pinout ATTINY45-20SH equivalent ATTINY45-20SH replacement ATTINY45-20SH price Microchip ATTINY45-20SH ATTINY45-20SH vs ATTINY85-20SH

関連部品&用語

Microchip Technology ATTINY45-20SH ATTINY44-20SH ATTINY24-20SH ATTINY85-20SH ATTINY84-20SH ATTINY25-20SH AVR 8-bit microcontroller embedded controller reduced-instruction-computing microcontroller semiconductor 4 KB flash memory 256-byte SRAM 10-bit ADC timer/PWM counters SPI TWI SOIC-8 surface-mount package serial programming interface LED lighting control analog sensor interface small motor control
クイック見積RFQ
詳細をすべてご記入ください — 営業チームが24時間以内にご返信いたします
部品番号 メーカー パッケージ QTY 目標価格 小計
✓
見積を送信しました!

24時間以内にメールでご返信いたします

1
RFQ送信済み
2
見積受領
3
注文済み
4
お支払い
5
発送済み
6
配達済み
RFQの詳細を表示