Introduction to ATtiny85

ATtiny85.jpg

In the previous tutorial on ATmega328P we have discussed, why ATmega328P is one of the most popular microcontrollers. But for small projects, where the number of required I/O pins is very less, using a microcontroller like ATmega328P will be a total waste of pins and money as well. So, as an alternative, we can use ATtiny microcontrollers. ATtiny is a series of microcontrollers. In this tutorial, we are going to discuss the specifications of some ATtiny microcontrollers, a pin diagram of one of the most popular ATtiny microcontrollers which are ATtiny85, advantages, and disadvantages of ATtiny, and applications of ATtiny microcontrollers.

Specifications

ATtiny series has a number of 8-bit AVR microcontrollers. We have mentioned specifications of some of those in the table below. 

NameNo ofPinsAvailablePackagesSpecification
ATtiny46,8SOT-6UDFN-84 programmable I/O pins
12MHz clock
512B of flash,
32B of SRAM and
No EEPROM,
ATtiny56,8SOT-6UDFN-84 programmable I/O pins
12MHz clock
512B of flash,
32B of SRAM and
No EEPROM
Internal ADC
ATtiny96,8SOT-6UDFN-84 programmable I/O pins
12MHz clock
It has 1kB of flash,
32B of SRAM and
No EEPROM,
ATtiny106,8SOT-6UDFN-84 programmable I/O pins
12MHz clock
1kB of flash,
32B of SRAM and
No EEPROM
Internal ADC 
ATtiny13/ 13A/ 13V8,20PDIP-8SOIC-8MLF-206 programmable I/O pins
20MHz clock for 13/13A, 10MHz clock for 13V1kB of flash,
64B of SRAM and
64B of EEPROM
Internal ADC
debugWIRE debug system
ATtiny2012, 14, 15, 20WLCSP-10SOIC-12TSSOP-12UFBGA-14VQFN-2010-12 programmable I/O pin
12MHz clock
2kB of flash,
128B of SRAM and
No of EEPROM
Internal ADC and
PWM channels
ATtiny24/ 24V14,20SOIC-14QFN-20MLF-2012 programmable I/O pins
20MHz clock in 24,
10MHz clock in 24V2kB of flash,
128B of SRAM and
128B of EEPROM
Internal ADC
debugWIRE debug system
ATtiny25/ 25V8,20PDIP-8SOIC-8QFN-20MLF-206 programmable I/O pins
20MHz clock in 25,
10MHz clock in 25V 
2kB of flash,
128B of SRAM and
128B of EEPROM
Internal ADC and
PWM pins
debugWIRE debug system
ATtiny4020SOIC-20TSSOP-20VQFN-2018 programmable I/O pin
12MHz clock
4kB of flash,
256B of SRAM and
No EEPROM
Internal ADC
ATtiny44/ 44A/ 44V14,20SOIC-14QFN-20MLF-2012 programmable I/O pins
20MHz clock in 44/44A, 10MHz clock in 44V 
4kB of flash,
256B of SRAM and
256B of EEPROM
Internal ADC
debugWIRE debug system
ATtiny45/ 45V8,20PDIP-8SOIC-8TSSOP-8QFN-20MLF-206 programmable I/O pins
20MHz clock in 45,
10MHz clock in 45V 
4kB of flash,
256B of SRAM and
256B of EEPROM
Internal ADC and
PWM pins
debugWIRE debug system
ATtiny84/ 84A/ 84V14,20SOIC-14QFN-20MLF-2012 programmable I/O pins
20MHz clock in 84/84A, 10MHz clock in 84V
8kB of flash,
512B of SRAM and
512B of EEPROM
Internal ADC
debugWIRE debug system
ATtiny85/ 85V8,20PDIP-8SOIC-8QFN-20MLF-206 programmable I/O pins
20MHz clock in 85,
10MHz clock in 85V
8kB of flash,
512B of SRAM and
512B of EEPROM
Internal ADC and
PWM pins
debugWIRE debug system
ATtiny16720,32SOIC-20TSSOP-20VQFN-3216 programmable I/O pins
16MHz clock 
16kB of flash,
512B of SRAM and
512B of EEPROM
Internal ADC and
PWM channels.
debugWIRE debug system
ATtiny161620QFN-20SOIC-2018 programmable I/O pins
20MHz clock
16kB of flash,
2kB of SRAM and
256B of EEPROM
Internal ADC
ATtiny2313A/ 2313V20PDIP-20SOIC-20QFN-20MLF-2018 programmable I/O pins
20MHz clock in 2313A, 10MHz clock in 2313V
2kB of flash, 128B of SRAM and 128B of EEPROM
Internal ADC
debugWIRE debug system

Pin-Outs of ATtiny85

ATtiny85 is an 8-pin AVR microcontroller. This is one of the most popular and widely used ATtiny microcontrollers. The pinout diagram is given below:

ATtiny85-Pinouts.jpg

Now let’s discuss the pin diagram:

  • Pin1 – Reset: When the input of this pin is connected to ground, it resets the program of the microcontroller.
  • Pin2 – PB3: It is an analog I/O pin.
  • Pin3 – PB4:  It is also an analog I/O pin.
  • Pin4 – GND: This pin is connected to the ground terminal of power supply.
  • Pin5 – PB0: This pin acts as a PWM pin and MOSI or Master Out Slave In pin. It is also an AREF or reference voltage pin for the ADC.
  • Pin6 – PB1: It is the MISO or Master In Slave Out pin of the microcontroller. This is also an PWM pin.
  • Pin7 – PB2: It is another analog pin. It also acts as SCK or Serial Clock pin 
  • Pin8 – VCC: This pin is connected to the positive terminal of the power supply.

Advantages of ATtiny85

  • Low-cost: ATtiny microcontrollers are very cheap.
  • Low power consumption: ATtiny microcontrollers consume very less power.
  • Small Size: Most of the ATtiny microcontrollers come in a small size. It helps to optimize the whole PCB size. This is why ATtiny microcontroller development boards come in small sizes.
  • Compatible with Arduino IDE: ATtiny microcontrollers are compatible with Arduino IDE. Even we can program some of the microcontroller using an Arduino board, without making any other circuit.
  • Open-Source Programs: There are many open-source bootloader programs and libraries available for these microcontrollers.

Disadvantages of ATtiny

  • Low-efficiency: ATtiny microcontrollers are not very efficient.
  • No of pins: Less number of pins is also a drawback for these microcontrollers.

Applications

As ATtiny microcontrollers are not very efficient, they are not used for commercial purpose that much. But they are cheap, small size and microcontrollers like ATtiny85 has relatively higher efficiency with respect to the number of pins. That is why some engineers and hobbyists prefer ATtiny microcontroller for small projects where the required number of I/O pins is very low and the speed is not a big issue. 

We can even see some ATtiny85 development boards available in the market, e.g. Digispark ATtiny85-20SU mini development board with micro USB, Digispark ATtiny85 USB development board etc.

digispark -ATtiny 85.jpg

Finally, we hope you are clear with the tutorial of ATtiny85 Microcontroller. Soon we will come up with some different tutorials that are related to the working of ATtiny85 microcontroller. Meanwhile if you have any doubts related to Introduction to ATtiny85 microcontroller, please feel free to ask in the comment box so you will be clarified.

1 Comment

  1. Avinash

    Article was super cool. Can you make more on microcontrollers.

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *