ATtiny85 (AVR, Firmware)
ATtiny85: 8-pin AVR with 8 KB flash, internal oscillator (8 MHz or 1 MHz), no crystal needed. Runs Arduino sketches (ATTinyCore) or AVR firmware (HEX / ELF): digitalWrite/Read on PB0–PB4, analogWrite on PB0, PB1, PB4 (Timer0 / Timer1), analogRead on A1–A3, internal 1.1 V / 2.56 V references, Wire (I²C master on PB0 SDA / PB2 SCL through the USI), SPI, pin-change interrupts, watchdog and sleep.
Key data
- Category
- ICs
- Simulation model
- Microcontroller with real firmware
- Manufacturer part number
- ATTINY85-20PU
- Reference prefix
- U
- Pins
- 8
- Land pattern
- DIP-8_W7.62mm
Notes
The firmware runs on an emulated CPU core, instruction by instruction. Peripherals that the model implements (GPIO, timers, UART, SPI, I²C, ADC and others, see the description) act on the pins of the circuit, so the analog parts around the chip see the same voltages and timing as on a real board.
- The bare chip needs VCC, GND and 100 nF next to VCC; it runs from its internal oscillator.
- It has no serial port: show results on pins (LEDs, a display) or in the EEPROM.
- Right-click the part and choose "Open in code editor" to write and compile its code; "Serial monitor" shows its UART output.
- In the inspector you can load a demo firmware or your own ELF / Intel HEX / BIN file instead.
- GPIO pins are real circuit pins: an LED on an output needs a series resistor, an input needs a defined level (pull-up or pull-down).
- The debugger in the code view stops at breakpoints and shows registers, variables and the call stack.
Simulation model
An emulated CPU core runs the firmware binary instruction by instruction. The GPIO pins are pins of the analog circuit: outputs drive through a driver resistance, inputs read the voltage with thresholds.
- Device
- attiny85
- CPU core
- AVR 8-bit
- Emulator
- AVR emulator
- Firmware
- Arduino sketch compiled in the code view (arduino-cli, ATTinyCore), or your own ELF / Intel HEX / BIN file
- Flash / RAM for firmware
- 8 KB / 512 B
- Supply pins
- VCC / GND
- Mapped GPIO pins
- 6
Pins 8
simulatedreal chip onlyPin functions from the emulator and the datasheet.
| Pin | Name | Functions | Use |
|---|---|---|---|
| VCC | VCCSupply pin | Supply 1.8–5.5 V: 100 nF next to VCC | |
| GND | GNDGround pin | Ground | |
| PB0 | PB0 ~ SDA MOSII/O pin | USI_SDAUSI_DIOC0A!OC1AAIN0PCINT0AREF | I²C data: pull-up (about 4.7 kΩ) to the supply |
| PB1 | PB1 ~ MISOI/O pin | USI_DOOC0BOC1AAIN1PCINT1 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PB2 | PB2 SCL SCK A1I/O pin | USI_SCLUSI_SCKADC1INT0PCINT2T0 | SPI clock: displays, flash, SD cards |
| PB3 | PB3 A3I/O pin | ADC3!OC1BPCINT3XTAL1 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PB4 | PB4 ~ A2I/O pin | ADC2OC1BPCINT4XTAL2 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| RESET | RESETInput pin · pulled up on the board | RESETADC0 | Reset, active low: 10 kΩ pull-up, 100 nF to GND, optional button to GND |
Parameters 2
packageclock8 MHz or 1 MHz internal oscillator (fuse CKDIV8); the sketch is compiled for the same clock
PCB
DIP-8_W7.62mm| Package | Land pattern | Status | Source |
|---|---|---|---|
| DIP8 · ATTINY85-20PU | DIP-8_W7.62mm | Verified land pattern | KiCad 10.0.7: symbol ATtiny85-20P, footprint Package_DIP:DIP-8_W7.62mm |
| |||
| SOIC8 · ATTINY85-20SU | SOIC-8_5.3x5.3mm_P1.27mm | Verified land pattern | KiCad 10.0.7: symbol ATtiny85-20S, footprint Package_SO:SOIC-8_5.3x5.3mm_P1.27mm |
| |||