cjs3187607
Posts: 6
Joined: Fri Jun 29, 2018 5:29 am

Hi,

Archibald
Posts: 107
Joined: Mon Mar 05, 2018 12:44 am

Google translation of original post from Chinese:
I can not find the ADC sampling rate in the manual information, in the forum to see the post said to be 6K Hz, this 6KHz is 12Bit sampling the maximum sample rate? What is the maximum sample rate for each bit sample?
I am using the Arduino IDF. If I use the Arduino instruction . . . . . .

Code: Select all

``v[z] = analogRead(34);``
. . . . . (where 'v' is a uint16_t array indexed by 'z'), it takes 9.5µs.

If I use the ESP-IDF instruction with default 12 bit resolution. . . . . .

Code: Select all

``v[z] = adc1_get_raw(ADC1_CHANNEL_6);``
. . . . . it takes 36.5µs.

I hope someone can explain the reason for that!

The bandwidth of the ADC just is more-or-less 6KHz if you want a linear frequency response.
I take 6kHz to mean the analogue bandwidth, not the sample rate.

Usng the Arduino instruction 'analogRead', I am sampling a 40kHz sqaure wave at a sample rate of just over 100kHz and seem to be getting good digital values. I therefore question whether 6kHz is correct.

cjs3187607
Posts: 6
Joined: Fri Jun 29, 2018 5:29 am

Archibald wrote:Google translation of original post from Chinese:
I can not find the ADC sampling rate in the manual information, in the forum to see the post said to be 6K Hz, this 6KHz is 12Bit sampling the maximum sample rate? What is the maximum sample rate for each bit sample?
I am using the Arduino IDF. If I use the Arduino instruction . . . . . .

Code: Select all

``v[z] = analogRead(34);``
. . . . . (where 'v' is a uint16_t array indexed by 'z'), it takes 9.5µs.

If I use the ESP-IDF instruction with default 12 bit resolution. . . . . .

Code: Select all

``v[z] = adc1_get_raw(ADC1_CHANNEL_6);``
. . . . . it takes 36.5µs.

I hope someone can explain the reason for that!