Pages: [1]   Go Down
Author Topic: set Timer1 dynamically based on measured interval  (Read 365 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
Karma: 0
Posts: 221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Pages: [1]   Go Up
Jump to: