Light Tower 3.0 - Driver and TM update - Nixie tube clock High Voltage Advanced AVR time management
The refined driver code has been polished once more; and TM is tested and few new ideas had been invented. Every thing is under the control of 1 to few lines of code now.
The 2x 7-segment LED may not seem that much, but its underline code is pretty impressive: 1, these LED are connected resistors-less; 2, Their brightness is controlled by changing its 15kHz PWM duty cycle every 30 times in one second and to balance the brightness, each segment is calculated and compensated. For example, if the PWM is fixed, then a 1 will be much brighter than an 8 because 2-segments are ON for a 1 and 7-segments are ON for an 8; 3, 9 brightness levels are added to the new update, and their brightness levels are stable and flickering free;
Time Management code has been reinvented a little and incorporated into the driver. Not only they are more code efficient, they are all synchronized and can be accessed in many ways, so here time is in full control. The actual TM uses less than 20 lines of code. A lot of dumb and repetitive codes are removed. Only 4 variables are used to control time from 4ms-4seconds.