Pin names
| Pin | Name | Functions | Analog Channel |
|---|---|---|---|
| 1 | PB5 | Reset | 0 |
| 2 | PB3 | 3 | |
| 3 | PB4 | 2 | |
| 4 | GND | Ground | |
| 5 | PB0 | SPI:MOSI, I2C:SDA | |
| 6 | PB1 | SPI:MISO | |
| 7 | PB2 | SPI:SCK, I2C:SCL | 1 |
| 8 | VCC | Positive voltage |
Attributes
| Name | Description | Default value |
|---|---|---|
| frequency | MCU clock frequency, in hertz. Common values: “1m”, “8m”, “16m”, and “20m" | "8m” |
Debug prints with TinyDebug
You can use the TinyDebug library to print debug messages from your code. These messages appear in Wokwi’s Serial Monitor. To use the library, include “TinyDebug.h” in your project and create a libraries.txt file with the text “TinyDebug” in it. CallDebug.begin() and then print your debug messages using Debug.println():
Debug object to read input from the Simulator’s serial monitor:
Debug interface consumes ~30 bytes of SRAM and 150 bytes of Flash memory, depending on which methods you use in your code. This can sometimes be an issue, since the ATtiny85 only has 512 bytes of SRAM.
That’s why TinyDebug also provides an alternative, lightweight logging interface that doesn’t use any SRAM. It provides two functions, tdPrint() and tdPrintln(). The downside is that you can only print c-style (char*) strings:
Serial Output
The ATtiny85 doesn’t have a dedicated 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:| Peripheral | Status | Notes |
|---|---|---|
| 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 |
✔️ 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.