What is an ATtiny85 Microcontroller & Its Working

ATtiny85 Microcontroller is an alternative to ATmega328P because for small projects, the required number of I/O pins in the ATmega328P microcontroller is very less instead of using all. So, the ATtiny85 microcontroller is used in small projects by using all the I/O pins. This article discusses an overview of an ATtiny85 Microcontroller, pin diagram, specifications, advantages, disadvantages & its applications.


What is an Attiny85 Microcontroller?

ATtiny85 microcontroller is a small & high-performance based AVR microcontroller and it uses a RISC CPU. This microcontroller is available in two packages which are mainly used for interfacing & controlling between different sensors & devices.

ATtiny85 Microcontroller
ATtiny85 Microcontroller

This microcontroller is available with low power consumption through MSSP & 10-bit ADC. The instruction code in this microcontroller can be saved through RAM -512 bytes & EEROM-8kb. The alternative ATtiny85 microcontrollers are ATtiny45, 25, 25V, 45V & 85V.

Functions

ATtiny85 microcontroller performs different functions on a single IC. Some microcontroller pins are available with the capacity to use the above one function. Some of the main functions of this microcontroller include timers, SPI communication, I2C communication, BOD (Brown Out Reset), Interrupt &ADC. This ATtiny85 microcontroller includes different memories like FLASH, EEPROM & SRAM.

Pin Configuration

The ATtiny85 Microcontroller pin configuration is shown below. This microcontroller includes 8-pins where each pin & its functionality is discussed below.

ATtiny85 Pin Diagram
ATtiny85 Pin Diagram

Pin1 (PB5): The function of this pin is PCINT5, ADC0, dW & RESET. This pin is an analog, reset, boot loader program, ADC & remove

Pin2 (PB3): The function of this pin2 is XTAL1, CLKI, ADC3, OC1B & PCINT3. This pin2 is mainly used for USB programming, the input of XTAL, analog input & PWM

Pin3 (PB4): The pin3 main function is XTAL2, CLKO, ADC2, OC1B & PCINT4. This pin is mainly used for analog input, USB programming, PWM & output of XTAL.

Pin4 (GND): The pin4 is used to provide Ground or Negative Supply to the system

Pin5 (PB0): The pin5 main function is AIN0, MOSI, OC1A, OC0A, DI, AREF, SDA & PCINT0. This Pin-5 executes like SPI communication, PWM output &12C communication.


Pin6 (PB1): The pin6 main function is MISO, AIN1, OC0B, OC1A, DO & PCINT1. This Pin-6 is used for PWM o/p, SPI data o/p

Pin7 (PB2): The pin7 main function is SCK, ADC1, T0m SCL & PCINT2. This Pin-7 is mainly used for SCL, analog i/p & SCK for SPI data

Pin8 (VCC): The pin8 is used to provide voltage supply to the system

Features & Specifications

The features & Specifications of the ATtiny85 microcontroller include the following.

  • The Architecture of the CPU is 8-bit RISC
  • Number of Pins-8
  • The frequency of CPU ranges from 0 to 20 MHz
  • The range of Operating Voltage is 4.5V to 5.5V
  • GPIO Ports are 6
  • One exterior interrupt on INT0 to GPIO7
  • 8-bit Timer or Counter through compare modes is – 1
  • High-speed Timer or Counter with 8-bit is -1
  • PWM channels – 2
  • UART is Not Available
  • I2C Channel – 1
  • SPI communication channel is Single through different pins like MISO to GPIO6, MOSI to GPIO5 & SCK to GPIO7
  • LAN & CAN are not available
  • ADC with 10-bit & 4-channel
  • DAC is not available
  • USART Module with Single Channel
  • SRAM is 256 bytes
  • FLASH is 8K bytes
  • EEPROM is 512 bytes
  • Single analog comparator including input pins likeAIN0 to GPIO5, AIN1 to GPIO6
  • For each I/O pin, the max DC is 40mA
  • DC Current through GND & VCC Max is 200 mA
  • Operating Temperature ranges from -55ºC-to- +125ºC
  • Interfaces used for Communication are Master or Slave SPI serial, I2C, Two-wire & Universal Serial Interface
  • Timer Module is 2 – 8bit counter
  • Outputs of PWM -4
  • Speed of CPU is 1 MIPS at 1MHz
  • The size of Flash or Program memory is 8Kbytes
  • Program Lock & Watchdog Timer are available
  • Power Save Modes -3 like Power-down, ADC & Noise Reduction

A microcontroller like ATtiny85 is a very advanced microcontroller including several features so it can be used in various electronic applications. This microcontroller can also be called a small Arduino but includes limited IO pins, little flash memory, SRAM & EEPROM as compare to the ATmega328p microcontroller. This microcontroller is appropriate once your code is small and you need to switch with an alternative controller to ATmega328p & Arduino board.

Despite the low number of I/O pins, the 3 pins can be used like analog pins to obtain the input from different sensors. The other alternatives of the ATtiny85 microcontroller are ATtiny25 & ATtiny45 except for the quantity of SRAM, EEPROM & Flash are dissimilar in all of them.

