7_EMBEDDED_GR_ppapag_DAC

Download Report

Transcript 7_EMBEDDED_GR_ppapag_DAC

Lecture 15: Digital to Analog Converters Lecturers: Professor John Devlin Mr Robert Ross

Overview

• Introduction to DACs • Types of DACs • Applications of DACs • Further Reading: – R.J. Tocci, Digital Systems, Principles and Applications, Prentice Hall (Chapter 10)

Interfacing with the analog world

Introduction DACs

• The real world is full of analog, continuous signals • Microprocessors use digital electronics (discrete binary values) for processing • Digital to Analog Converters (DAC or D/A) convert discrete digital numbers into continuous like analog signals Digital Converter) – allowing digital electronics to output real world analog signals • DAC’s are ‘Mixed Signal Devices’ as they combine analog circuits with DSP • Reverse of the operation of the ADC (Analog to

Digital to analog conversion

• Convert a digital value to a proportional current or voltage.

• Vref is used to set the full scale output.

DAC Specifications

• Resolution: The smallest possible change that can occur in the analog output due to a change in the digital input (Step Size) • Offset Error: Signal may be artificially offset, yet remain linear • Linearity: How much two adjacent analog values deviate from the ideal 1LSB step

DAC Specifications

• Monotonicity: Direction of change the same – input increases = output increases Monotonic Function Non-Monotonic Function

Resolution

Calculating the Resolution Resolution =

K

 2

n A fs

 1 A fs : Analog full scale voltage n: Number of bits

Calculations

Resolution =

K

 2

n A fs

 1 Analog Output = K X Digital Input Digital Input = Analog Output / K A fs : Analog full scale voltage n: Number of bits

Types of DACs

• R-2R Ladder • Pulse Width Modulation (PWM) • Binary Weighted • Thermometer coded

Pulse Width Modulation DAC

• Pulse Width Modulation (PWM) • The duty cycle of a square wave is modulated, thereby altering the average voltage of the waveform • Period remains constant

R-2R Ladder

• Resistor Ladders (or R 2R Ladders) is the simplest DAC • Operates as an array of voltage dividers • Requires one output pin for each bit of resolution • Requires well matched resistors • Voltage spikes at major crossings (eg. 01111 >10000)

Binary Weighted

• Contains a resistor for each bit of the DAC • Resistors are arranged in binary decades • All resistors fed into a summing point • Difficult to produce – with accurate resistors for each binary bit

Binary Weighted

Thermometer coded

• A resistor or current source for each possible value of the DAC Output • 8 bit DAC would have 256 resistors • Fast and high precision, but very expensive

DAC Applications

• Audio – CD Players – MP3 Players • Video – DVD – Analog TV • Signal Generators – Ramp Function – Sine Wave

Waveform Generation

• Waveforms can be generated by supplying digital representations of the desired analog output

Summary

• Digital to Analog converters allow digital electronics to output signals which are similar to real world continuous signals • Pulse Width Modulation is a simple and widely used high resolution technique for implementing DACs