ATTINY13: Datasheet, Pinout, and Simple Motor Control Guide
1KB Flash Microcontroller
The ATTINY13 is a robust 8-bit AVR microcontroller with 1KB Flash and 20MHz speed. Ideal for cost-effective motor control and LED designs. Check stock and datasheet.
- Executive Summary: What is the ATTINY13?
- 1. Technical Specifications & Performance Analysis
- 2. Pinout, Package, and Configuration
- 3. Design & Integration Guide (For Engineers & Makers)
- 4. Typical Applications & Use Cases
- 5. Alternatives and Cross-Reference Guide
- 6. Frequently Asked Questions (FAQ)
- 7. Datasheets & Resources
- Specifications
- Datasheet PDF
Executive Summary: What is the ATTINY13?
The ATTINY13 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture, designed to execute powerful instructions in a single clock cycle for efficient processing in space-constrained applications.
Market Position: High-volume, low-cost legacy controller for simple tasks where 32-bit MCUs are overkill.
Top Features:
Up to 20 MIPS throughput at 20 MHz.
1KB In-System Programmable Flash with 64 Bytes EEPROM.
OPERATING Voltage range of 1.8V to 5.5V (ATTINY13A variant).
Primary Audience: Ideal for IoT designers, hobbyists, and cost-sensitive consumer electronics manufacturers.
Supply Status: Active. Widely available with high search volume, though "Not Recommended for New Designs" (NRND) warnings may appear for specific non-A variants; the ATTINY13A is the preferred modern alternative.

ATTINY13 microcontroller product photo
1. Technical Specifications & Performance Analysis
1.1 Core Architecture (CPU/Logic/Power)
The ATTINY13 utilizes the AVR RISC architecture. It features 32 general-purpose working registers connected directly to the Arithmetic Logic Unit (ALU). This design allows two independent registers to be accessed in one single instruction executed in one clock cycle, optimizing power consumption versus processing speed. With 1KB of Flash memory, it is strictly intended for "bare-metal" C or Assembly code, as heavy libraries will quickly deplete resources.
1.2 Key Electrical Characteristics
Engineers must note the power profiles for reliable operation, particularly in battery-powered devices.
Operating Voltage:
1.8V to 5.5V (ATTINY13A)
2.7V to 5.5V (Standard ATTINY13)
Clock Speed: 0 - 20 MHz (at 4.5V - 5.5V).
Memory:
Flash: 1 KB (Self-Programmable)
SRAM: 64 Bytes (Internal)
EEPROM: 64 Bytes
Peripherals: 4-channel 10-bit ADC, Analog Comparator, and Watchdog Timer.
1.3 Interfaces and Connectivity
Despite its small size, the ATTINY13 offers essential connectivity for sensor interfacing and simple logic control.
I/O Pins: 6 Programmable I/O Lines (PB0–PB5).
Timers: One 8-bit Timer/Counter with Prescaler.
PWM: Two PWM channels (ideal for dimming LEDs or driving small motors).
Debug: DebugWIRE On-chip Debug System.

ATTINY13 functional block diagram
2. Pinout, Package, and Configuration
2.1 Pin Configuration Guide

