What parts are needed:
9 - 20k ohm resistors
9 - 10k ohm resistors
1 - 10 uf capacitor
1 - parallel breakout cable (i.e.:
1 - extra long wire about a foot long.
3 to 4 alligator ended connector cables.
1 - good breadboard.
(amplifier not required)
Now build the r2r dac circuit as provided, but attach the voltmeter what the amp goes.Once that is done we need to create some computer code to test the circuit. We will use freebasic on linux.
for y = 1 to 255
for x = 1 to 100000
out 888, y
out 888, 0
Once you have written your code, you need to convert or compile it for the computer to use.
$ fbc -lang qb test.bas
Hook up the meter and set it for low dc voltage. Then run the program.
$ sudo ./test
Now notice the incrementally increases in the voltage. It almost seems if someone was turning the knob on a fader switch.The only shortcoming to this is it takes eight switches to do it. Then again it is very easily computer controlled!!! You can also use what is know as PWM (Pulse Width Modulation) with only one switch to do the same thing, but it takes fancier programming to do that.
Applications: Control the speed of a motor the intensity of light or anywhere variable voltage is needed to control a device. This circuit will NOT work with high voltage. See a professional for what exactly is needed if you want to use high power equipment.
Note: if we went the other direction and use the parallel port for input we could take a low voltage analog signal and turn it into a number or what is called as digitizing it.
Note 2: you probably can get sound out of this circuit, but you would have to use a pwm routine.