Eight new posts / 0
The Last post
CSQ
Offline
Last seen:1 year 8 have a line
Joined:The 2018-08-05 08:56
SUOTA adc sampling rate is not so high datasheet said

For (int I = 0;I < 100;I++) {
Adc_init (GP_ADC_SE, GP_ADC_SIGN, 0);
Adc_enable_channel (3);
Adc_sample4 [I] = adc_get_sample ();
Adc_disable ();

Adc_init (GP_ADC_SE, GP_ADC_SIGN, 0);
Adc_enable_channel (0);
Adc_sample1 [I] = adc_get_sample ();
Adc_disable ();

Adc_init (GP_ADC_SE, GP_ADC_SIGN, 0);
Adc_enable_channel (2);
Adc_sample3 [I] = adc_get_sample ();
Adc_disable ();

Adc_init (GP_ADC_SE, GP_ADC_SIGN, 0);
Adc_enable_channel (1);
Adc_sample2 [I] = adc_get_sample ();
Adc_disable ();
}
I use the adc sampling, however after 100 cycles, a total of 400 times, time has passed ms level
The Features
65 ns, 10 - bit ADC with dynamic conversion time

Device:
FvD_Dialog
Offline
Last seen:2 days 13 hours a line
The Staff
Joined:In 2013-12-05 he cometh
Dear CSQ,

Dear CSQ,

Sorry, I 'm answering in English.

We are & into your code and will try to optimize it.

Kind regards

FvD_Dialog

CSQ
Offline
Last seen:1 year 8 have a line
Joined:The 2018-08-05 08:56
So how can I use the ADC in

So how can I use the ADC in high rate?

CYibin
Offline
Last seen:9 have 2 weekes line
The Staff
Joined:The 2017-12-14 02:48
hello

hello

This calculation is not precise.

In your code, sampling time should account for only a few part of code loss (for loop, function calls) and ADC initialization takes up time, much higher than the sampling time.

May I have your project needs to implement what function?Need to how fast sampling speed?

CSQ
Offline
Last seen:1 year 8 have a line
Joined:The 2018-08-05 08:56
Use of adc acquisition for high frequency modulation signal receiving, about 1 MHZ

Use of adc acquisition for high frequency modulation signal receiving, about 1 MHZ, I mainly in the repository didn't find other serial adc sampling related library function, or the fastest can pick how much

CYibin
Offline
Last seen:9 have 2 weekes line
The Staff
Joined:The 2017-12-14 02:48
Hi CSQ,

Hi CSQ,

The theory of 3.3 Msample/s.

ADC initialization (20 us) and run after the conversion time is close to 1 us, transformation of data processing need 4 us, so the theory of maximum sampling rate is 16/5 = 3.3 Msamples/s

Actually finish the transformation in the process of data stored in ram, there will be some other code running time of the loss, so it is difficult to achieve the theoretical value.

Do you want to the ADC sampling rate can reach 1 MHZ or want to 1 MHZ waveform sampling?

CSQ
Offline
Last seen:1 year 8 have a line
Joined:The 2018-08-05 08:56
Waveform sampling of 1 MHZ

Waveform sampling of 1 MHZ, at the bottom of the function
Adc_get_sample {

Int CNT = ADC_TIMEOUT;
SetBits16 (GP_ADC_CTRL_REG GP_ADC_START, 1);
While (CNT, && (GetWord16 (GP_ADC_CTRL_REG) & GP_ADC_START)!= 0 x0000);
X0000 SetWord16 (GP_ADC_CLEAR_INT_REG, 0);/ / Clear the interrupt
Return GetWord16 (GP_ADC_RESULT_REG);
}
This seemingly no continuous read mode

CYibin
Offline
Last seen:9 have 2 weekes line
The Staff
Joined:The 2017-12-14 02:48
hello

hello

3.3 Mhz is the sampling rate theory can achieve, in fact, because of the limitation of ram chips frequency limit (16 Mhz), and additional, the cost of processing code, may not apply"Waveform sampling of 1 MHZ"This kind of application scenarios