Why don't microcontrollers generally have on-chip DACs?

First, some microcontrollers DO have D/A converters. However, these are far less common than A/D converters.

Aside from the technical issues, the main reason is market demand. Think about it. What kind of application would require a real D/A? It is quite rare to want a micro to produce a reasonably high speed analog signal unless the point is signal processing. The main market for that however is audio, and that needs a lot more resolution than you can build with the same process used to make the digital microcontroller. So audio will use external A/Ds and D/As anyway. DSPs that are intended for such applications have communication hardware built in to talk to such external devices, like I2S.

Otherwise for ordinary control applications, the strategy is to convert to digital as early in the process and then keep things digital. This argues for A/Ds, but D/As are useless since you don't want to go back to analog.

Things that microcontrollers typically control are controlled with PWM (PulseWidth Modulation). Switching power supplies and class D audio inherently work on pulses. Motor control, solenoid control, etc, is all done with pulses for efficiency. You want the pass element to be either fully on or fully off because a ideal switch can't dissipate any power. In large systems or where input power is scarce or expensive (like battery operation), the efficiency of switching systems is important. In a lot of medium cases the total power used isn't the issue, but getting rid of wasted power as heat is. A switching circuit that dissipates 1 W instead of 10 W may cost a little more in electronic parts than the 10 W linear circuit, but is a lot cheaper overall because you don't need a heat sink with associated size and weight, possibly forced air cooling, etc. Switching techniques also are usually tollerant of a wider input voltage range.

Note that PWM outputs, which are very common in microcontrollers, can be used to make analog signals in the unusual cases where you need them. Low pass filtering a PWM output is the easiest and nicest way to make a analog signal from a micro as long as you have sufficient resolution*speed product. Filtered PWM outputs are nicely monotonic and highly linear, and the resolution versus speed tradeoff can be useful.

Did you have anything specific in mind you wished a micro had a D/A converter for? Chances are this can be solved with low pass filtered PWM or would need a external D/A for higher resolution*speed anyway. The gap between filtered PWM and external is pretty narrow, and the type of applications that actually need such a signal is also narrow.


DACs are relatively expensive in silicon area. Far fewer applications need analogue output than input, and the DAC functionality needed for a large proportion of applications can be achieved more cheaply using PWM and a small amount of external filtering.


Two further issues, not yet mentioned:

  • There are many cases where a part will need to be able to measure the voltages on many pins, but not simultaneously. It is possible to use a single ADC along with one pass-gate per pin to accomplish this. By contrast, most parts which would need multiple DAC outputs would need them simultaneously.

  • The circuitry that interfaces an ADC to the outside world has to be able to transfer only enough current to charge or discharge any deliberate or parasitic capacitance on the ADC's input circuitry. Not only is that a pretty tiny amount of current, but it's essentially independent of the application. The extra area required to handle for "worst-case" current-handling requirements would be negligible compared with what would be required for something that could work in favorable application circumstances. By contrast, different DAC applications will have different current sourcing or sinking requirements, and the amount of chip area required to handle those requirements would vary enormously. Spending 20% of one's chip area on a couple DACs that precisely fit an application's requirements would be sensible, but spending 20% of the chip area in an application where smaller DACs that only took 5% would have sufficed is less so.

Incidentally, one technique I've not seen used much is to combine a DAC with a PWM. When using an R/2R DAC, it's easy to add an extra input whose weight is the same as the LSB (so e.g. a 3+1-input DAC would have weights of 1/2, 1/4, 1/8, and 1/8). Taking an 8-bit DAC and adding a PWM signal to it may yield a 12-bit result with 1/128 of the noise of a 12-bit PWM, but at a lower cost than using a 12-bit DAC of comparable linearity.