cpldcpu
cpldcpu.wordpress.com · Personal blog · on HN since 2014
An electronics hobbyist writes about very cheap microcontrollers, LED hacks, reverse engineering and small neural networks on tiny chips.
What HN saysHN links it for the 3 cent microcontroller survey and related projects such as LED candles and MNIST inference on cheap chips.
30HN people shared it
15linked it in comments
22stories submitted
1.4Kstory points
2 years agolast shared
2014people per year2026
Most-shared posts
- 1The “terrible” 3 cent MCU – a short survey of sub $0.10 microcontrollers9 people · 253 points · first shared 2019 · 94 comments on HN
- 2Reverse Engineering a Real Candle5 people · 175 points · first shared 2016 · 37 comments on HN
- 3Implementing Neural Networks on a "10-cent" RISC-V MCU3 people · 134 points · first shared 2024 · 24 comments on HN
- 4General purpose MCUs built in to LEDs emulate candle flicker2 people · 237 points · first shared 2024 · 182 comments on HN
- 5What made the 1960s CDC6600 supercomputer fast?2 people · 216 points · first shared 2020 · 102 comments on HN
- 6Implementing neural networks on the "3 cent" 8-bit microcontroller2 people · 206 points · first shared 2024 · 20 comments on HN
- 7Controlling RGB LEDs with only powerlines: Anatomy of a Christmas light string2 people · 158 points · first shared 2022 · 51 comments on HN
- 8A WS2812/Neopixel built from discrete transistors2 people · 3 points · first shared 2021 · discussion on HN
- 9Decapsulating the CH32V203 Reveals a Separate Flash Die1 people · 37 points · first shared 2024 · 1 comments on HN
- 10Addressable 7 segment display using a 7 cent microprocessor1 people · 4 points · first shared 2020 · 1 comments on HN
- 11Analysis of the Gen2 Addressable RGB LED Protocol1 people · 2 points · first shared 2024 · discussion on HN
- 12Tear down of a cheap external USB battery1 people · 2 points · first shared 2014 · discussion on HN
- 13Building a Chaotic Oscillator from Common Components1 people · 2 points · first shared 2020 · 1 comments on HN
- 14Hacking a Candleflicker LED (2013)1 people · 2 points · first shared 2020 · discussion on HN
- 15A led candle based on the 3 cent mcu1 people · first shared 2024
What HN people wrote when they linked it
kragen · 2024-09-07
sure! i hope you enjoy it! there was a lot of discussion of them about five years ago: https://jaycarlson.net/2019/09/06/whats-up-with-these-3-cent-microcont… https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/
selcuka · 2024-07-01
Make a LED candle?
https://cpldcpu.wordpress.com/2019/09/28/a-led-candle-based-on-the-3-c…
cpldcpu · 2024-07-01
Use a neural network to detect numbers? (Well, this runs on a slightly more capable MCU, though)
https://cpldcpu.wordpress.com/2024/05/02/machine-learning-mnist-infere…
crote · 2024-01-30
Read the article:
> There are rectangular regular areas that look like memory, there is a large area in the center with small random looking structure, looking like synthesized logic and some part that look like hand-crafted analog.
And the PIC12 is known to be a source of inspiration for dirt-cheap Chinese microcontrollers, see for example [0].
Hard evidence? No. But if it looks like a duck, walks like a duck, and quacks like a duck...
[0]: https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/
wffurr · 2024-01-29
According to another article on the authors site, linked from this one, most of these microcontrollers are “write once”: https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/
huppeldepup · 2024-01-28
Going to drop this here:
“Reverse engineering” a real candle
https://cpldcpu.wordpress.com/2016/01/05/reverse-engineering-a-real-ca…
curiousObject · 2023-12-03
Background of the 2N709 used in the CDC6600 supercomputer in the 1960s: https://cpldcpu.wordpress.com/2020/02/14/what-made-the-cdc6600-fast/
https://www.computerhistory.org/revolution/digital-logic/12/329/1426
The functionally similar NPN switching transistor to the ancient 2N709 is still available. Search for PMBT2369.
Acronyms, BJT: Bipolar junction transistor
kjs3 · 2023-08-08
Completely accurate, particularly around the "don't tell them it's an 8051" clones.
I have a friend that used to reverse engineers all sorts of embedded black box products and he's said "when there's no markings or other clues, assume it's some kind of 8051 and see where you get". That might not be as true these days with ubiquitous ARMs and sub 10 cent Chinese/Taiwanese microcontrollers (many apparently PIC12 knockoffs[1]), but it apparently worked for a long time.
[1] https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/
magnat · 2023-03-07
You can actually bit-bang low speed USB on Arduino [0]. There is even a bootloader [1] for ATtiny visible to host as HID USB device. It is obviously not compatible with Arduino, but those tiny boards look too cute to ignore [2]. Also, you can use USB port both for downloading firmware and your application.
[0] https://github.com/obdev/v-usb
[1] https://github.com/micronucleus/micronucleus
[2] https://cpldcpu.wordpress.com/2014/04/25/the-nanite-85/
sokoloff · 2021-09-10
It’s also likely faster to implement as a one-off for a hobbyist and, using a low-cost MCU, cheaper than building it around a $0.10 555 if you want to make a product.
https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/
eulers_secret · 2021-09-08
I feel the same way.
Electrics are neat, though - especially if you make your own: https://cpldcpu.wordpress.com/2016/01/05/reverse-engineering-a-real-ca…
But I just like the 'ambiance' too much. There are always different levels of risk adverseness: if I was considering candles a pollution health hazard I should also stop riding motorcycles, vaping various things, and stop eating like I do...
userbinator · 2020-05-30
As noted in the first post, the Z80 is still much easier to generate code for than the 6502.
I see everyone there seems to be referring to free/open-source compilers, but I know of one commercial compiler for Z80 (IAR) whose output is quite good, and I have linked to in this previous comment I made on a different article about Z80 C compilation:
https://news.ycombinator.com/item?id=18902501
If one didn't know better, it would look almost like handwritten Asm.
On the topic of architectures which are difficult to compile C to, I can also think of several more: 8051, low-end PIC series, and these: https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/
...and most of those have C (or at least C-subset) compilers too.
agumonkey · 2016-03-16
My pleasure https://cpldcpu.wordpress.com/2016/01/05/reverse-engineering-a-real-ca… (but not my blog)
makerdiety · 2024-01-29
> I have noted this article for my talk about how CPUs are free.
If teeny computers are free, and if I want to re-program them for my own use cases and personal applications, then why do I have to still spend nearly a thousand dollars or two on embedded systems development equipment like microcontroller development boards, JTAGs, ICEs, ROM flashers, UART-based bootloading solutions, and other delicate programming interfaces for small microchips, microcontrollers, and tiny computers? And don't forget microscopes to do power analysis for reverse engineering some old toy that was made to emulate or fake a real life candle's intractable flame properties.[1]
If you can't write code, then what's the point? How would no code be an agent of freedom and expression?
Reprogramming a microcontroller unit with a USB cable connected between it and a laptop computer is convenient. But too bad that's not really the standard for old technology and resources laying around the planet, isn't it? You have to basically be uncanny like MacGyver or inhumanly intelligent like Tony Stark to reprogram the apparently free teeny computers laying around the world.
[1]: https://cpldcpu.wordpress.com/2024/01/14/revisiting-candle-flicker-led…
dragontamer · 2023-01-02
I got the chip from a blog elsewhere (https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/), advertised as a 8.75-cent MCU.
I did a brief search before posting, and one webpage suggested a 1000+ quantity price for $0.11 USD. However, upon closer inspection, this webpage is completely out-of-stock. (https://www.lcsc.com/product-detail/Others_Holtek-Semicon-HT68F001_C13… I assumed the ~10-cent price point was still available and should have looked more into it before posting.
> Holtek 'Buy Online' shows $1.50 @ 500+
That is indeed terrible. ATTiny4 chips (cheapest chip on Digikey that's available... 512B Flash + 32B RAM) are available at 39-cents @100 Quantity from Digikey, so these HT68F001 chips need to come in significantly cheaper than the ATTiny4 before I consider them.
Sure, the ATTiny4 is like 20 uA at 128kHz, but this is all less than the leakage current of batteries, so we're definitely looking at multi-year battery lives. Also PWM, Analog Comparator, ADCs, and other such features are included. So its more capable.
In 2019, the HT68F001 _WAS_ a 8.75-cent chip or so. Alas, the 2020+ chip shortage may have killed the cost-effectiveness of this particular model.