Light Tower 3.0 - display mode 0 + Precision LED blinking +Advanced AVR time management Nixie tube

Channel:
Subscribers:
539
Published on ● Video Link: https://www.youtube.com/watch?v=nz8fnJt06mw



Duration: 2:19
44 views
0


A led (the Dot led on a 7-segment) is used to display a number from 0-5 by the numbers of blinks. This is a simple idea, but can be very complicated to code, but with TM3, this is more than a piece of cake. 4Hz is picked for the blinking frequency because this is more easier for a human to read/count; so a 5 blinks at 4Hz is exactly 5*(1/4)*2=2.5 seconds, and to add a 1 second as blank, it requires 3.5 seconds to achieve such idea. 1 blink takes 1*(1/4)=0.25 second, so the maximum timing interval can not be fixed at 3.5 second, or the blanking period for 1 blink would be too long. Final challenge is to have these timing synchronize, so that the LED blinks at exactly the time frame at exactly the frequency.

Therefore this simple idea is simple, but is actually very complicated, and TM3 makes it easy again. The key here is to use few variables incrementing at the same time, but at different rate. Same time is not exactly the same nano second, but within 100us is more than sufficient. A synchronized counter incrementing at 500ms is needed with a range of 3.5*2=7 or (0-6);

0: OFF
1: 250ms-ON; 250ms-off; Off-1S = 1.5s
2: 2x[250ms-ON; 250ms-off;] Off-1S = 2s
3: 3x[250ms-ON; 250ms-off;] Off-1S = 2.5s
4: 4x[250ms-ON; 250ms-off;] Off-1S = 3s
5: 5x[250ms-ON; 250ms-off;] Off-1S = 3.5s

The absolutely beautiful line of code to achieve this complicated task is:
if( delaySec.ccx==num+2){delaySec.ccx=0;} //num is a number from 0-5; delaySec.ccx is a 500ms counter;

The LED will only blink after the counter is more than 1 or 2-7; Here the 1 second off period is placed on the first 2 numbers; What this code does is increasing the timing required for more blinks. If num is a 1, then it only requires 1.5s or when delaySec.ccx == 3; and this is the essence of Advanced AVR 3.0 time management.

PS. I am trying to use 1x 7-segment led display to display 2 numbers with the blinking dot led, but this will be one of the many sub-modes.




Other Videos By Flyandance


2023-12-11Minimal code on an AVR MCU with interrupt enabled - hard-coded interrupt table nostartfiles
2023-12-04Light Tower 3.0 - Macro cinematic close up view - 1 Removable nixie tube clock AVR Flyback
2023-12-01Light Tower 3.0 - Final Product - 21 neon lamps + 1 nixie tube clock + dual high voltage AVR
2023-11-29Light Tower 3
2023-11-28LT3.0 - Coding time lapse - Comment Clean up and Finalize
2023-11-27GamePlay - Mobile MOBA - Heroes Evolved
2023-11-24Light Tower 3.0 - Neon Lamp Crescent Patterns + Light weight Random number generator TM3 Nixie tube
2023-11-22PSC 2.0 - 12v fan controller + Vibration sensor as safety device
2023-11-19PSC 2.0 - Simple control - 2 buttons + 2 PWM channels + 5 LED - CD4017 Advanced AVR code
2023-11-18PSC 2.0 Demo + Advanced Application for the CD4017 counter
2023-11-15Light Tower 3.0 - display mode 0 + Precision LED blinking +Advanced AVR time management Nixie tube
2023-11-14Light Tower 3.0 - Driver finalized + Neon lamp full Test + 400mA power Consumption dual High Voltage
2023-11-13Light Tower 3.0 - Driver and TM update - Nixie tube clock High Voltage Advanced AVR time management
2023-11-12What Juno Advanced AVR Core can do? Demonstrated with Light Tower 3.0
2023-11-11Light Tower 3.0 - Display mode 1 Demo + Advanced AVR 3.0 time management Nixie tube clock
2023-11-07Light Tower 3.0 Driver creation and Hardware Test - Nixie tube clock AVR High Voltage MCU control
2023-11-06Light Tower 3.0 Assembled - (Hardware preview) Nixie tube clock - Dual High Voltage converter DC-DC
2023-11-03Infinity Ring of Love and Light 1.0 ---- Advanced CD 4017 + NE555 LED chaser
2023-11-02New Kit: Light Tower 2.0X - 10+1 Neon Lamp Chaser 70mA No LED mini transformer CD4017 + NE555
2023-11-01Open box - 4 New PCB - Components - Goodies - 4.5kg - 7 days shipping vis UPS Trade Direct® Air
2023-11-01Advanced AVR 3.0 time management Finalized - Elegant delay code + new HC-SR04 library