RTM_TimerCalc V1.40 includes Adjustable Phase Square Waves (VIDEO)

1 post / 0 new
Runtime Micro's picture
Runtime Micro
Offline
Joined: 07/24/2016 - 9:18am
RTM_TimerCalc V1.40 includes Adjustable Phase Square Waves (VIDEO)

Run-time Adjustable Phase Square Waves can be yours (Uno, Nano, 2560, 328). After I restore Mode-12 CTC in version 1.40 of RTM_TimerCalc. A new Code approach fixes the "phase-flip" problem.

The following GIF shows an Uno Timer-1 outputs.

Animated GIF shows Run-Time Adjustable Phase Square Waves output from an Uno.

I alternately press one of two push-buttons to adjust phase angle in real time. This build is just an Uno, a breadboard and two PB's plus some wire. Its powered via USB cable.

I hadn't realized there was a problem till I wrote code to scan the phase-shift across a range and back. That's when I saw it was 'flipping' phase angles 180 degrees! This was an unexpected and horrible result.

I removed mode-12 CTC from version 1.31 and decided to forget it. One day a reddit user posted a question that got me curious. I did some digging in the Atmel documents and found the solution!

Version 1.4 includes new code to make adjustable phase shift square waves stay where you want them, even when you change the angle in run-time!

Its release is pending a Video to describe its advanced features. I'm terrible at making videos so my apologies for all the delay.

Stay tuned... Smile

Lee

Created: Jun 14, 2022   Updated: Oct 6, 2022