LPC2148: issues with ADC

Hello,

I’m trying to get the ADC to work on an LPC2148. I’ve configured both of the ADCs (0 and 1) into burst mode. I’ve also enabled all the pins so they are connected to the ADC module.

I can see the “overrun” and “done” flags being set in the data registers, though the value converted is always 0, whatever the voltage applied on the pin is (I read the values from the channels in the data registers).

One thing that looks pretty strange to me is that I cant see an AD0.0 pin on the LPC2148 (please correct me if I’m wrong), though the ADC0 module defines one.

Hows does the burst mode work by the way? Is the ADC module constantly updating the data registers, or does it wait until the value is first read? I have a loop that constantly read all the data registers, and again only zero come out.

Anybody with a code example?

Thanks for your help!

I haven’t used burst mode, but does the ADC work OK otherwise?

Leon

leon_heller:
I haven’t used burst mode, but does the ADC work OK otherwise?

Leon

Hi,

I have no idea, this is why I would like to get an example code.

Thanks

It’s always a good idea to try the simplest mode first when working with ADCs. You’ll find some examples in the LPC2000 Yahoo group files section.

Leon

Hi-

The first thing I always check when using a special function for any of the pins is the PINSEL0 and PINSEL1 registers. Are you sure you’ve configured the pins to act as ADC inputs?

-Ryan