Hallo zusammen,
ich habe das Problem, dass mein AD0 beim LPC2138 kein Interrupt auslöst, 
wenn das Done-BIT 1 ist. Habe ich irgendetwas vergessen? Die AD-Wandlung 
funktioniert soweit. Wenn ich den IRQ weglasse läufts.
| 1 | // AD-CONVERSION
 | 
| 2 | VICVectCntl14 = 0x20 | 0x12;    // VICVectCnt# -> Slot14 (priority) 
 | 
| 3 |                                 // 0x20 -> this vectored IRQ slot is enabled 
 | 
| 4 |                                 // 0x12 -> bits 0..4 from the VICVectCntrl# define the IRQ you wish to turn on  from 0 to 31 -> AD0 
 | 
| 5 | VICVectAddr14 = (unsigned long)isr_ad0;    // AD0 Interrupt -> Vector 14
 | 
| 6 | VICIntEnable  = (1 << 18);                 // enables AD0 INT
 | 
| 7 | 
 | 
| 8 | AD0CR |= 0x00270600 | (1 << 0); 
 | 
| 9 |                    // Bit 21 -> The A/D converter is operational.
 | 
| 10 |                                // Bit 19,18,17 -> 011 = 8 clocks / 7 bits 
 | 
| 11 |              // Bit 16   -> Burst Mode (!No Start Bit)
 | 
| 12 |              // Bit 9,10 -> Clock Divider
 | 
| 13 |              // Bit 0    -> Select AD0.0  
 | 
| 14 | 
 | 
| 15 | __irq void isr_ad0(void)
 | 
| 16 | {
 | 
| 17 |   static unsigned int tempadvalue=0;
 | 
| 18 |   int i=0;
 | 
| 19 | 
 | 
| 20 |   for (i=0; i<MEASURMENTS_PER_VALUE; i++)
 | 
| 21 |   { 
 | 
| 22 |     tempadvalue = AD0DR0;                         // Read A/D Data Register           
 | 
| 23 |     tempadvalue = (tempadvalue >> 6) & 0x03FF;        // Extract AIN0 Value 
 | 
| 24 |     measured_values_float[VOLTAGE_1] += tempadvalue;
 | 
| 25 |   }
 | 
| 26 | }
 | 
Grüße
 Ruprecht