#include #include #include #include // Declare your global variables here char i; char data[17]; // Timer 2 overflow interrupt service routine interrupt [TIM2_OVF] void timer2_ovf_isr(void) { i++; } void main(void) { // Timer/Counter 2 initialization // Clock source: System Clock // Clock value: 187,500 kHz // Mode: Normal top=FFh // OC2 output: Disconnected ASSR=0x00; TCCR2=0x04; TCNT2=0x00; OCR2=0x00; TIMSK=0x40; DisplayOn(); //init_Display while (1) { //Funktionskontrolle über Displayausgabe: sprintf(data,"%03d SR%02x MC%02x TIFR%02x",i,SREG,MCUCSR,TIFR); LCDText(data,0,7); sprintf(data,"%03d GI%02x TI%02x TCNT%02x",i,GICR,TIMSK,TCNT2); LCDText(data,0,6); Delay1ms(3000); // Global enable interrupts #asm("sei") }} //################################################################################### //Gar nicht genau void Delay1ms(unsigned int time) //################################################################################### { unsigned int i; for(i=0; i