Blog  /  Attiny85: Understanding its Pin Configuration and Features

Attiny85: Understanding its Pin Configuration and Features

OurPCB's expertise in component sourcing aligns perfectly with the needs of projects involving the Attiny85 microcontroller. As this advanced device requires specific components to function optimally, OurPCB supports designers by ensuring they have access to the right quality components for their electronic designs, enhancing both performance and reliability.
Quote Form
check whiteFast Turnaround check whiteISO Certified
1 2 3

Attiny85 is a single chip with high performance but uses low power. The device is based on an advanced RISC architecture. This attiny85 microcontroller is typical because of its small size and beautiful features. This article discusses the attiny85 pin configuration, uses, and features.  

1. What is attiny85?

  An attiny85 is an 8-pin microcontroller. This electrical device comes in two packages. It essentially works by interfacing and controlling different sensors and devices. Also, this device is efficient because it has low power consumption. Notably, the attiny85 microcontroller has a watchdog timer. The watchdog timer is a safety feature that works in embedded and automated systems. Therefore, the microcontroller is very reliable in modern designs.   a computer microcontroller

(a computer microcontroller.)

 

2. Attiny85 pin configuration.

  Attiny85 Pinout schematic diagram                        (Attiny85 Pinout schematic diagram)  

 Power input.

  This device has a total of 8 pins. Out of these pins, only two are power pins: the VCC and the GND. The VCC is for power input, while the GND is the common ground. Respectively, Pin 4 and 8 are the VCC and GND.  

 Oscillator/Clock.

  The microcontroller comes with an 8mHz internal oscillator frequency. However, with this clock frequency, attiny85 can expand the internal clock up to a frequency of 20mHz. So, to achieve this property, you must connect the internal clock to pin 2(PB3) and pin 3(PB4). Also, PB3 is the XTAL1/CLKI, while PB4 is XTAL2/CLKO.  

 Digital input/output.

  Notably, every pin in this device is an input/output pin apart from the power pins. However, you must first point out which pin serves which function in the application program code. The I/O pins are pin5, pin6, pin7, pin2, pin3, and pin1. Also, you can respectively call these pins GPIO5, GPIO6, GPIO7, GPIO2, GPIO3, and GPIO1.  

computer chip

(computer chip)

 

Interrupt.

  You can use an external interrupt when you need the attention of the microcontroller. Ignore every other instruction to achieve interrupt function. Additionally, you can control the external interrupt using any manual button or a sensor output. Also, the Attiny85 has only one interrupt pin called INT0, represented by Pin 7.  

 SPI

  In serial communication, an Attiy85 microcontroller can operate with other devices via the SPI protocol. However, only a single device can use the SPI protocol. It often happens when you have SPI data communication and need to program the microcontroller. Notably, the SPI pins in this microcontroller are pin5, pin6, pin7, and pin1. Similarly, refer to the pins as MOSI, MISO, SCK, and DW. Most importantly, all four pins have different operations. MOSI pins send data from the controller while MISO receives the transmitted data. The SCK serves as the clock signal. During programming, the debug wire(DW) starts its operation.  

 I²C

  Respectively, SDA(data) and SCL(clock) are the names of the I²C pins represented by pin five and pin 7. I²C is a communication protocol. In other words, it works when a single line receives the sent I² data while another line sends a clock pulse(C). Importantly, this feature maintains the data sync according to the time.  

 Timer.

  This microcontroller also has two times that work by counting the pulses. The internal clock can operate both timer one and timer 2. However, the external clock can only use timer 0. Pin 7 represents timer 0, also referred to as T0.  

Analog comparator.

  Attiny85 has an internal analog comparator that can compare an analog signal. Pin5 and pin7 are respectively known as AIN0 and AIN1. These pins are analog comparator pins.  

Analog to digital converter.

  Pin 1, 7, 3, 2, and 5, respectively known as ADC0, ADC1, ADC2, ADC3, and Vref, are analog-digital converters. Also, the attiny85 microcontroller has four analog input channels. The analog-digital converter transforms every input channel into a 10-bit digital output.  

Reset.

  Finally, microcontrollers have an internal and external reset pin. Therefore, you can perform the reset action either from the programmer's software or the outer plug.   an 8 pin microcontroller

(an eight-pin microcontroller.)

 

Special Offer: Get $100 off your order!

Enjoy $100 off your order! No hidden fees and no minimum order quantity required.
Email [email protected] to get started!

3. Attiny85 Features.

 

  • The device has an 8-bit RISC CPU architecture and an 8k byte microcontroller flash memory.
  • Secondly, it is an eight-pin interface device with a CPU frequency ranging between 0-20mHz.
  • Third, attiny85 has 2 PWM, 4 10-bit ADC channels, and a single I²C channel, interrupt, comparator, and SPI communication channel.
  • Additionally, the device has an operating voltage range of 4.5V-5.5V and an operating temperature of -55⁰C-+125⁰C.
  • Moreover, the microcontroller has a maximum power supply of 40mA through the input pins and 200mA through the power pins.
  • Lastly, attiny85 has a 256 byte SRAM and a 512-byte EEROM lacking a UART interface, LAN, CAN, and DAC.

  a microchip with visible gears

(a microchip with visible gears.)

 

4. How to use attiny85?

  Every microcontroller executes an application program present in its memory. So, to efficiently use a microcontroller, ensure you write a program that the microcontroller will fetch from its memory. Without this program, the controller will remain dormant.

5. Applications of attiny85.

  You can use attiny85 in;

  • Peripheral interface systems.
  • Drivers.
  • Development boards.
  • Industrial control systems.
  • Embedded systems such as vending machines and coffee machines.
  • Analog signal measuring and manipulators.
  • SMPS and power regulation systems.
  • Display units.
  • Hobby projects.

  DIY electronic project with microcontroller and other electrical components (DIY electronic project with microcontroller and other electrical components.)  

Summary

  We hope this article helped you learn about the attiny85 microcontroller. For more information regarding this or any of our articles, please do not hesitate to contact us.  

Special Offer: Get $100 off your order!

Enjoy $100 off your order! No hidden fees and no minimum order quantity required.
Email [email protected] to get started!
Hommer Zhao

Hommer Zhao, based in Shenzhen, China, founded OurPCB in 2005, a PCB Manufacturing company.

As a regular contributor to Circuit World and the Journal of Manufacturing Systems, Hommer shares expertise on advanced PCB fabrication processes. His research on manufacturing optimization appears in the International Journal of Production Research and Journal of Industrial Information Integration.

Serving on the Indian Printed Circuit Association (IPCA) advisory board, Hommer Zhao frequently presents at technical seminars and industry exhibitions. He maintains strong partnerships with leading institutions including UCL's Electronic Engineering Department and their PCB prototyping facilities. Under his leadership, OurPCB has pioneered enhanced PCB manufacturing machining capabilities for high-precision PCB manufacturing, particularly serving telecommunications, automotive, and medical device sectors.

Table of Contents

Related Post