From 4f7736b055f5a63e015cddf9ec7e10d1f0576ded Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 6 Apr 2022 23:16:05 -0400 Subject: [PATCH] added comments --- cubeplex.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cubeplex.h b/cubeplex.h index 20a2429..0016500 100644 --- a/cubeplex.h +++ b/cubeplex.h @@ -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) {