This is the
most simple way of converting digital signals into an analog voltage.
The circuit is shown in figure 1. The values of the resistors are 2(m-n)
multiples of the resistor value of the most significant bit (MSB). In
out example m=4, R(D4)=1k
R(D3)=1k * 2(4-3) = 2k
R(D2)=1k * 2(4-2) = 4k
R(D1)=1k * 2(4-1) = 8k
R(D0)=1k * 2(4-0) = 16k
Fig. 1:
Simple resistor digital to analog converter
To test the
circuit the input D0 to D4 are stimulated using pulse sources. The
corresponding SPICE netlist is shown below:
*SPICE
circuit <RDTA> from XCircuit v3.30
R1 D0 AOUT 16k
R2 D1 AOUT 8k
R3 D2 AOUT 4k
R4 D3 AOUT 2k
R5 D4 AOUT 1k
* stimulus added manually creating a ramp
V0 D0 0 pulse 0 1 1n 1n 1n 9n 20n
V1 D1 0 pulse 0 1 1n 1n 1n 19n 40n
V2 D2 0 pulse 0 1 1n 1n 1n 39n 80n
V3 D3 0 pulse 0 1 1n 1n 1n 79n 160n
V4 D4 0 pulse 0 1 1n 1n 1n 159n 320n
* a little capacitive load eases convergence
C1 AOUT 0 0.1p
.end
(If you want
to play with SPICE here is the netlist itself: RDTA.in
)
The simulation shows a decreasing quantisized ramp