This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

arm7 - AD simulating

Does Keil software simulate the AD converter? I had been trying to use an AD interrupt (finish of the convertion), but it didn't occur (after starting the AD of course).

Parents
  • I use lpc2144, which support this interrupt. An interrupt doesn't occur. Why?
    That's my code:

    int meas;

    void AD_Isr(void) __irq
    { meas = AD0DR1 ;
    VICVectAddr = 0; // reset VIC
    }

    int main (void) {

    VICVectAddr2 = (unsigned long)AD_Isr;
    VICVectCntl2 = 0x00000032;// Channel1 AD as interrupt
    VICIntEnable |= 0x00040000;//Enable the AD interrupt
    AD0INTEN = 0x00000002; // Enable channel_1 interrupt
    AD0CR = 0x00000A02; // select channel_1 (P0.28)
    AD0CR |= 0x1000000; // start AD conversion !!!

    while(1){}
    }

Reply
  • I use lpc2144, which support this interrupt. An interrupt doesn't occur. Why?
    That's my code:

    int meas;

    void AD_Isr(void) __irq
    { meas = AD0DR1 ;
    VICVectAddr = 0; // reset VIC
    }

    int main (void) {

    VICVectAddr2 = (unsigned long)AD_Isr;
    VICVectCntl2 = 0x00000032;// Channel1 AD as interrupt
    VICIntEnable |= 0x00040000;//Enable the AD interrupt
    AD0INTEN = 0x00000002; // Enable channel_1 interrupt
    AD0CR = 0x00000A02; // select channel_1 (P0.28)
    AD0CR |= 0x1000000; // start AD conversion !!!

    while(1){}
    }

Children