3
\$\begingroup\$

Will a DAC chip like MCP4921/4922 UDA1334ATS output at a higher rate than the samples are written to it? Like 16 kHz sampled data out (to the headset) but the processor just delivering new values at 8 or 4 or even any frequency? I don't think that this is so for the CS43L21? I am confused, and don't seem to be able to read these data sheet properly. If there is internal sampling (by some PLL etc.) of the DAC's sample and hold value, such oversampling should be possible, right?


Conclusion:

Thank you, @Justme and @hobbs! I am in rather good control of timing, using and XMOS 7-mic board and their 16-core embedded processor. But I didn't like that the mics' sampling rate could easily be modified (with the PLL), but the output to the headset is bound to 48 kHz (at least I have found no other rate that works), using the CS43L21. Even if I change in the PLL (CS2100CP), then the sampling rate changes ok, but the DAC gets silent. Then, to output at any rate will be perfect, so an R-2R DAC over I2S etc. would be fine. I see that there are boards for it, it would be mono then, which is what I'll use anyhow. But of course, a stereo R-2R would have been nice. And then I would need a headset amplifier... I'll probably stick to what I have and then only use like 1/6 of the mic samples for DSP and let the headset get their values at 48 kHz.

My project is described at My Beep-BRRR notes (disclaimer, no ads or money, just expenses and fun!)

\$\endgroup\$
5
  • \$\begingroup\$ The first link points to a datasheet of the MCP4921/4922, not UDA1334ATS \$\endgroup\$
    – Max Klein
    Dec 28, 2021 at 20:12
  • 2
    \$\begingroup\$ What effect do you think this would have on the DAC's output waveform? If you would get the same output whether the answer to your question is "yes" or "no", then maybe there's nothing to ask about. \$\endgroup\$
    – Ben Voigt
    Dec 28, 2021 at 20:22
  • 1
    \$\begingroup\$ Max, thanks! Ben, if I output a 2 kHz sine with new values every 4 kHz (Nyquist) and the sample & hold oversamples the DAC output at 16 kHz (or 8 kHz) then I assume I'd get 2 kHz in my headset. I am asking about these DACs, is this possible. I'm asking because of this (where I have found no way to do this): electronics.stackexchange.com/questions/600875/… (ADC->DAC there of course) \$\endgroup\$ Dec 28, 2021 at 20:39
  • \$\begingroup\$ That can't be done on the audio DACs. First of all, they don't accept streams with 4kHz sampling rate in, and they don't have sample&hold so they don't sample anything or hold anything. That is possible on the MCP DAC, but as it does not oversample, you do realize that sending a 2kHz sine at 4 kHz sampling will be a square wave, so you get a 2 kHz square wave, but only if you don't sample at the nulls of sine. \$\endgroup\$
    – Justme
    Dec 28, 2021 at 23:47
  • \$\begingroup\$ @ØyvindTeig - Hi, If you are wondering why your "answers" keep disappearing, you can read explanations by clicking on these links (which I believe will work for you, as they go to your deleted "answers") and reading the comments below each post - post 1; post 2. Thanks. \$\endgroup\$
    – SamGibson
    Dec 30, 2021 at 13:47

2 Answers 2

4
\$\begingroup\$

The UDA1334 is an oversampling audio DAC. It has an internal oversampler by ratio of 64. Yes, the DAC output updates 64 times the rate of samples sent in. The problem is that it must be sent with a digital audio stream with 16 kHz rate at minimum, so it can't be used with a sampling rate below 16 kHz.

The CS43L21 is also an oversampling audio DAC, it operates at oversampling ratio of 128. It uses multi-bit sigma-delta method of oversampling.

There is no internal sampling, the steady input stream of samples at fixed rate is just converted to higher internal sampling rate which is a multiple of input rate.

The MCP9421 is not an audio DAC. It converts the value to output as-is when you want it.

\$\endgroup\$
7
\$\begingroup\$

The UDA1334ATS and the CS43L21 are both oversampling DACs. That means that they're internally operating at a sample rate much higher than the input rate, doing some digital processing before outputting the samples, and then filtering out the high-frequency components to provide a nice low-noise output. They need to be clocked at rates given by their datasheets.

But the MCP4921 behind your first link is a simple R-2R DAC and it isn't processing or "clocking anything out" at any rate except the rate that you feed data to it. You write a sample word and strobe LDAC, and the output voltage changes (at a rate limited by the slew rate), and then keeps that value until you provide a new one. The sample rate is what you make it.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks a lot! I hadn't discovered those differences! (Sorry for the link trouble). So I am out after a MCP4921 little board. Any suggestions? (I have lived so long that I once even made a R-2R DAC converter for the first microprocessor-based product we made at the company I worked for (in 1978!)) \$\endgroup\$ Dec 28, 2021 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.