#include #include <__armlib.h> static void timer0ISR(void) __attribute__ ((interrupt ("IRQ"))); static void timer0ISR(void) { IOSET = 0xFF; //LED aus /* Clear the timer 0 interrupt */ T0IR = 1; /* Update VIC priorities */ VICVectAddr = 0; } int main(void) { int zahl; IODIR = 0xFF; //Ausgang IOCLR = 0xFF; //LED an /* Timer 0 interrupt is an IRQ interrupt */ VICIntSelect &= ~0x10; /* Enable timer 0 interrupt */ VICIntEnable = 0x10; /* Use slot 0 for timer 0 interrupt */ VICVectCntl0 = 0x20 | 4; /* Set the address of ISR for slot 0 */ VICVectAddr0 = (unsigned int)timer0ISR; T0IR = 1; //Interrupt zurücksetzen T0TCR = 2; /* Reset timer 0 */ /* Set the timer 0 prescale counter */ T0PR = 2500; /* Set timer 0 match register */ T0MR0 = 10000; /* Generate interrupt and reset counter on match */ T0MCR = 3; /* Start timer 0 */ T0TCR = 1; /* Enable Interrupts */ __ARMLIB_enableIRQ(); return 0; }