ATtiny85 microcontroller: Definition, Pinout, and Programming Tutorial

Table of Contents

ATtiny85 microcontroller

the ATtiny85 microcontroller stands tall as a powerful yet compact device that has revolutionized the field of electronics. With its small size and impressive capabilities, the ATtiny85 has become a go-to choice for hobbyists, engineers, and innovators alike. In this post, we’ll introduce the features of the ATtiny85 microcontroller, it’s pinout, specifications, applications and programming tutorial.

Introducing the ATtiny85 microcontroller

The ATtiny85 microcontroller, is a member of the AVR family of microcontrollers developed by Atmel Corporation. It is based on the AVR RISC architecture, which stands for Reduced Instruction Set Computer. This architecture is known for its simplicity and efficiency, making it ideal for low-power applications. With its 8-bit processing power and a clock speed of up to 20 MHz, the ATtiny85 can handle a wide range of tasks, including digital signal processing, data acquisition, and control algorithms. Its small form factor, low power consumption, and affordability make it a popular choice among hobbyists and professionals alike.

ATtiny85 Pinout

Attiny85 Pinout - PDIP or SOIC
Attiny85 Pinout - PDIP or SOIC
Pin NumberPin NameFunction
1PB5 / RESETDigital I/O / Reset
2PB3 / PWMDigital I/O / PWM
3PB4 / PWMDigital I/O / PWM
4GNDGround
5PB0 / ADCDigital I/O / Analog-to-Digital Converter (ADC)
6PB1 / ADCDigital I/O / ADC
7PB2 / ADCDigital I/O / ADC
8VCCPositive Supply Voltage

ATtiny85 Features

  • AVR RISC architecture
  • Low power consumption
  • Easy integration with external modules
  • Built-in analog-to-digital converter (ADC)
  • Supports pulse-width modulation (PWM) for analog outputs
  • Supports in-circuit serial programming (ISP) via the SPI interface

ATtiny85 Specifications

The ATtiny85 microcontroller boasts an impressive set of specifications that make it an attractive choice for various projects.

ParameterValue
ManufacturerMicrochip
FamilytinyAVR
Flash8 kB
SRAM512 bytes
EEPROM512 bytes
ADC Counts10 bit
Speed20 MHz
I/O6
RAM512 B
Voltage1.8 V to 5.5 V
Temperature-40 ℃ to +85 ℃
PWM4
Timer Counts2
PackageSOIC-8 or PDIP-8
Size5.35 * 5.40 * 2.16 mm

ATtiny85 Applications

  1. Wearable technology: smartwatches, fitness trackers, and health monitoring devices.
  2. Industrial Automation: monitoring and controlling temperature, pressure.
  3. Home automation: lighting, temperature control, and security systems.
  4. Educational projects: teach programming, electronics, and robotics.
  5. Sensor Nodes: temperature, humidity, light, and motion sensors.
  6. Environmental Monitoring: air quality, pollution levels, or weather parameters.
  7. Security Systems: door/window sensors, motion detectors, or alarm systems.
  8. Smart Agriculture: soil moisture, temperature, and other environmental factors.

How to Program An Attiny85 with Arduino IDE?

Required parts:

Attiny85-Programming-Tools
Attiny85-Programming-Tools
  • Arduino Duemilanove development board (chip needs to be ATmega328) x1
  • ATtiny85 microprocessor x1
  • 10uf capacitor x1
  • Several jumpers
  • Breadboard or Duemilanove compatible prototype shield x1

Step 1. Set up the Program Uploader

Select Arduino Duemilanove Board
Select Arduino Duemilanove Board
  1. The Arduino Duemilanove development board is connected to the computer with a USB cable;
  2. Open the Arduino IDE software (version 1.6 or above);
  3. Select the development board and the corresponding serial port under the Tools option;
  4. Select Arduino ISP under File–>Examples;
  5. Click Upload.
Select ISP mode for Arduino Duemilanove
Select ISP mode for Arduino Duemilanove

Step 2. Configure Arduino IDE

In the Arduino IDE software, go to File–>Preferences, click the text box behind “Additional Board Managers URLs:”, and modify the URL to: https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x -boards-manager/package_damellis_attiny_index.json, click OK;

Setting Additional Boards Manager URLs
Setting Additional Boards Manager URLs

Click Tools–>Board–>Boards Manager in turn, enter attiny in the search box, find the ATtiny Boards and install it.

Install ATtiny Package
Install ATtiny Package

Step 3. Connect ATtiny85 and Arduino Duemilanove

Connect ATtiny85 and Duemilanove according to the circuit diagram below:

Connect ATtiny85 and Arduino Duemilanove Board
Connect ATtiny85 and Arduino Duemilanove Board

The positive pole of the 10uf capacitor is connected to RESET of the Duemilanove development board, and the negative pole is connected to GND. The pin connections between ATtiny85 and Arduino Duemilanove are as follows:

Pin connection between ATtiny85 and Arduino Duemilanove

ATtiny85Arduino Duemilanove
Pin 1 (RESET)Pin 10
Pin 4 (GND)GND
Pin 5Pin 11
Pin 6Pin 12
Pin 7Pin 13
Pin 85V

Step 4. Programming and uploading

Open the Arduino software, select ATtiny25/45/85 under Tools–>Board, select ATtiny85 for Proccesor, keep the port unchanged, select Arduino as ISP for the programmer, and then you can write the program and upload it to the ATtiny85.

Setting ATtiny85 Board Processor and Programmer for Programming
Setting ATtiny85 Board, Processor and Programmer for Programming
Upload Program to ATtiny85 Microcontroller
Upload Program to ATtiny85 Microcontroller

If the words “avrdude done. Thank you.” appear after uploading, it means the uploading is successful. After unplugging the USB cable, take the ATtiny85 off the breadboard and connect it to the actual circuit to complete the production.

Subscribe

Join our subscribers list to get monthly blog updates, technology news, case studies. We will never send spam, and you can unsubscribe at any time.

About Author

Aidan Taylor
Aidan Taylor

I am Aidan Taylor and I have over 10 years of experience in the field of PCB Reverse Engineering, PCB design and IC Unlock.

Need Help?

Don't hesitate - Get in touch today to find out how we can help take your project to the next level.

Table of Contents

Scroll to Top
welldone pcb manufacturer

Start to Achieve Your PCB Project