Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital to Analog Converters (DAC) 1

Similar presentations


Presentation on theme: "Digital to Analog Converters (DAC) 1"— Presentation transcript:

1 Digital to Analog Converters (DAC) 1
©Paul Godin Created March 2008 Updated March 2010

2 Digital and Analog Digital systems are discrete, meaning they have a finite numerical value. Sometimes referred to as “fixed” or “stepped” values. Analog values are continuous, meaning they have a value that can vary continuously. The values can be to a great degree of precision and may contain more information such as frequency, phase, etc… Analog values make up real-world values that can be measured. This presentation describes methods for converting digital values to analog values.

3 Digital to Analog Digital electronics offers advantages over analog in processing, data manipulation, storage and analysis of values. Often these digital circuits must interface with the real world: as inputs to analyze, process and manipulate as outputs to control the physical environment It is important to establish a means of converting between digital systems and the real world.

4 Transducers Transducers are devices that convert physical quantities into electrical quantities. There are many possible physical measurements requiring many types of transducers: Light Pressure Speed Flow Angle Temperature Rotation Vibration Sound, …

5 Actuators Actuators are electrically controlled devices that control the physical environment. There are many types of actuators available. These include: motors solenoids (electromagnetic non-rotational motion) relays pumps valves lifts heaters acoustic devices, …

6 Analog versus Digital A to A Distorted Analog signal A to D
A to D Original Analog signal Binary signal

7 The voltage is converted to a binary value at regular intervals.
Analog to Digital Original Analog signal A to D Conversion The voltage is converted to a binary value at regular intervals. Binary signal Animated

8 The binary value is converted to a voltage at regular intervals.
Digital to Analog D to A Conversion Analog signal The binary value is converted to a voltage at regular intervals. Digital signal Animated

9 Digital to Analog Converters
Digital to Analog Converters take a digital value and convert it to voltage or current over time. Converting discrete values to analog values has some challenges. Invariably, the analog value will retain some of the discrete steps from the digital value. Note that our discussions will focus on the output voltages but these are also applicable to output current.

10 Scale The range of the available digital values, based on the number of bits in the binary number, represents the full scale. lowest binary value represents the lowest voltage highest binary value represents the highest voltage The maximum and minimum voltage must be known to determine the scale. The Full Scale Output is the maximum value that the DAC can produce for the design.

11 AFS = Analog Full Scale Voltage
Scale Example D C B A VOUT 0.0 1 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 DAC D C B A MSB LSB VOUT Min binary = 0000 Max binary = 1111 Min VOUT = 0V Max desired VOUT = 7.5V There are 16 values from 0000 to 1111, but the first step (0000) equals 0. Therefore, 15 steps for an output range of 7.5 Volts. The scale will be 0.5 Volts per binary increment. AFS = Analog Full Scale Voltage

12 Scale Calculation A 4-bit DAC has an output of 1.0 Volts with a binary value of 1010. What is the output voltage if the binary value is 1100? What is the Full Scale Output voltage? An 8-bit DAC has an output of 12.0 Volts with a binary value of What is the K value?

13 Scale Example Analyzing the voltage output from the example it becomes evident that the output voltage, although analog, still follows a pattern of discrete values.

14 Input Weights Binary numbers have positional weighting. The value adjacent to the LSB has a weight of 2 times the LSB, the position adjacent to this has a weight of 4 times the LSB and the MSB has a weight of 8 times the LSB. In our example, each LSB change represented a 0.5V change to the output. By following the weights of the inputs starting from the LSB, the next value represents 1.0V (2x the LSB), the next value represents 2.0V (4x the LSB) and the MSB represents 4.0V (8x the LSB). With this in mind, a binary 1011 for our example should represent: 4.0V + 1.0V + 0.5V = 5.5 Volts 10112 20 21 22 23

15 Resolution The resolution represents the smallest change, or step, in the analog output. The greater the resolution, the smaller the steps. To increase resolution increase the number of bits in the binary value. In our example, a 4-bit number represented a 0.5 volt change per step. By increasing the number to 5 bits, each change would represent approximately 0.25 volt change per step, increasing the resolution.

16 Improved Resolution By increasing the binary number size by one bit the voltage between steps decreases. 4-bit resolution 5-bit resolution

