Skip to main content

wokwi-attiny85 Reference

The ATtiny85 is a small 8-bit AVR microcontroller. It has 8KB of Flash program memory, 512 bytes of SRAM, and 512 bytes of EEPROM.

ATtiny85

Pin names#

PinNameFunctionsAnalog Channel
1PB5Reset0
2PB33
3PB42
4GNDGround
5PB0SPI:MOSI, I2C:SDA
6PB1SPI:MISO
7PB2SPI:SCK, I2C:SCL1
8VCCPositive voltage

Code and libraries#

The code is compiled using the ATtiny Core for Arduino. This means you can use most of the standard Arduino functions and libraries in your code.

Serial Output#

The ATtiny85 doesn't have a dedicate UART peripheral, but it it still possible to get Serial Output using the Software Serial library. For more information and demo code, please see the Serial Monitor Guide

I2C#

For I2C communication use the TinyWireM library.

Simulation features#

The ATtiny85 is simulated using the AVR8js Library. The table below summarizes the status of features:

PeripheralStatusNotes
Processor✔️
GPIO✔️6 GPIO pins (PB0...PB6), INT0 / PCINT support
USI🟡Only works in I2C mode
Timer0✔️PWM support for PB0/PB1
Timer1
Watchdog Timer
EEPROM✔️
ADC✔️Used by analogRead()
Analog Comparator
GDB Debugging✔️See the GDB Debugging Guide

Legend:
✔️ Simulated
🟡 Partial support
❌ Not implemented

If you need any of the missing features, please open an issue on the AVR8js repo or reach out on Discord.

Simulator examples#