diff -r 20dbe0546a36 -r 6d6e982bbc41 receiver/main.c --- a/receiver/main.c Wed Nov 16 17:04:10 2011 +0100 +++ b/receiver/main.c Fri Nov 18 08:42:24 2011 +0100 @@ -129,11 +129,11 @@ SREG = sr; } -volatile uint8_t pulse_counter = 0; +volatile uint16_t pulse_counter = 0; volatile uint8_t measure_progress = 0; -volatile uint8_t car_id = 0; +volatile uint16_t car_id = 0; ISR(TIMER2_OVF_vect) { - //TCNT2 = 0x90; + TCNT2 = 0xF5; pulse_counter++; } @@ -142,6 +142,7 @@ //RS232_putc('x'); if (measure_progress == 0) { // start measuring + TCNT2 = 0xF5; pulse_counter = 0; measure_progress = 1; // set INT1 to rising edge (stops current measurement) @@ -179,20 +180,18 @@ TIMSK = 1<