#include // Timer 0 output compare interrupt service routine interrupt [TIM0_COMP] void timer0_comp_isr(void) { // Place your code here PORTD.3^=1; } // Timer 2 output compare interrupt service routine interrupt [TIM2_COMP] void timer2_comp_isr(void) { // Place your code here PORTD.4^=1; } // Declare your global variables here void main(void) { PORTB=0x00; DDRB=0x08; PORTD=0x67; DDRD=0x98; // Timer/Counter 0 initialization // Clock source: System Clock // Clock value: 1000,000 kHz // Mode: CTC top=OCR0 // OC0 output: Disconnected TCCR0=0x19; TCNT0=0x00; OCR0=0x7F; // Timer/Counter 2 initialization // Clock source: System Clock // Clock value: 1000,000 kHz // Mode: CTC top=OCR2 // OC2 output: Toggle on compare match ASSR=0x00; TCCR2=0x19; TCNT2=0x00; OCR2=0x40; // Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x82; // Global enable interrupts #asm("sei") while (1) { // Place your code here }; }