Go Down

Topic: set Timer1 dynamically based on measured interval (Read 502 times) previous topic - next topic


I have an external pulse triggering the hardware interrupt (INT0) at a slow rate and I want to accurately measure this (just compare readings of micros()?) and then use this interval to Timer1 to run at a rate that is exactly 24 times this speed.

Each new external pulse should help resync the Timer1 so there is no drift beyond counting up to 24.

What is the best way to implement this so that the there is little lag whenever Timer1 is reconfigured?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131