17 Percentage Resolution
Resolution can be expressed as the percentage of the Full Scale Output. 4-bit example: 5-bit example:

18 Bipolar DAC The examples shown so far represented positive output voltage values. Analog values can also be negative. To represent a negative value a signed 2’s compliment is used.

19 The leftmost bit is the sign bit.
Signed Magnitude Binary systems utilize only 1’s and 0’s. The negative symbol cannot be used. In a signed magnitude value, the bit in the leftmost position of a binary number is used to indicate if the value is positive or negative. This is the sign bit. The value following the sign bit is the magnitude. = positive value, = negative value, The leftmost bit is the sign bit.

20 Signed Magnitude The signed magnitude is difficult for digital devices to utilize. Digital systems are designed to add values together. Another system is used instead: 2’s compliment. Sign Bit: 0 is positive 1 is negative

21 1’s Compliment The 1’s compliment simply means taking the compliment of each binary bit in a binary number. 10110 : Original Number 01001 : One’s Compliment

22 2’s Compliment The 2’s compliment simply means taking the compliment of each binary bit in a binary number and adding a 1 to the LSB. This is considered the equivalent of a negative number for purposes of addition. 10110 : Original Number 01001 : One’s Compliment 00001 : Add a 1 01010 : 2’s Compliment

23 Note the extra bit is always disregarded
2’s Compliment Example using 2’s compliment: Represent the following operation in binary: 12 3 9 1100 is 12 0011 is 3 1100 is 1’s compliment 1101 is 2’s compliment 1100 (12) +1101 (-3) 11001 (9) Note the extra bit is always disregarded

24 2’s Compliment Example 13 10 1101 is 13 3 1010 is “10”
0101 is 1’s compliment 0110 is 2’s compliment 1101 (13) +0110 (-10) 10011 (3)

25 Signed 2’s Compliment Example
13 10 3 01101 is 13 (signed 2’s compliment) 01010 is “10” 10101 is 1’s compliment 10110 is 2’s compliment 01101 (+13) (-10) (+3) Sign bit

26 Signed 2’s Compliment Example
01010 is 10 (signed 2’s compliment) 10 13 -3 11101 is “-13” 10010 is 1’s compliment 10011 is 2’s compliment 01010 (+10) (-13) 11101 (-3, in 2’s compliment) Sign bit 11101 is “-3” in 2’s compliment 10010 is 1’s compliment 10011 is -3

27 Exercise Determine the decimal values of the following signed binary numbers: 01001 10001 10101 Determine the decimal values of the following signed, 2’s compliment binary numbers:

28 Exercise (continued) What is the range of signed decimal values in 1 byte of data, and what is the most negative value in a signed byte? What is the most negative value in a signed, 2’s compliment byte?

29 Answers a: +9, b: -1, c: -5 These values are not 2’s compliment, so what follows the sign is magnitude a: +9, b: -15, c: -11 (most positive, +127) to (most negative, -128) -128 ( ). This is an unusual exception as the 2’s compliment equals the magnitude, but is valid.

30 Bipolar DAC If structured accordingly, DACs can produce negative and positive output voltages. Some DACs will accept a signed, 2’s compliment value, but this would be specified. Value Signed 2’s Compl. DAC input VOUT Most + +VMAX Zero 0V Most - -VMAX

31 Review Questions An 8-bit DAC has an input of and produces an output of 2.19 Volts. What is the voltage resolution? What is the FSO? What are the input weights of the bits? What is the percent resolution? = 73 > 2.19/73=0.03V/bit = FSO =>255*0.03=7.65V 1st=0.03v, 2nd=0.06, 3=0.12, 4=0.24, 5=0.48, 6=0.96, 7=1.92, 8=3.84 1/(28-1)=1/255=0.392%

32 Review Questions 2 An 6-bit DAC has an input of and produces an output of mV. What is the voltage resolution? What is the FSO? What are the input weights of the bits? What is the percent resolution? = 23 => 172.5m/23= 7.5mV/bit = FSO =>*0.03=472.5mV 1st=7.5v, 2nd=15, 3=30, 4=60, 5=120, 6=240mV (verify =172.5mV) 1/(26-1)=1/63=1.59%

33 End of Part 1 ©Paul R. Godin gmail.com


Download ppt "Digital to Analog Converters (DAC) 1"

Similar presentations


Ads by Google