Liste der Anhänge anzeigen (Anzahl: 1)
Hallo,
die interne Taktquelle benutz ich nicht. Siehe Bild.
Im Moment ist der Timer auf "normal Mode" konfiguriert.
Und dort gibt es bei 0xFF ein Überlauf und der fängt wieder bei 0x00 an. Meiner Meinung nach braucht man da nix zurücksetzen.
Seite 104:
Zitat:
The simplest mode of operation is the Normal mode (WGM01:0 = 0). In this mode the counting
direction is always up (incrementing), and no counter clear is performed. The counter simply
overruns when it passes its maximum 8-bit value (TOP = 0xFF) and then restarts from the bottom
(0x00). In normal operation the Timer/Counter Overflow Flag (TOV0) will be set in the same
timer clock cycle as the TCNT0 becomes zero. The TOV0 flag in this case behaves like a ninth
bit, except that it is only set, not cleared. However, combined with the timer overflow interrupt
that automatically clears the TOV0 flag, the timer resolution can be increased by software. There
are no special cases to consider in the Normal mode, a new counter value can be written
anytime.
lg
Almic