ATTINY13 pinout diagram
The ATTINY13 is typically an 8-pin device. The pin functions are multiplexed:
Pin 1 (PB5/RESET): Acts as the Reset pin or I/O (if fuses programmed, but disables ISP).
Pin 4 (GND): Ground reference.
Pin 8 (VCC): Supply voltage.
Pin 2, 3 (PB3, PB4): Analog inputs (ADC2, ADC3) or General I/O.
Pin 5, 6, 7 (PB0, PB1, PB2): PWM outputs, External Interrupts, and SPI (MOSI/MISO/SCK) for programming.
2.2 Naming Convention & Ordering Codes
Understanding the Part Numbers:The suffix determines the package and temperature rating.
SSU: Surface Mount (SOIC), Industrial (-40°C to +85°C), Lead-Free.
PU: Through-hole (PDIP), Industrial, Lead-Free.
MMU: Micro Lead Frame (MLF/QFN), very small footprint.
A-series (e.g., ATTINY13A): newer, lower power manufacturing process (Picopower).
2.3 Available Packages
| Package Type | Dimensions | Common Use Case |
|---|---|---|
| 8-PDIP (PU) | 2.54mm pitch | Prototyping, Breadboards, Hobbyist kits |
| 8-SOIC (SSU) | 1.27mm pitch | Standard Consumer Electronics PCBs |
| 10-MLF (MMU) | 3x3mm | Wearables, Space-Critical designs |
3. Design & Integration Guide (For Engineers & Makers)
Pro Tip: Always verify pin compatibility before migrating from older series. The specific interrupt vectors may differ from ATtiny25/45/85.
3.1 Hardware Implementation
Bypass Capacitors: Place a 100nF ceramic capacitor as close as possible between VCC and GND to filter high-frequency noise.
PCB Layout: Keep the trace from the bypass capacitor to the ground pin short. No heatsink is required due to low power dissipation.
Programming Interface: Ensure headers for ISP (MISO, MOSI, SCK, RESET) are accessible for in-circuit programming.
3.2 Common Design Challenges
Based on engineering feedback and forum discussions, here are the top "Pain Points" and their solutions:
Extremely Limited RAM/Flash
The Issue: With only 1KB Flash/64B SRAM, standard libraries (like Arduino's
Delay()orSerial) often fail.The Fix: Use Assembly (ASM) or highly optimized bare-metal C. Use direct port manipulation (e.g.,
PORTB |= (1<<PB0)) instead of abstraction layers.Low Pin Count for Peripherals
The Issue: 6 I/O pins are insufficient for driving displays (LCDs) or keypads directly.
The Fix: Integrate shift registers (74HC595) to expand digital outputs using only 3 pins.
Toolchain Frustrations
The Issue: Modern MPLAB X IDEs can feel bloated for such a simple chip.
The Fix: Utilize AVR-GCC via command line or use VS Code with PlatformIO for a lightweight, efficient workflow.
4. Typical Applications & Use Cases
📺 Video Recommendation: ATTINY13 Guide
4.1 Real-World Example: Smart Timer Switch
A common application for the ATTINY13 is a delayed-off timer for bathroom ventilation fans.
Input: Reads a momentary push-button via one I/O pin (PB3).
Logic: The 8-bit timer counts roughly 10 minutes.
Output: PB0 drives an optocoupler/relay to cut power to the fan.
Advantage: The chip's sleep mode reduces standby current to microamps, allowing it to run off a simple capacitive dropper or small battery for years.

