From: Christian Pointner Date: Sun, 26 Apr 2009 23:58:17 +0000 (+0000) Subject: added debug to timer0 X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=d55a820fcac08bdee77070de938011ecd6af1875;p=svn42.git added debug to timer0 --- diff --git a/firmware/tuer.pde b/firmware/tuer.pde index 314ade2..c949297 100644 --- a/firmware/tuer.pde +++ b/firmware/tuer.pde @@ -132,6 +132,11 @@ ISR(TIMER0_COMPA_vect) return; } debounce_state |= DEBOUNCE_FINISHED; + + if(digitalRead(HEARTBEAT_PIN)) + digitalWrite(HEARTBEAT_PIN, LOW); + else + digitalWrite(HEARTBEAT_PIN, HIGH); } debounce_cnt = DEBOUNCE_DELAY; } @@ -413,11 +418,13 @@ void init_heartbeat() pinMode(HEARTBEAT_PIN, OUTPUT); reset_heartbeat(); // timer 2: ~10 ms, timebase for heartbeat signal +/* TCCR2A = 1< ~10 ms @ 16 MHz TCNT2 = 0; // reseting timer TIMSK2 = 1<