added comments
This commit is contained in:
parent
ad9de1e1e4
commit
4f7736b055
1 changed files with 3 additions and 3 deletions
|
|
@ -602,7 +602,7 @@ int maxTimer = 6250; // 100ms delay / 16uS interrupt time
|
|||
|
||||
int nextState(int state) { return (state+1)%2; }
|
||||
|
||||
// the interrupt function to display the leds
|
||||
// the interrupt function to display the leds (T2 = 8 bit timer)
|
||||
ISR(TIMER2_OVF_vect) {
|
||||
if (not timerReset){
|
||||
currentTimer++;
|
||||
|
|
@ -642,7 +642,7 @@ ISR(TIMER2_OVF_vect) {
|
|||
}
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
/**************************Applies to T2 (8 bit timer) only********************\
|
||||
| Some helpfull info for overflowing timers with different prescaler values |
|
||||
| 16000000 / ( 1*256) = 16000000 / 256 = 62500 Hz |
|
||||
| 16000000 / ( 8*256) = 16000000 / 2048 = ~7812 Hz |
|
||||
|
|
@ -656,7 +656,7 @@ ISR(TIMER2_OVF_vect) {
|
|||
int animationTimer = 0;
|
||||
int animationMax = 0;
|
||||
|
||||
|
||||
// T1 = 16 bit timer
|
||||
ISR(TIMER1_OVF_vect) {
|
||||
animationTimer++;
|
||||
if (animationTimer >= animationMax) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue