2 #include <avr/eeprom.h>
3 #include <util/delay.h>
5 char dbg[5] __attribute__((section(".eeprom")));
9 TCCR1C = _BV(COM1D0) | _BV(COM1D1) | _BV(PWM1D);
10 TCCR1A = _BV(PWM1A) | _BV(PWM1B);
11 TCCR1B = 0x80 | _BV(CS13) | _BV(CS12);
19 eeprom_write_byte(&dbg[0], TCNT1);
20 eeprom_write_byte(&dbg[1], OCR1C);
21 eeprom_write_byte(&dbg[2], OCR1D);
22 eeprom_write_byte(&dbg[3], TIFR);
23 eeprom_write_byte(&dbg[4], TCCR1B);