Exploiting C undefined behavior to blink an LED

When dealing with errors in firmware, one encounters formal explanations of concepts like "undefined behavior," "storage duration," "variable lifetime," "initialization," and "dereferencing", whether scrolling Stack Overflow, arguing with your LLM of choice, or studying C standards at university, or discussing over an implementation detail with a colleague. These concepts are presented theoretically, rigorously, as abstract … Continue reading Exploiting C undefined behavior to blink an LED

RGBW Controller ASIC Part 3 – Design for silicon, colour space conversion algorithm and final block diagram

So far, I’ve documented the original FPGA-based project and the framework used to turn it into an actual Application Specific Integrated Circuit (ASIC), along with its functional description in Part 1. In Part 2, I covered a few key design considerations I learnt as a beginner when transitioning from FPGA to ASIC, specifically related to … Continue reading RGBW Controller ASIC Part 3 – Design for silicon, colour space conversion algorithm and final block diagram

RGBW Controller ASIC, part 1 – An FPGA design forged into an ASIC

I initially had an idea to implement an RGBW LED color controller in hardware, but I only had access to an FPGA along with free tools (though not necessarily open-source). Later, while participating in the ETHZ Summer School in Zurich, I discovered how it's possible, even for individual contributors, to affordably create an IC. At … Continue reading RGBW Controller ASIC, part 1 – An FPGA design forged into an ASIC

Experiments in implementing the WS2812B protocol in AVR MCUs without bit-banging

I started to experiment with the WS2812 LED, more specifically the WS2812B, which is a better revision in term of connections. These are the very famous individually addressable RGB LED, where tons of sources are available. Mainly due to their low cost, they are spread to the maker scene like a rhinovirus in a primary … Continue reading Experiments in implementing the WS2812B protocol in AVR MCUs without bit-banging

Dimming LEDs (part 1/3) – Analog and digital, not analog vs. digital

While messing around with dimmable DC-DC converters for LED drivers, I had the need to quantify the contrast ratio of a dimmable light. Turns out it is not that trivial, specially when combining switching periods, transients and mixed analog/PWM dimming. Looking for contrast ratio on the internet is only useful if you want to buy a TV, not if you want to build a LED driver. Also, on the web not all information seems to be correct, therefore this article and its possible continuation is the result of long investigations and discussions between engineers.