speeduino icon indicating copy to clipboard operation
speeduino copied to clipboard

Add tacho sweep function

Open wonder99 opened this issue 3 years ago • 2 comments

This enables the "Tachometer sweep on startup" in TunerStudio. The target RPM is slowly ramped at startup for the first second, then holds that level for the next half-second.

Slight tweak to the TCNT2 preload value, based on timing measured on an actual board. Loading the timer at the start of the loop eliminates jitter because varying ISR execution time is eliminated.

Also defines the loop counter terminal counts to be prime numbers, to limit the occurrence of multiple bits being set per loop, which should reduce overall jitter.

Sorry there are few little things in this one commit. I can break them up if needed.

wonder99 avatar Nov 24 '21 14:11 wonder99

I'm running it and it works nicely

shiznit304 avatar Jan 07 '22 02:01 shiznit304

That's great, thanks for testing!

wonder99 avatar Jan 07 '22 02:01 wonder99