I have the arduino duemilanove with atMega328. The frequency is 16Mhz.
I want to sample and record from the audio jack. I searched and i found if i want to record "everything - so to speak", i have to sample at 44100Hz.
That means this is unfeasible with my arduino, since my frequency is only 16MHz?
-
316 MHz is 16000000 Hz. The "M" is relevant.Connor Wolf– Connor Wolf10/17/2014 11:17:18Commented Oct 17, 2014 at 11:17
1 Answer 1
For the AtMega328's ADC the datasheet says
• Up to 76.9kSPS (Up to 15kSPS at Maximum Resolution)
So, sampling two channels at 10bit resolution and 44.1kHz is not possible.
If 8bit resolution is enough, and if there's only one channel to sample, it should be able to do the job.
Edit:
To answer Connor's comment:
Of course, this does only apply when using the internal ADC. Connecting an external ADC (via SPI or whatever) makes it possible to sample data at the desired speed.
But anyway, the next question is: Is 16MHz fast enough to process the sampled data (which are received every (22.6/channels) microseconds? ;-)
-
This assumes you're using the ATmega's internal ADC.Connor Wolf– Connor Wolf10/17/2014 11:18:30Commented Oct 17, 2014 at 11:18
-
Unless one is going after very strong high frequency sounds, it's probably not wise to maximize sample rate at the expense of resolution.Chris Stratton– Chris Stratton10/17/2014 15:52:10Commented Oct 17, 2014 at 15:52