--- In l..., Mohamad Tayssir Alkowatly wrote:
>
> Hi all
>
> I've come across a paper where they use ADC in power down mode on some
> microchip MCU not to reduce power consumption but to lower the noise caused
> by the MCU operation.
>
> First, when this sounds logical, how much does is really improve the ADC
> operation accuracy ?
>
> Second, I've tried to do this by setting the PDN bit to zero in the
ADCR
> register instead of one when requesting the ADC operation, but this change
> caused the program not to function properly, or at least the messages
i'm
> putting over the USB are not being sent to the host (i'm using the
lpcusb
> vcom as a way of sending messages over the usb)
>
> for (i = 0; i < N; i++)
> {
> T0IR = 0x01;
> T0TCR = 3;
> T0TCR = 1;
>
> get_adc();
>
> // send sampling results each second
> if (i % SAMPLING_RATE == 0)
> {
> sprintf(s, ADC results
> USB_puts(s);
> }
> while ((T0IR & 0x01) == 0);
> }
>
> is there anything that i should take care of when doing the ADC operation
in
> power down mode ?
>
> Cheers,
>
> Tayseer
>
>
If you put the device into power down mode, all clocks are stopped, also
that one to the ADC and it will not work any more.
The mode you are looking for is the so called idle mode with the CPU not being
clocked any more but all the peripherals receive clock pulses. The interrupt at
the end of the conversion can wake up the CPU again. I would not expect a lot of
improvement in the accuracy. If a better ADC is needed, check out the LPC1700
series with a 12-bit ADC and better overall accuracy.
Cheers, Bob
http://www.mcu-related.com