How to Run ATtiny85 Carefully?

Microcontrollers are very sensitive components. To obtain the best performance from the controllers for a long time, the designer must take care while working with them in any application.

So the voltage supply shouldn’t exceed 5.5V. Before connecting this controller to a digital multimeter, we need to verify the output of the voltage source from a precise digital millimeter. The DC on for each I/O pin should not be changed from 40mA whereas on GND pins & positive supply should not be changed from 200mA.

Before supplying power, we need to verify the polarity of microcontroller pins. To locate this controller, we need to use an IC socket on a circuit or a breadboard. This socket protects the controller from the heat produced while soldering

The min & max storage temperature ranges from -65 C to +150 C but to operate this controller, the min & max temperatures range from -55 C to +125 C.

ATtiny85 Microcontroller Circuit Diagram

The pushbutton circuit using the ATtiny85 microcontroller is shown below. This circuit can be built with an ATtiny85 microcontroller, LED, Pushbutton & 470Ω Resistor.

LED Circuit using ATtiny85 Microcontroller
LED Circuit using ATtiny85 Microcontroller

By using the push button, the input can be provided to this circuit. Once the pushbutton is opened, it represents a logic state like LOW or ‘0’. Similarly, when the push button is pressed, this signifies logic HIGH or ‘1’. Both these logic states are being fed to the microcontroller for controlling the load. Here, the output device used in this circuit is LED.

So the operating of an LED can be done based on the push button. If the push button is ON, the LED will be ON, if it is OFF, then the LED will be OFF.

This circuit is a power introductory circuit for embedded microcontrollers as it will show how a microcontroller reads input from a device to observe whether the voltage supply is being fed to the microcontroller is HIGH or LOW.

After that, based on the value of the input, we can utilize the statements to conclude what act the ATtiny85 microcontroller must receive if the input of the microcontroller is read like either HIGH or LOW.

ATtiny85 Microcontroller Architecture

The architecture of the ATtiny85 microcontroller is extremely useful to imagine the major function available within the microcontrollers & how every component & its feature are getting connected through each other. The block diagram of the ATtiny85 microcontroller is shown below.

Architecture or Block Diagram
Architecture or Block Diagram

The AVR core is mainly used for combining 32-general purpose registers through the rich instruction set. These registers are connected directly through the ALU to help while allowing the two separate registers with the help of a single instruction.

The ATtiny25/45/85 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATtiny25/45/85 achieves throughputs approaching 1MIPS per MHz allowing the system designed to optimize power consumption versus processing speed.

The AVR microcontroller core merges an instruction set through 32 registers which are connected directly to the ALU by letting two separate registers be accessed within a single instruction performed within a single CLK cycle.

The resulting design is code efficient while attaining throughputs equal to 10 times faster than usual CISC-based microcontrollers. The features of this microcontroller are mentioned above. This IC is designed by using a technology like an Atmel’s with maximum non-volatile memory density.

The program memory is allowed through On-chip ISP Flash to be programmed again within the system using an SPI serial interface by a non-volatile memory programmer otherwise by running an On-chip boot code over the AVR core.

The ATtiny85 AVR microcontroller supports a complete set of program & development tools for a system like C Compilers, Program Debugger, Macro Assemblers, Simulators & kits for evaluation.

Advantages

The advantages of the ATtiny85 Microcontroller include the following.

  • Less Cost
  • Easily Available
  • Power consumption is less
  • It can be easily arranged within small boards due to its small & compact sizes
  • Reference data is available with this microcontroller to work easily
  • Compatible through Arduino IDE
  • This controller works with battery operated based applications by different power save modes
  • It provides several features within lesser pins
  • For several applications, this microcontroller includes a satisfying program memory
  • Where to use ATtiny85 Microcontroller? /Applications
  • The applications of ATtiny85 Microcontroller include the following.
  • This microcontroller is used to design several engineering projects based on the requirement.
  • It can be used in commercial & educational applications like the following
  • Security & Automobile based Applications
  • Control systems of Industrial machinery
  • Weather Sensor Systems

Disadvantages

The disadvantages of the ATtiny85 Microcontroller include the following

  • These microcontrollers are not extremely efficient.
  • This microcontroller includes a fewer number of pins.

Where to use ATtiny85 Microcontroller?/Applications

The applications of ATtiny85 Microcontroller include the following.

  • This microcontroller is used to design several engineering projects based on the requirement.
  • It can be used in commercial & educational applications like the following
  • Security & Automobile based Applications
  • Control systems of Industrial machinery
  • Weather Sensor Systems
  • Applications of Solar
  • Applications of Wireless Communication, Security, Medical, Health
  • Used in IoT applications
  • Charger & Power Supply based Applications
  • Industrial Automation
  • Embedded System Projects
  • Robotics
  • This controller can be used in management & power monitoring systems

Thus, this is all about an overview of what is ATtiny85 microcontroller is, functions, pin configuration, specifications, features, architecture, advantages, disadvantages & its applications. Here is a question for you, what are the different types of ATtiny microcontrollers available?

Add Comment