

The ATtiny85 20PU is a small, low-power 8-bit microcontroller from the AVR family, designed for compact and efficient embedded systems. It features 8 KB of flash memory, 512 bytes of SRAM, and 6 general-purpose I/O pins. Its compact size, low power consumption, and ease of programming make it a popular choice for DIY electronics projects, wearable devices, and small-scale automation systems.








| Parameter | Value |
|---|---|
| Microcontroller Family | AVR |
| Flash Memory | 8 KB |
| SRAM | 512 bytes |
| EEPROM | 512 bytes |
| Operating Voltage | 2.7V - 5.5V |
| Maximum Clock Speed | 20 MHz |
| I/O Pins | 6 |
| ADC Channels | 4 (10-bit resolution) |
| PWM Channels | 2 |
| Package Type | PDIP-8 |
| Power Consumption | Low power (active and sleep modes) |
The ATtiny85 20PU comes in an 8-pin PDIP package. Below is the pinout and description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | PB5 (RESET) | Reset pin (active low) / GPIO |
| 2 | PB3 | GPIO / ADC3 / OC1B (PWM output) |
| 3 | PB4 | GPIO / ADC2 / OC1A (PWM output) |
| 4 | GND | Ground |
| 5 | PB0 | GPIO / ADC0 / MOSI (SPI) / SDA (I2C) |
| 6 | PB1 | GPIO / ADC1 / MISO (SPI) / SCL (I2C) |
| 7 | PB2 | GPIO / ADC1 / SCK (SPI) |
| 8 | VCC | Power supply (2.7V - 5.5V) |
The ATtiny85 can be programmed using the Arduino IDE and an Arduino UNO as an ISP. Below is an example of blinking an LED connected to PB0:
// Blink an LED on PB0 (Pin 5 on the ATtiny85)
void setup() {
pinMode(0, OUTPUT); // Set PB0 as an output pin
}
void loop() {
digitalWrite(0, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(0, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
The ATtiny85 is not responding to programming commands.
The LED does not blink as expected.
High power consumption in battery-powered applications.
Incorrect fuse bit settings.
Can the ATtiny85 run at 20 MHz?
How do I use the ATtiny85 for I2C communication?
Wire library in the Arduino IDE. PB0 (SDA) and PB2 (SCL) are the I2C pins.Can I use the ATtiny85 without an external programmer?
What is the maximum current the I/O pins can source or sink?
By following this documentation, you can effectively use the ATtiny85 20PU in your projects and troubleshoot common issues with ease.