What is the minimum sampling time for AVR microcontroller ADC? And What is the minimum timing of AVR microcontroller timer?
If you want all 10 bits the fastest you can run the ADC is 200kHz and because it takes 13 clocks to make a conversion this makes the fastest sample rate 15.3kHz or 66us.
If your design is all about ADC then (assuming you can cope with 3.3V) the Xmega range is a far better design for analog as it has a much higher sample rate.
ADC sampling frequency can not reach 1mHz? Because I need ADC acquisition rate exceeds 15.3KHz, I used to collect ultrasonic echo signals.
Then "mega AVR" is not the chip range for you (unless you want to add an external fast ADC?)
Isn't it possible to sample at 200KHz? You can't guarantee the accuracy of the ADC, as long as you can do it.
The megaAVR takes 13 "ADC clocks" to make a conversion so to sample at 200kHz you would need to run the ADC at 13 * 200kHz which is 2.6MHz. Now with the right F_CPU you can perhaps set the ADPS bits to run it at that speed but if you did you won't be able to get 10 bits of accuracy. The faster you run it above 200kHz the more noise you will have in the lower bits. I think it's been confirmed that you can get 8bits at 1MHz (and 1MHz / 13 = 76.9ksps) but I'm guessing you are down to 6 or 7 bits at 2.6MHz.
Isn't it possible to sample at 200KHz?
As mentioned, XMEGA AU has the fastest ADC, XMEGA E has 16b by oversample and decimate, and all have DMA except for XMEGA D.
"Dare to be naïve." - Buckminster Fuller
What trick questions you ask.
As the other respondents hinted at, all of the answers to your questions are in the datasheet.
Short answer is that an ADC conversion takes 13 ADC clock cycles. If the ADC clock prescaler is /1, then that would be the same as 13 AVR clock cycles. So >>you<< need to do the math. If your AVR is running at 13MHz (not mHz as you earlier mentioned) then there would be a new conversion result every 1 microsecond.
Now, will the result bear any useful value given such overclocking of the peripheral subsystem? I wouldn't think so, especially with the brief sample-and-hold period.
All moot IMO including "fast" external ADC -- how are you going to gather/store/process the information on an AVR8 at those speeds?!?
As mentioned there are many other types of microcontrollers that support higher sample rates.
Now are we on to
minimum timing of AVR microcontroller timer?
I did an application for an "industrial quality" ultrasonic line of transducers, with no ADC readings -- waveform was sampled and analyzed with midpoint "trips" with e.g. analog comparator.
You can put lipstick on a pig, but it is still a pig.
I've never met a pig I didn't like, as long as you have some salt and pepper.
Ultrasonic level gauge analog comparator how to calculate the calculation time? Do you have this code?Can you show me this program?
What do you say about this sentence?
“I did an application for an "industrial quality" ultrasonic line of transducers, with no ADC readings -- waveform was sampled and analyzed with midpoint "trips" with e.g. analog comparator.”
I used this one-chip computer to do the measurement of the ultrasonic liquid level gauge, so it is not easy to change the one-chip computer, the main problem now is that I do not know how to collect the echo time.
OK，thank you!There is another question. What is the minimum timer time for this microcontroller?
What is the minimum timer time for this microcontroller?
Now are we on to Liu Chenghu wrote: minimum timing of AVR microcontroller timer? Sheesh -- what does the datasheet tell you?
What does that have to do with ADC conversion rate?
What chip? Datasheet? Is it anything close to the common HCS04?
Have you used an AVR at all? Have you thoroughly examined the datasheet? Spend a day, go through it. Highlight all the information you find useful. You should try working with the AVR, making some of the many tutorials & experiments before jumping into something difficult. From the types of questions being asked, you will probably not have an optimal outcome if you don't go step-by-step. There are many experiments you should try with the timers, ADC, UART, etc, so that you can FIRST learn & figure out what is best for your application. Maybe then what seems difficult now will then seem easy.
When in the dark remember-the future looks brighter than ever.
© 2018 Microchip Technology Inc.