Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
hi,
i have a 16 kHz signal an need 10 samples per period, but the ADC seems too slow.
I tried this:
#include "mbed.h" Serial pc(USBTX, USBRX); Timer timer; AnalogIn a_PD[] = {(p16),(p17),(p18),(p19),(p20)}; float voltage; float stop; int main() { while(1) { timer.reset(); timer.start(); voltage=a_PD[5]; stop=timer.read(); pc.printf ("Timer: %f\n", stop); } }The time for one sample is 0,000022s=22us. Thats only a sampling rate from 45,5kHZ, but the datasheet says something about 200kHz.
Where is the mistake?