This LED Logic Lock Only Lets You Activate a Circuit If You Know the 8-Bit Key
David Johnson-Davies created a digital combination lock using Microchip's AVR128DA28 and Configurable Custom Logic.
As pointed out by David Johnson-Davies in his recent Technoblogy post, Microchip's AVR DA family all include a new feature called Configurable Custom Logic, or CCL. This allows you to construct an arbitrary logic circuit that works independently of the processor.
After considering how he might use this technique, he decided to create an 8-bit digital combination lock. When the eight DIP switches are properly positioned, the AVR128DA28 MCU responds by lighting up an LED on its breadboard. Notably, while most of the new ATtiny 0 and 1-series chips are surface-mount only, this particular microcontroller can be found in a DIP package, perfect for experimentation.
In his write-up, Johnson-Davies goes over how this particular circuit works, the code involved, and it even shows how this kind of combination lock can be implemented with more traditional programming methods.
He notes that while the CCL takes a bit more effort to set up, but once implemented, the logic runs without any extra load on the processor. It even works when the microcontroller is otherwise asleep, enabling it to sense combinations while drawing only a minuscule 1.3mA. Obviously an 8-bit lock, with 256 possible combinations isn’t the most secure option available, but the project is a fun way to get your feet wet with this approach.