ATTINY85 , a 8 bit AVR Microcontroller provides many features in lesser pins.

With program memory of 8Kbytes the controller has satisfying memory for many applications.

With various POWER SAVE modes it can work on battery operated applications.




Number of  Programmable I/O pins   6           Operating Voltage  +2.7 V to +5.5V

Maximum DC Current per I/O Pin 40 mA     Maximum DC Current through VCC and GND Pins 200 mA

Communication Interface

Master/Slave SPI Serial Interface  (5,6,7  PINS)   [Can be used for programming this controller]

I2C or Two-wire Serial Interface  (5,7  PINS)  [Can be used to connect peripheral devices and sensors]

Universal Serial Interface  (5,6,7 PINS)   [Can be used for communicating with other controllers]


UART Interface   Not available        ADC Feature  4channels, 10-bit resolution ADC

Analog Comparators 1                    Timer Module   2 x  8-bit counter

PWM outputs  4                              External Oscillator   0-20MHz for ATTINY85

Internal Oscillator   0-8MHz  Calibrated Internal R-C Oscillator

CPU Speed   1 MIPS @ 1MHz

Program Memory or Flash memory size  8Kbytes

RAM size   512Bytes on Internal SRAM

EEPROM size  512Bytes of In-System Programmable EEPROM

Program Lock   Available          Watchdog Timer  Available

Power Save Modes      Three Modes  [Idle ,  ADC Noise Reduction ,  Power-down ]


Image 2


ATTINY85 can be programmed in many ways.

This post is on programming in AVR mode .

For programming we need an USBASP (also called AVRDUDE)  hardware  which is the same one used for programming 8051 ICs.



Connection between ATTINY85 and USBASP is by SPI pins

MOSI to MOSI (pin5)

MISO to MISO (pin 6)

SCK to  SCK (pin 7)

RST to RST (PIN 1)

Vcc to pin 8 & Gnd to pin 4 of ATTINY.

Image 3

For programming we use WINAVR (Programmers Notepad & MFILE)

usbasp driver and winavr can be downloaded from following link.

download link :

After installing driver for usbasp , open the Device Manager to see USBASP under libusb.


Image 1


Next install WINAVR


Accept default location of installation.

Image 2

Following components must be selected

ADD Directories to PATH

Install Programmers Notepad

Image 3


Otherwise Programmers Notepad (PN) will not work.

MFile which makes RULE for programming also installed automatically.

Image 4

In WIN 8 / 10 you need to replace msys.dll file.

Copy the file from the downloaded folder.

Go to C:\WINAVR\utils\bin

and paste.

Image 5

Confirm Replace file.

Image 6


Image 7

Open Programmers Notepad.

Always create a separate folder to save your project files.


Type in the C code to blink LED connected at  PB3 (pin 2 ) of ATTINY.


Image 9

Save the file with .c extension.

Image 10

Now you have to create the MAKEFILE in the same project folder.

Click on MFile.


Image 12

Select  MCU Type as ATTINY85.

Image 13

Select PORT as usb

Image 14

Programmer to be set as usbasp.

But usbasp is not in Programmer list.

Select any one from the Programmer list and then click on ENABLE EDITING.

Image 15

Change the Programmer as usbasp.

Image 16

Scroll up to find TARGET.

Rename TARGET to the file name of your project.Here it is ledblink.

Do not use the .c extension here.

Image 17

Save the file in the same folder where you stored the .c file.

Image 18


Under Tools  —>  click Make All

Image 11


Image 22


If no error in coding , you get Process Exit Code : 0  and .hex file created in your project folder.

Image 19

Click on Tools  –>  Program


Image 20

The .hex file will be loaded on to the ATTINY successfully.

Image 21

The LED starts blinking now.

WINAVR can be used to write C file and program using USBASP.

video :