920 likes | 1.18k Views
Chapter 12. Interfacing Analog and Digital Circuits. Analog Signals. Signals that vary continuously throughout a defined range. Representative of many physical quantities, such as temperature and velocity. Usually a voltage or current level. Digital Signals.
E N D
Chapter 12 Interfacing Analog and Digital Circuits
Analog Signals • Signals that vary continuously throughout a defined range. • Representative of many physical quantities, such as temperature and velocity. • Usually a voltage or current level.
Digital Signals • Signals that take on specific values only. • Required for operation with digital logic. • A representative of physical quantities by a series of binary numbers.
Advantages of Analog Representation • Varies continuously, like the property being measured. • Represents continuous values.
Advantages of Digital Representation • Values are limited to specific discrete segments. • Not subject to the same distortions as an analog signal. • Can be easily copied and stored.
Analog Voltage Sampling • A sample is an instantaneous measurement of an analog voltage. • Sampling frequency is the number of samples taken per unit time.
Accuracy of Digital Representation • Depends on sampling frequency and quantization. • Quantization is the number of bits used to represent an analog voltage as a digital number. • Resolution is the analog step size.
Resolution of a Digital Representation • The difference in analog voltage corresponding to two adjacent digital codes. • Directly proportional to the reciprocal of 2n, where n is the number of bits used in the digital code.
Analog-to-Digital Conversion • Uses a circuit that converts an analog signal at its input to a digital code. • Called an A-to-D converter, A/D converter, or ADC.
Unipolar ADC • Converts positive input voltages. • Generates a 2n-bit binary code for any given input voltage.
Unipolar ADC Code Equation • Va = analog input voltage to be sampled. • FS = Full scale range of input voltage. • n = number of bits in the output code.
Bipolar ADC (Offset Binary Coding) • Used to represent positive and negative input voltages. • Output code an unsigned binary number. • Numbers below 0 V are negative. • Numbers above 0 V are positive.
Bipolar ADC (2’s Complement Coding) • Uses a 2’s complement number system. • Most significant bit (MSB) is the sign bit. • MSB = ‘1’ sign negative. • MSB = ‘0’ sign negative.
Digital-to-Analog Conversion • Uses a circuit that converts a digital code at its input to an analog voltage or current. • Called a D-to-A converter, D/A converter, or DAC.
Unipolar DAC • One input code corresponds to a single digital code. • DAC has 2n discrete output voltage values.
Bipolar DAC (Offset Binary Coding) • Input code for 0 V is halfway through the range of digital input codes. • Output voltage equation:
Bipolar DAC (2’s Complement) • Accepts digital codes in 2’s complement format. • Code = a 2’s complement signed number.
DAC General Operation • Uses digital inputs to control proportionally weighted currents. • Currents are binary weighted – the MSB has the largest, the second LSB has ½ the current, and so on. • Currents feed an op-amp that converts current to voltage.
DAC Output Voltage • If Va is the output, Iref a fixed reference current, and RF the op-amp feedback resistor, then for n bits:
DAC Characteristics • The maximum output is always one least significant bit less than full scale. • An n-bit converter has 2n input codes, ranging from 0 to 2n – 1.
Weighted Resistor D/A Converter • Uses a parallel network of binary-weighted resistors to feed the op-amp. • Seldom used since a wide range of resistor values is required for a large number of bits. • Difficult to achieve accuracy for a high number of bits.
R-2R Ladder DAC • Produces an analog current that is the sum of binary-weighted currents. • Uses only two values of resistors. • Easily modified to add additional bits – each new bit requires 2 resistors, values R and 2R.
R-2R DAC Equation • b3, b2, b1, and b0 are binary values either ‘1’ or ‘0’.
MC1408 Integrated Circuit DAC • Popular, inexpensive 8-bit multiplying DAC. • Also designated DAC0808. • Output is proportional to the reference voltage.
Operation of the MC1408 • Requires an external op-amp to increase the output voltage and current. • Can be wired to produce a bipolar output voltage, that is, voltages that have both positive and negative values.
DAC Performance Specifications – 1 • Monotonicity means that the magnitude of the output voltage increases every time the input digital code increases. • Absolute accuracy is the measure of the DAC output voltage with respect to its expected value.
DAC Performance Specifications – 4 • Relative accuracy is the deviation of the actual from the ideal output voltage as a fraction of the full-scale voltage. • Settling time is the time required for the outputs to switch and settle within ½ LSB when the input switches form all 0s to all 1s.