comparator value explained

This commit is contained in:
mariusmonton 2019-01-13 01:33:28 +01:00
parent a4a1be7386
commit d875dc2cd3
1 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,9 @@ void timer_ISR() {
ticks++;
if (ticks < 10) {
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;
}
}