I want to find out the dynamic parameters of the ADC12 embedded in the MSP430F149.
I want to know how I can maximize my sample rate. So far, I was only able to run it at 128 ksps, but the datasheet said I could run it at
200 ksps. If anyone could help me with this matter, I'd really appreciate it. Thank you.
- Amy
Didn't find your answer? Ask the community — no account required.
J
John Speth
We do this successfully. I think you'll need your MSP430 running at full MCLK but you can test if it's possible to make the target sample rate at a lower MCLK.
// Delay for reference start-up for(i = 0; i < 500; i++);
// Enable conversion ADC12CTL0 |= ENC;
// This starts the sampling i = (int)(ADC12MEM0); while(!(ADC12IFG & BIT0)); }
Here's how I read the ADC at 200KHz:
UINT16 adc;
for(;;) { // Get the next sample while(!(ADC12IFG & BIT0)); adc = ADC12MEM0; }
Keep in mind these important considerations:
You won't be able to service interrupts and sustain 200KHz continuous sample rate.
You won't be able to service ADC interrupts (IOW, you need to poll).
There's not a lot of processing time after you read the ADC result.
YMMV
JJS
J
John Speth
We do this successfully. I think you'll need your MSP430 running at full MCLK but you can test if it's possible to make the target sample rate at a lower MCLK.