20 MHz 8-bit AVR in an 8-SOIC — small-package control for industrial and battery applications
The Microchip ATTINY45-20SU is an 8-bit AVR microcontroller from the ATtiny family, qualified under the Functional Safety (FuSa) initiative. It runs at 20 MHz from an internal oscillator, with 4 KB of Flash program memory, 256 bytes of SRAM, and 256 bytes of EEPROM — a memory footprint sized for single-purpose control loops, state machines, and sensor conditioning. The 8-SOIC package keeps board area small, and the six general-purpose I/O lines (shared with the 4-channel 10-bit ADC and the Universal Serial Interface) handle basic switch sensing, PWM generation, and serial communication without external glue logic.
Brown-out detect and power-on reset are integrated, so a simple decoupling cap on the supply pin is enough for reliable startup.
At 20 MHz the AVR core executes most instructions in a single clock cycle, giving roughly 20 MIPS throughput. That is enough for 10 kHz to 50 kHz control loops with headroom for ADC conversions and USI-based serial polling.
Memory map and field-update reality
The 4 KB Flash is self-programmable via the bootloader section, so firmware updates over the USI or a custom protocol are possible — but 4 KB fills fast with a bootloader plus application code. The 256 bytes of EEPROM are useful for calibration constants and fault logs that survive power cycles; endurance is rated for 100k writes per byte in the AVR architecture. With only 256 bytes of SRAM, stack depth and interrupt nesting need careful budgeting — a deep function-call tree or large local arrays will overflow silently.