Eight boolean switches and displays simulate the 8

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: copies of DAC.vi convert the contents of the three registers into their numeric equivalent value. Figure 7-3. LabVIEW Simulation of an 8-Bit Binary Adder Load and run ADD R1,R2.vi to observe 8-bit binary addition in action. Try adding simple sequences such as (1+1) to more complicated patterns such as $EF +$3. Observe the operation of the carry bit. This VI can add larger bit values such as 16-bit numbers. On the block diagram, you will see how the binary addition modules of Lab 3 have been used with the DAC.vi modules to complete the simulation. National Instruments Corporation 7-3 Fundamentals of Digital Electronics Lab 7 Digital-to-Analog Converter Simulating a Real DAC Chip The Motorola MC1408 is an 8-bit digital-to-analog converter that provides an output current, i, directly proportional to the digital input. The transfer function found in the DAC specifications is i = K {A1/2+A2/4+A3/8+A4/16+A5/32+A6/64+A7/128+A8/256} where the digital inputs Ai = 0 or 1, and here A1 is the most significant bit. A8 is the least significant bit, and the proportionality constant K = Vref / R14. The reference voltage taken here as +5 V supplies a reference current of 5 V/3.9 k, which equals 1.28 ma through the resister R14. The maximum current produced when all input bits are high is 0.996 * 1.28 ma = 1.275 ma. Vref(+5v) R14 A1 . . MSB 13 5 6 7 8 9 10 11 12 16 15 pF 14 VCC(+5v) 2.0 kW (3.9 kW) +15v MC 1408 4 2 7 . A8 R15 15 741 3 + 4 15v 6 Vout LSB (3.9 kW) 3 2 VEE (15v) Figure 7-4. 8-Bit DAC Circuit Built with Conventional Integrated Circuits An operational amplifier, MC741, configured as a current-to-voltage converter, converts the DAC current into a voltage, Vout = - iR. For a feedback resistor of 2.0 k, the maximum output is - 2.55 V, and the sensitivity is 10 mV/bit. This is a convenient scaling constant, because the maximum digital input, all bits high, has a decimal equivalent value of 255. Fundamentals of Digital Electronics 7-4 National Instruments Corporation Lab 7 Digital-to-Analog Converter Figure 7-5. LabVIEW Simulation of the 8-Bit DAC Circuit Shown in Figure 7-4 Load and study the VI MC1408.vi, which simulates a DAC circuit using the 1408 DAC chip. Observe that the DAC resolution (that is, 1 bit change) is 10 mV. By adjusting the feedback resistor, the output can be scaled to any convenient full scale value (for example, 1.000). Note the differences on this block diagram as compared to the DAC.vi block diagram. If you have access to an MC1408 DAC and 741 OpAmp, the simulation can be compared with the real circuit shown in the schematic diagram. Waveform Generators Any sequence of bits fed to the inputs of the DAC at a uniform rate can be used to produce an analog waveform. The simplest sequence is derived from the outputs of an 8-bit binary counter. This will generate a 0-2.55 V digital ramp waveform. For this demonstration, the VI Binary8.vi introduced in Lab 5 is connected to DAC.vi. Its output is then connected to a waveform chart. The slope of the ramp is set by the frequency of counts--the larger the frequency, the larger the slope. An oscillator module generates the clock signal. When the binary counter overflows from (11111111) to (00000000), the analog voltage falls sharply from 255 to 0. This digital ramp is sometimes called a staircase waveform, as it resembles a stairway. National Instruments Corporation 7-5 Fundamentals of Digital Electronics Lab 7 Digital-to-Analog Converter Figure 7-6. Output of a 4-Bit, 6-Bit, and 8-Bit DAC As the number of bits of the DAC increases, the height of the stair step shrinks in size. A 4-bit DAC has 15 steps, a 6-bit DAC has 63 steps, and an 8-bit DAC has 255 steps. The above simulation, called DAC Resolution.vi, demonstrates dynamically how the resolution is increased with bit width. In the limit, as the number of bits increases from 16 to 20, the digital waveform more closely approximates an analog ramp. In the analog world, such a waveform is called a sawtooth wave. Take a look at the output of DAC8/12.vi, which demonstrates the added resolution in moving from an 8-bit to a 12-bit DAC. Most engineering and scientific applications require at least 12-bit resolution. Special DACs In unsigned binary arithmetic, all the numbers are positive. Signed arithmetic uses the most significant bit to indicate the sign of the number (0 is positive and 1 is negative). In this case, the 256 binary values of an 8-bit DAC are divided into the positive numbers from 0 to 127 and negative numbers from -128 to -1. The VI named DAC+/-.vi demonstrates a signed analog output. Fundamentals of Digital Electronics 7-6 National Instruments Corporation Lab 7 Digital-to-Analog Converter Figure 7-7. Unsigned and Signed DAC Output Note that the range of Y is identical for both the signed and unsigned version. Lissajous Figures If two signals are harmonically related, a plot of one on the x-axis against the other on the y-axis yields interesting patterns called Lissajous figures. By counting the number of intersection points a...
View Full Document

This note was uploaded on 12/01/2009 for the course S ss taught by Professor S during the Spring '09 term at Universidad Autonoma de Nuevo Leon - School of Business.

Ask a homework question - tutors are online