Skip to main content

Microcontrollers

Section 6.3 Digital to Analog Conversion

A digital to analog converter (DAC) performs the reverse function of an ADC by converting a binary value to an analog voltage. The analog voltage output of a DAC is given by (6.3.1), where \(n\) is equal to the resolution of the converter.
\begin{equation} V_{out} = V_{ref} \times \left(\frac{\textrm{value}}{2^n}\right)\tag{6.3.1} \end{equation}
In a DAC circuit, a digital datastream can be sampled and held (or sampled continuously), in which case the digital value is then converted into an analog voltage level. An R-2R ladder is one of many common architectures used to convert a binary value into a voltage. The circuit diagram of a 3-bit R-2R ladder is shown in Figureย 6.3.1.
Circuit diagram of a 3-bit R-2R ladder. 7 identical resistors R are connected in series with the left end connected to the analog output and the right end connected to a 2R resistor and then ground. At each node between resistors is a connection to one bit of the digital input value.
Figure 6.3.1. Schematic of a 3-bit R-2R ladder digital to analog converter.