Faster A/D conversion.on LPC11U24

11 May 2013

Hi all,

I wrote a minimal FFT implementation, nothing special, just eye candy. Now I want to sample a audio signal with a sample frequency of 44100 Hz. The obvious newbie way to do this:

void timerTick() {
// Ticks every 1/44100 s
    static int pInput;
    
    input[pInput++] = - 0.51;
    
    if(pInput > 31) {
        ticker.detach();
        pInput = 0;
        done = true;
    }
}

Although the ticker works fine at generating the correct tick frequency this approach yields a sample frequency of about 24000Hz due to the slow conversion.

I searched the forum and found the ADC full library, but that doesn't compile for the LPC11U24, probably because it accesses some LPC1738 specific SFR's.

Therefore, being new to this microcontroller. Does someone have a small example snippet that sets up the ADC on the LPC11U24.

Thanks in advance,

KK .

11 May 2013

I just happened to have finished a small ADC library that permanently runs the ADC in the background, so when you read a value you don't have to wait on conversion but you immediatly get it. However also that one is only for LPC1768. I can try porting it to the 11U24 (or you can :P). However since I don't have an 11u24 myself I can't compile for it (and I also cannot compile the mbed library myself for the 11U24 on code red), so I can't check if it actually compiles, let alone if it works.

Here is that library: https://mbed.org/users/Sissors/code/FastAnalogIn/

And the mbed ADC code: https://mbed.org/users/mbed_official/code/mbed-NXP/file/0d2906d9faf8/capi/analogin_api.c (mine is based on mbed code).

17 May 2013

As years go by it raises the clock for that. Quite a helpful post http://www.finestpapers.com/term-paper/buy-term-papers/