global flow chart Analog Digital conversion

09 Nov 2010

Does someone have a description of the global steps for initializing the ADC and performing the conversion?

I mean not the detailed code, but just the basic steps to take and the sequence. I studied the LPC1768 manual, but it is not described there.

09 Nov 2010

#include "mbed.h"

Serial pc(USBTX, USBRX); // tx, rx
AnalogIn ain(p18);//initalise ADC

int main() {
pc.printf("Hello World!");
while (1) {

pc.printf("%f \n", ain.read());//printf the ADC conversion
wait(0.1);

}
}

API is in the handbook, but that little bit of code will output the analog input to teraterm over the usb used to program it.

http://mbed.org/handbook/AnalogIn < has the API for the AnalogIn