

The Microchip ATtiny85 is a compact, low-power 8-bit microcontroller designed for embedded applications and simple control tasks. With its small form factor and versatile features, the ATtiny85 is ideal for projects requiring minimal space and power consumption. It features 8 KB of flash memory, 512 bytes of SRAM, and 6 general-purpose I/O pins, making it a popular choice for hobbyists and professionals alike.








The ATtiny85 is packed with features that make it suitable for a wide range of applications. Below are its key technical specifications:
| Parameter | Value |
|---|---|
| Manufacturer | Microchip Technology |
| Part Number | ATtiny85 |
| Architecture | 8-bit AVR |
| Flash Memory | 8 KB |
| SRAM | 512 bytes |
| EEPROM | 512 bytes |
| Operating Voltage | 2.7V to 5.5V |
| Clock Speed | Up to 20 MHz (with external clock) |
| I/O Pins | 6 |
| ADC Channels | 4 (10-bit resolution) |
| PWM Channels | 2 |
| Communication Interfaces | I2C, SPI, and UART (via software) |
| Package Type | PDIP-8 |
| Power Consumption | Low-power modes available |
The ATtiny85 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 / ADC input |
| 2 | PB3 | GPIO / ADC input / PWM output / SPI MOSI |
| 3 | PB4 | GPIO / ADC input / PWM output / SPI MISO |
| 4 | GND | Ground |
| 5 | PB0 | GPIO / ADC input / PWM output / SPI SCK |
| 6 | PB1 | GPIO / ADC input / PWM output |
| 7 | PB2 | GPIO / ADC input / I2C SDA / SPI SS |
| 8 | VCC | Power supply (2.7V to 5.5V) |
The ATtiny85 is versatile and can be used in a variety of circuits. Below are the steps and considerations for using it effectively:
The ATtiny85 can be programmed using an Arduino UNO as an ISP (In-System Programmer). Follow these steps:
Below is an example of using the ATtiny85 to blink an LED connected to PB0 (Pin 5):
// Blink an LED on PB0 (Pin 5) of the ATtiny85
// Ensure the LED is connected with a current-limiting resistor
#define LED_PIN 0 // PB0 is digital pin 0 on the ATtiny85
void setup() {
pinMode(LED_PIN, OUTPUT); // Set PB0 as an output pin
}
void loop() {
digitalWrite(LED_PIN, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(LED_PIN, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
The ATtiny85 is not responding to programming commands.
The LED does not blink in the example code.
The ATtiny85 overheats during operation.
Q: Can the ATtiny85 run on batteries?
A: Yes, the ATtiny85 is designed for low-power applications and can run on batteries. Use sleep modes to extend battery life.
Q: How do I use the ATtiny85 for I2C communication?
A: The ATtiny85 supports I2C via software libraries like TinyWire. Connect PB0 (SCL) and PB2 (SDA) to the I2C bus.
Q: Can I use the ATtiny85 without an external clock?
A: Yes, the ATtiny85 has an internal 8 MHz oscillator, which is sufficient for most applications.
By following this documentation, you can effectively integrate the Microchip ATtiny85 into your projects and troubleshoot common issues with ease.