From a90b7a8dce9d9a6dd496776a3b38a59876a62d7a Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Tue, 15 Feb 2011 23:26:54 +0100 Subject: [PATCH] [avr] connect the analog comp to the input capture noise canceler for spike suppression --- mote/v2/avr/main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/mote/v2/avr/main.c b/mote/v2/avr/main.c index a5254f9..8b655bf 100644 --- a/mote/v2/avr/main.c +++ b/mote/v2/avr/main.c @@ -239,11 +239,8 @@ ISR(TIMER1_COMPA_vect) DBG_ISR_END(); } -ISR(ANALOG_COMP_vect) +ISR(TIMER1_CAPT_vect) { - if (!(ACSR & (1 << ACO))) - return; - disable_led(); event.brown_out++; @@ -318,6 +315,12 @@ void setup_timer1(void) // Enable output compare match interrupt for timer1 (DS p.136) TIMSK1 |= (1<