Thu, 01 Dec 2011 14:17:21 +0100
shark: corrected debug pins
carrerashark/main.c | file | annotate | diff | comparison | revisions |
--- a/carrerashark/main.c Wed Nov 30 14:14:38 2011 +0100 +++ b/carrerashark/main.c Thu Dec 01 14:17:21 2011 +0100 @@ -58,7 +58,7 @@ volatile uint16_t bitbuf = 0; ISR ( INT0_vect ) { - writeBit(PORTD, 5, 1); + PORTD ^= _BV(PD3); GICR &= ~_BV(INT0) ; // Disable INT0 // Startsignal erkannt, ab hier den Timer2 starten, // der liest dann alle 50µs den Zustand ein und schreibt das @@ -67,13 +67,11 @@ bitbuf_len = 0b10000000; // init 1 pulse received TCNT2 = 0; TIMSK |= _BV(OCIE2); //enable timer2 interrupt - writeBit(PORTD, 5, 0); } ISR ( TIMER2_COMP_vect ) { - writeBit(PORTD, 4, 0); - + PORTD ^= _BV(PD4); uint8_t clock; uint8_t state; uint8_t state2; @@ -105,9 +103,6 @@ bitbuf_len &= ~_BV(6); // store new state } } - - - writeBit(PORTD, 4, 1); } @@ -144,6 +139,7 @@ if (data_len == 13) { // sync to first packet i = 1; RS232_puts("\n"); + PORTD ^= _BV(PD5); } else if (i!=0) i++; if (i>0) { itoa( data, s, 16);