ATtiny85: A Power Packed Arduino in a Tiny 8 Pin Chip. It is the smallest Arduino Chip! FOUR features you missed! Find out How Good It is, and how you can Easily program it over USB with no USB Chip!

The ATtiny85 device is well... physically tiny!

  • It is an extremely popular Arduino Chip.

  • You can even program it over USB (with special bootloader code).

  • It has 8kBytes of Flash (standalone) 6kBytes with USB capable interface.

  • It has 512Bytes SRAM.
Links from this page

Digispark IDE programming - Easy: IDE & USB; 6k Flash.
ATtiny ISP programming - Harder: SPI; 8k Flash.
Low power ATtiny techniques.

Yes, it has less Flash and Less SRAM but it fits into an 8 pin package. For physically small projects this is a big deal but the question is:

How useful is it?

In fact, you can do a lot with the Flash memory size, and unless you are writing something really complicated (or with a lot of strings message data) then 8k/6kBytes is still very useful.

You might think that it is far inferior to the Arduino Uno with the ATmega328P having only 8 pins (and you can use only 6 as one is VCC and one is GND)! but it has a very respectable set of internal peripherals and it even has a few items that are not available in a the ATmega328P (Arduino Uno/Nano):

Internal Peripherals

  • Two 8 bit timers.

  • A 10 bit ADC.

  • PWM generators.

  • An Analog comparator.

  • USART - Universal Serial Interface for SPI or I2C (two wire interface).

Features not found in the ATmega328P:

  • An internal Clock to 16.5MHz - so you don't need an external crystal.

  • Two fully differential ADC inputs.

  • Programmable gain amplifier for the ADC x1, x20.

  • 32MHz and 64MHz programmable internal oscillator for Timer1 clock.

Features missing from the ATtiny85

  • Asynchronous serial module for RS232 Serial interface - There is no internal serial port hardware module. You can still use serial communication but it is made in software and that actually works just fine.
  • A 16 bit timer. - not a big problem (you can add an incrementing variable for longer time count in the interrupt routine).
  • Flash (24k).
  • SRAM (1.5k).

Programming the ATtiny85

You can mess around with just the basic 8-pin chip on a breadboard (to get full 8k Flash access) but then you need to setup an ISP programmer - there is an easier way!

That is to use a DigiSpark breakout board with a pre programmed ATtiny85 programmed with a bootloader i.e. just the same as a "normal" Arduino Uno. The bootloader allows USB communication without USB hardware!

Digispark ATtiny85 Development Board Closeup

Digistump Attiny85 breakout board

The top 8-pin chip is the ATtiny85. The board includes a 5V regulator (middle 7805) two LEDs - green/white SMD - (bottom left [PWR] & left of pin P2 [MISO,PB1]) and a USB micro connector (left side) as well as breakout connector pins.

The disadvantage of using the Digispark is that the Flash space is reduced to 6kBytes because of the USB software. This sounds bad but is quite a useful amount of memory. The advantage is that you can use the Arduino IDE in nearly the same way as programming an Uno.

It is just more convenient than programming the raw chip using an ISP programmer - however if you run out of memory then you will need to do that!

Although it has less memory than an Arduino Uno, you might want to use this board because its small size: 24.3mm x 18.4mm. Compare this to an Arduino Uno 53mm x 70mm (75mm with USB connector sticking out).

An alternative is the Arduino Nano that has about the same width but twice the length. The Nano uses the ATmega328P - the same microcontroller as the Arduino Uno.

Here are more useful comparison pictures.

Arduino Uno on handDigistump ATtiny85 on hand

So, if you need to reduce space, you can see the advantage!

Note: You can find Digispark IDE setup instructions here.

ATtiny85 pinout

Because there are only 6 usable pins, all pins are multi use having many different functions.ATtiny85 pinout

ATtiny85 Digispark Schematic

Digispark mini board schematic

View larger image here.

ATtiny85 Digispark Pin Use

Arduino Pin 0 (PB0) : I2C SDA, PWM
Arduino Pin 1 (PB1) : PWM, (LED)
Arduino Pin 2 (PB2) : Analog Input, I2C SCK, INT0
Arduino Pin 3 (PB3) : Analog Input, (USB-)[this is correct buzzed out]
Arduino Pin 4 (PB4) : Analog Input, (USB+)[this is correct buzzed out], PWM
Arduino Pin 5 (PB5) : Analog Input, RESETn

All of the above pins can be configured as digital I/O as well.

Note: Two versions of the board exist, differentiated by the LED connection.

Originally the LED was connected to PB0 which stopped I2C being used. The recommendation was to cut the track to the LED (to PB0). You are likely to have a newer version with LED connected to PB1.

ATtiny85 Low Power Operation

If you are looking to make a low power battery design then the ATtiny is a good choice. However you may want to use a raw chip for this as you will need to program it using an ISP programmer which gives you more control of the clock in use and consequent power savings.

Also remember that the breakout board is not designed for low power operation. You would need to disconnect the 7085 and LEDs as their quiescent current is wasteful.

There is also the 1k5 resistor to Vcc that is attached to PB3 that is for the USB id information - it will draw current if you pull it down.


Have your say about what you just read! Leave me a comment in the box below.

Don’t see the comments box? Log in to your Facebook account, give Facebook consent, then return to this page and refresh it.

Privacy Policy | Contact | About Me

Site Map | Terms of Use