Data Acquisition Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data Acquisition Issue

305 Views
gowtham_pmt1
Contributor II

ADS8698 is used as ADC, it's provide max 500KSPS. So, I made LPC1769(spi master) SCLK frequency as 12.5MHz(appr.333KSPS). Sampling has done, but I got only 472 samples(even not more than 1K samples) at 500ms. My question is why I got less samples(I thought, MCUXpresso debugger for printing the sampled data and its data transmission between LPC to PC through JTAG takes time because of that Samples rate is reduced). Please, provide actual reason getting less samples. 

0 Kudos
1 Reply

280 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suppose that there are two reasons that you get less samples.

The first one is that the SCK is not continuous, when the /CS is high, the SCK signal disappears, so during the time that the /CS is high, you can not read samples, which reduce the sampling.

Secondly, I do not suggest you use printf() to output the sample result to console, I suppose that you can use a timer to generate an interrupt, in the ISR of timer, you can toggles a flag. when the flag is set, you can start to read the sample with SPI based on polling or interrupt mode, when the flag is cleared, you can stop reading the sample and check how many sample you have read.

Hope it can help you

BR

XiangJun Rong

 

 

0 Kudos