Juno BCR 2.0 - Part 2b - Final Library Test - Juno Button Advanced Core 3.0 Interrupt-based
Part 1: High Voltage Regulation (well done)
Part 2: C-library driver (well done)
Part 3: 24 Neon Lamp clock (Getting Started)
The algorithm for the Juno Button Advanced Core 3.0 Interrupt-based had been developed for a long long time, but it's never been implemented in a real application. A button can be extremely complicated when high code and speed efficiencies are the goal. Here, the 4 buttons' edge detections and debounce delay are done automatically by 3 types of hardware-based interrupt. This saves a lot of CPU power for other task.
The library also synchronizes with DS1302 2 times every second, refreshes the 24 neon lamps 30 times every second, and 4 precise toggles at 4 different rates for various tasks.
features:
-5 responsive levels of brightness control for 24+1 neon lamp flickering free, buzzing free and high efficient
-Hardware-level button code with a high quality DS1302 library
-Dummy-proof, easy to use library, 2k bytes for this sample program
PS. The sample program works fine, but the automatic (free running) neon lamp updating feature is not as organic. Having a way to control when the data is sent is better. It's easier to blink the neon lamp precisely this way.
PPS. The DS1302 is actually encoded with BCD, but my DS1302 library decodes the data to normal decimal number which is not ideal for outputting the binary neon lamp. The final clock will switch back to BCD. This clock will also support 12 and 24 hour.
PPPS. The working clock program is basically done. It's really simple to code a clock, but to make it really pretty, need more time. Every tiny detail is considered, and new ideas and coding techniques are developed and tested.