Notifications
Clear all
Topic starter
2026-04-11 6:23 am
8051 chips from STC Micro are ridiculously cheap — under $1 — and they actually have pretty solid specs. But they're a pain for beginners: complicated setup, and to this day there's no open-source C++ compiler for 8051. The only option is SDCC, which only supports C. You can use Arduino IDE with it, but without C++, most Arduino libraries just won't compile.
So I decided to fix that. It took a while, but I now have a full Arduino Core for the STC8H8K64U. You install it through the Board Manager, write normal Arduino code — digitalWrite, analogRead, Serial, etc. — and it just works. No external programmer needed either, just a USB cable, same as an Uno.
The chip itself is honestly pretty nice for the price: 64KB flash, 8KB RAM, native USB, 4 UARTs, 12-bit ADC, SPI, I2C, PWM, up to 45MHz. I even got FreeRTOS running on it, so you can do multitasking.
The fun part is how it works under the hood — since there's no C++ compiler for 8051, I use RISC-V GCC to compile the Arduino code, then a tiny emulator written in 8051 assembly interprets it on the chip. Sounds crazy, but it works!
It's all open-source if anyone wants to check it out: https://github.com/thevien257/STC_Arduino_Core
Would love to hear what you all think!
This topic was modified 1 month ago by thevien257
2026-04-11 3:11 pm
That's pretty amazing. Great job !. The 8051 is probably one of the most popular chips of all time. Compared to the original uno, nano those chips have more resources and under a buck. I took a look but could not find pricing. It had trouble giving me info in english and I think it was asking for credentials in Chinese. I would like to try one of these chips out. They are probably going to be not less than a buck with the tariffs in place.
