Of course it would also work with an ATtiny 4/5/9/10.
#Candle flicker code
In other news, picatout took the code I reverse engineered from the original LED and used it to create his own Candle-flicker-LEDs by embedding a PIC10F200 into a normal LED. Home-brewing a Candle Flicker LED using the tiniest MCU This controller only uses a single RC-oscillator (bottom) and several counter or shift-registers and is probably LFSR based. Nothing is known about the flicker-pattern so far. This is a much simpler controller, as shown below. Natecaine commented on the original story on Hack-a-Day and followed up with a micrograph of the controller chip of one of his LEDs. It turns out there is more than one flicker-LED-controller-chip. Are you up to the challenge? Another Candle Flicker-LED
![candle flicker candle flicker](https://www.taralane.ie/image/cache/intact/W880ALT1-1000x1000.jpg)
Reverse engineering the exact circuit is a more involved effort, which yet needs to be done. Amounts shown in italicised text are for items listed in currency other than Euros and are approximate conversions to Euros based upon Bloombergs conversion rates. This was already suggested by the statistical analysis. This does indeed seem to confirm that no LFSR is used for the random number generator.
![candle flicker candle flicker](https://ballantynes-prod.freetls.fastly.net/data/media/images/catalogue/19052855_ivory_1174.jpg)
It is also obvious that there is no counter or shift register longer than 5-bit. One of these is probably a general clock generator, while the second one could be a part of a hardware random number generator. The driving circuit is between the caps and the resistors are the stretched structures below the caps. The two large rectangles in the lower part are the capacitors. But of course, that is all that is needed for a circuit as simple as a flicker-LED.Īn initial survey reveals that there are two RC-oscillators. It turns out that the controller chip is manufactured in a relatively coarse CMOS process with one metal layer and 1-2 µm resolution. He managed to obtain very high-resolution optical microscopy images of the top-level metal. Andrew Zonenberg from Siliconpr0n decapsulated and imaged the controller chip from one of my LEDs. And that is to reverse engineer the circuit directly from the die. Of course there is another, more involved, approach. My approach was to extract the “flicker” pattern from the input current variation and to deduce the algorithm from statistical analysis. I previously reported on reverse engineering a candle flicker LED.