a practical look at stm8 vs attiny85
for small projects, i often need a microcontroller. my main focus is always the same. keep it small, keep it simple, and keep power requirements minimal.
i have more than 200 attiny85 chips, but i don’t use them carelessly. for most of my use cases, they feel like overkill.
things like c64 rom switchers, amiga and c64 keyboard handling, irrigation controllers, or simple relay and sensor circuits don’t need a powerful mcu. they need something cheap, reliable, and easy to integrate.
that’s where the “stm8s001” comes in.
it’s a very low-cost microcontroller. simple, but more than capable for this kind of work. programming is straightforward, programmers are easy to find, and once you get used to it, it just works.
the sop8 package is another reason i like it. it’s tiny, really tiny, which makes it perfect for compact designs.
to make things easier, i had around 2000 sop8 to dip8 adapter boards manufactured at jlcpcb. and i’ve probably bought around 500 of these chips so far. that alone says enough.
in a world where people tend to use powerful mcus for everything, i prefer going the other way.
use the smallest thing that gets the job done.
and for many of my projects, this little stm8 does exactly that.
| Feature | STM8S001J3M3TR | ATtiny85-20SU |
|---|---|---|
| Core | STM8 | AVR |
| Clock | 16 MHz | 20 MHz |
| Flash | 8 KB | 8 KB |
| RAM | 1 KB | 512 B |
| EEPROM | 128 B | 512 B |
| GPIO | 5 | 6 |
| Supply Voltage | 2.95V – 5.5V | 2.7V – 5.5V |
| Package | SO8 | SOIC-8 |
| Programming | ST-Link | ISP / USB programmer |
| Typical China Price (1 pc) | $0.5769 | $1.6243 |
| Typical China Price (100 pcs) | $0.3436 | not shown in the source snippet I checked |
| Typical China Price (500 pcs) | $0.3149 | not shown in the source snippet I checked |
| Typical Use Style | cheap enough to use everywhere | more expensive, used more selectively |
one important detail. the SWIM pin (PD1) needs a bit of care. if it’s used too aggressively without any delay, reconnecting with the programmer can become difficult.
another thing i’ve noticed over the years. having a stock of certain mcus is never a bad idea.
i still have PIC16F877A chips i bought around 20 years ago, along with smaller ones like the PIC16F628A. they still work, still do the job.
some microcontrollers just don’t die. and that’s exactly why i like parts like the stm8s001j3m3tr. simple, cheap, and good enough to keep using for years without overthinking it.