[sdiy] ATSamD4 Breakout Board

rsdio at audiobanshee.com rsdio at audiobanshee.com
Tue Nov 10 07:51:59 CET 2015

On Nov 9, 2015, at 2:06 PM, nvawter <nvawter at media.mit.edu> wrote:
> On 2015-11-09 16:32, Eric Brombaugh wrote:
>> It works fine but the 12-bit output might be limiting in some situations.
> IIRC this app note correctly:     http://www.atmel.com/Images/doc8003.pdf
> It shows how N bit sampling can be turned into N+M bit samples through oversampling at (4^M) times.  I think this would work well for DACs, too.
> That (4^M) sounds very expensive to do, but there is a sweet spot in turning 12-bit into 14-bit by upsampling 16x.  14-bit = 12-bit * (2^2).  That would mean a 44 kHz output routine would have to run a 705 kHz routine to upsample and synthesize a new sample every 16 times (@44kHz), but I believe the oversampling math is nearly the same as linear interpolation.  (you don't have to re-synth the whole synth loop at 705 kHz, only do the interp).
> Something to think about!  I'd love to try it sometime...   could be an easy experiment even with something like my Teensy 3.1....
This is a great technique when you need to scan faders and knobs at 100 Hz, and have the headroom to bump that up to 1.6 kHz. However, I strongly recommend against trying to run samples through a tiny processor at 705.6 kHz. It's just not very efficient to handle things at that high of a rate with a general-purpose CPU. Far better to just bite the bullet and get an I2S CODEC that can handle 16-bit at 44.1 kHz. You'll probably find that the 12-bit ADC can't handle those rates anyway. By the time you find a 12-bit CODEC that can handle those rates - I've designed with Texas Instruments chips that handle 1 MHz sampling - you're already external to the CPU and should probably just switch to a 16-bit native chip. There are drawbacks to oversampling.

> Also on the topic STM and oversampling: I took a seminar on the STM32L4 (low-power STM32F4) last month...  The newer parts have *built-in* oversampling on the ADC side!  I think it went up to 256x?  I haven't researched what other parts have this as well, but I wouldn't be surprise to see it propagate into others.  It also has a built-in convolution for up to 1024x sigma-delta samples!  amazing age we live in…
In this case, hardware oversampling is much more efficient, and simply delivers the down-sampled to your CPU. Most audio CODEC chips these days operate in delta-sigma mode with serious oversampling to increase the bit depth. In fact, all 24-bit chips operate with oversampling.


More information about the Synth-diy mailing list