ATTINY13 application circuit schematic
5. Alternatives and Cross-Reference Guide
Ideally, stick to the ATTINY13A for active production. However, strictly based on specifications and footprint, consider these alternatives:
Direct Replacements / Upgrades:
ATTINY85: Same pinout but significantly more memory (8KB Flash) and features.
Microchip PIC12F675: Closest competitor in the PIC ecosystem (8-pin, Flash-based).
Competitor Equivalents:
STMicroelectronics STM8S001J3: An 8-pin option offering high performance at a low price point.
Texas Instruments MSP430G2211: Excellent for ultra-low power needs, though architecture differs significantly.
Silicon Labs EFM8BB10: A performant 8051-based alternative in small packages.
Cost vs. Performance:
For simpler logic, the ATTINY13 is often cheaper than the ATTINY85.
For complex math or USB support, upgrade to ATTINY85.
6. Frequently Asked Questions (FAQ)
Q: What is the difference between ATTINY13 and ATTINY13A?
A: The ATTINY13A is the updated "PicoPower" version. It covers a wider voltage range (1.8V–5.5V) and consumes less power than the original non-A version.
Q: Can ATTINY13 be used in automotive applications?
A: Yes, standard variants operate up to 85°C. For automotive, look for specific "Automotive Grade" ordering codes if available, or ensure the design handles 12V transients via regulation.
Q: Where can I find the datasheet and library files for ATTINY13?
A: The official datasheet is ID DS40002307A. Libraries are often community-maintained (e.g., MicroCore for Arduino IDE).
Q: Is ATTINY13 suitable for battery-operated devices?
A: Absolutely. Its wide voltage range (down to 1.8V) and low-power sleep modes make it excellent for coin-cell powered nodes.
Q: How do I program the ATTINY13 using Arduino?
A: You can use an "Arduino as ISP" setup. Connect the SPI pins (10, 11, 12, 13 on Uno) to the ATTINY13's MISO, MOSI, SCK, and Reset pins.
7. Datasheets & Resources
Official Datasheet: Download DS40002307A PDF
Development Ecosystem: Microchip Studio, MPLAB X, PlatformIO.
Specifications
Datasheet PDF
- datasheets :
STLINKV2 In-Circuit Debugger: Pinout, Datasheet and Programming21 July 202156128
IRF730 Transistor: Datasheet, Pinout, IRF730 vs. IRF74026 November 20217009
2N3904 VS 2N2222 NPN Transistor: What’s the Differences?07 April 20227523
WS2812B Addressable RGB LED: Datasheet, Pinout and Applications10 September 202124285
LM5175QPWPTQ1 DC/DC Controller: Pinout, Specification, and Datasheet01 July 20211698
8 Bit vs. 32 Bit: Which Bit-size is the Superior Choise?11 April 20226263
LTC6752IMS8-2#TRPBF Linear Comparator: Product Overview and Applications06 March 2024193
P6KE33A TVS Diodes: System, Pinout, and Datasheet20 April 20222027
How to Select Stepper Motor Controllers for Precision19 July 2025557
Top 10 OSAT (Outsourced Semiconductor Assembly and Test) Companies18 December 202557544
Breakout Boards Alternatives for Your Next Home Project02 July 2025820
Structure, Types and Working of Dry Cell04 March 202111345
Exploring the Cyber Physical System of Electric Vehicles25 March 20242505
The Understanding to Autonomous Driving Sensor10 November 20211154
Why Your Power Supply Ripple Is So Big?18 March 20224621
What is Cloud Storage?07 October 20211765
Microchip Technology
In Stock
United States
China
Canada
Japan
Russia
Germany
United Kingdom
Singapore
Italy
Hong Kong(China)
Taiwan(China)
France
Korea
Mexico
Netherlands
Malaysia
Austria
Spain
Switzerland
Poland
Thailand
Vietnam
India
United Arab Emirates
Afghanistan
Åland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antigua & Barbuda
Argentina
Armenia
Aruba
Australia
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius and Saba
Bosnia & Herzegovina
Botswana
Brazil
British Indian Ocean Territory
British Virgin Islands
Brunei
Bulgaria
Burkina Faso
Burundi
Cabo Verde
Cambodia
Cameroon
Cayman Islands
Central African Republic
Chad
Chile
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo
Congo (DRC)
Cook Islands
Costa Rica
Côte d’Ivoire
Croatia
Cuba
Curaçao
Cyprus
Czechia
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Falkland Islands
Faroe Islands
Fiji
Finland
French Guiana
French Polynesia
Gabon
Gambia
Georgia
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hungary
Iceland
Indonesia
Iran
Iraq
Ireland
Isle of Man
Israel
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Macao(China)
Madagascar
Malawi
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Micronesia
Moldova
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
North Korea
North Macedonia
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestinian Authority
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn Islands
Portugal
Puerto Rico
Qatar
Réunion
Romania
Rwanda
Samoa
San Marino
São Tomé & Príncipe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Sudan
Sri Lanka
St Helena, Ascension, Tristan da Cunha
St. Barthélemy
St. Kitts & Nevis
St. Lucia
St. Martin
St. Pierre & Miquelon
St. Vincent & Grenadines
Sudan
Suriname
Svalbard & Jan Mayen
Sweden
Syria
Tajikistan
Tanzania
Timor-Leste
Togo
Tokelau
Tonga
Trinidad & Tobago
Tunisia
Turkey
Turkmenistan
Turks & Caicos Islands
Tuvalu
U.S. Outlying Islands
U.S. Virgin Islands
Uganda
Ukraine
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Wallis & Futuna
Yemen
Zambia
Zimbabwe

















