I've decided its worth the effort to overhaul a lot of the underlying RTM_TimerCalc code. The reason is to make good on claims of 'correct code' and 'WYSIWYG' functionality -- even with super low PWM resolution situations.
I did get the App. to generate correct code and display correct depictions for reduced PWM resolution. But the code structure became too sloppy. The only reasonable way forward is to redesign numerous sections. Turns out this is fairly time consuming but its already in gear.
Its gonna take some time but Rev 1.20 will deliver exact code and exact depictions for any working result you can dial up. And it'll address all other known bugs.
That's the plan,
UPDATE: I keep making changes and running tests to ensure the App. behaves. I decided to add a built-in Update-Check for new Versions. This facility runs as a background task to avoid delays but it might be noticeable depending on your Internet connection. The Update-Check can be disabled in the Settings Grid in case you don't want it. With this capability enabled, Users will see a button appear on the Toolbar when a newer Version is available. Clicking that button will take you to a special page to download.
UPDATE: 24-March 2020: Clock selection has been changed to reflect Arduino Timers do -not- use the Prescaler facility for external clock inputs! I've changed designation text to call the old "external clock" the new name of "custom clock". This now means if you changed the clock crystal, you can calculate Timer setups as usual. There is no capability for Timers using their "external clock inputs" such as found with Timer 1 on Uno and Timer 5 on 2560. In a future version, I may add this ability
UPDATE: 21-March 2020: A new Bug for mode_12_CTC was discovered. It would cause Phase-Shifted Square Waves to swap phases or otherwise be non-repeatable. This had me chasing my tail for some time. But adding a preset value to the 16-bit Timer in setup() helped. Using different ordering for the control register settings avoided the Timer running while still changing values! I tested these changes across a Nano, Uno and Mega2560. All three acted correctly and repeatably using this code. More testing is underway to ensure all modes work as intended. Stay tuned...
UPDATE: 11-March 2020: The app. is now performing quite well, especially in warning Users about low PWM resolution. The PWM display will now move in steps that are accurate representations of lowered PWM resolution. And the generated code renders the correct coefficients for PWM as well. This should mean all possible PWM scenarios render correct depictions and code! Now, I have to take the app. into Windows-10 for further evaluation and testing. Hopefully the new version will be out soon...
UPDATE: 7-March 2020: The new Interactive Display portion is now behaving to show reduced PWM resolution. I'm also adding an improved Status Indicator to warn about this and other situations. And the Message Window needs to be more organized. Its getting there.