comparator value explained
This commit is contained in:
parent
a4a1be7386
commit
d875dc2cd3
|
@ -22,7 +22,9 @@ void timer_ISR() {
|
||||||
ticks++;
|
ticks++;
|
||||||
if (ticks < 10) {
|
if (ticks < 10) {
|
||||||
timer_value = TIMER;
|
timer_value = TIMER;
|
||||||
TIMER_CMP = timer_value + 590; // timer is in nanoseconds, set to 1 ms.
|
// timer is in nanoseconds, set to 1 ms.
|
||||||
|
// comparator value fixed to take into account number of instructions executed
|
||||||
|
TIMER_CMP = timer_value + 590;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue