analog to digital , digital to analog conversion

14
ANALOG TO DIGITAL & DIGITAL TO ANALOG CONVERSION Prepared by:- Kunj Patel (140410116058)

Upload: kunj-patel

Post on 08-Aug-2015

72 views

Category:

Engineering


5 download

TRANSCRIPT

Page 1: Analog to Digital , Digital to Analog Conversion

ANALOG TO DIGITAL &DIGITAL TO ANALOG CONVERSIONPrepared by:-

Kunj Patel (140410116058)

Page 2: Analog to Digital , Digital to Analog Conversion

ANALOG-TO-DIGITAL CONVERTERS

Why Analog?

• Not everything is digital! • Even digital signaling has analog aspects (!?)

• Analog circuits and analysis are still necessary• Physical phenomena (i.e., the real world) are

usually analog• Many sensors are analog (potentiometer,

phototransistor, thermo-sensor, microphone)• Many actuators are analog (solenoid, speakers)• Some signals need to be processed in analog

domain before conversion to digital (amplification, filtering, linearization)

Page 3: Analog to Digital , Digital to Analog Conversion

ANALOG-TO-DIGITAL CONVERTERS

proportionality

Vmax = 7.5V

0V

11111110

0000

0010

0100

0110

1000

1010

1100

0001

0011

0101

0111

1001

1011

1101

0.5V1.0V1.5V2.0V2.5V3.0V

3.5V4.0V4.5V5.0V

5.5V6.0V6.5V7.0V

analog to digital

4

3

2

1

t1 t2 t3 t4

0100 1000 0110 0101

time

anal

og in

put (

V)

Digital output

digital to analog

4

3

2

1

0100 1000 0110 0101

t1 t2 t3 t4time

anal

og o

utpu

t (V

)

Digital input

Page 4: Analog to Digital , Digital to Analog Conversion

ANALOG TO DIGITAL CONVERSION

Instantaneous amplitudes of continuous analog signal, measured at equally spaced points in time.

A series of “snapshots”

Error=1/2 LSB

Page 5: Analog to Digital , Digital to Analog Conversion

ANALOG TO DIGITAL CONVERSION

5

[a.k.a. “sample word length,” “bit depth”]Precision of numbers used for measurement: the more bits, the higher the resolution.

Example: 16 bit

Sampling RateHow often analog signal is measured

Sampling Resolution

[samples per second, Hz]Example: 44,100 Hz

Page 6: Analog to Digital , Digital to Analog Conversion

SAMPLING RATE

6

Nyquist Theorem:

Sampling rate must be at least twice as high as the highest frequency you want to represent.

Determines the highest frequency that you can represent with a digital signal.

Capturing just the crest and trough of a sine wave will represent the wave exactly.

Page 7: Analog to Digital , Digital to Analog Conversion

DIGITAL AND ANALOG CONVERSION

A/D transfer function: 10-bit ADC converter 1024 voltage levels between 0V

and VREF 10-bit digital value

Usually VDD=VREF (e-Vmin)/(Vmax-Vmin)=d/

(2^n-1), When Vmin=0: e/Vmax=D/(2^n-1) In general

Vmax match 2^n-1 Vmin match 0

How does D/A and A/D conversion work?

Page 8: Analog to Digital , Digital to Analog Conversion

DIGITAL AND ANALOG CONVERSION D/A is simpler than A/D

Different resisters and an inverted OpAmp, to implement a weighted summer.

Example: 4-bit D/A

If D3D2D1D0=0001 (i.e., 0V,0V,0V,-5V) Vo=-1.1*(D0/17.6+D1/8.8+D2/4.4+D2/2.2)

=0.3125V If D3D2D1D0=1111 (i.e., -5V,-5V,-5V,-5V)

Vo=-1.1*(D0/17.6+D1/8.8+D2/4.4+D2/2.2)=4.6875V

Page 9: Analog to Digital , Digital to Analog Conversion

DIGITAL AND ANALOG CONVERSION

Use D/A converter to generate different analog values and compare Control logic decides which values

to try When comparison complete, best

match is put on output

How can D/A be matched to input in fewest steps?

com

pVIN

D/Aconverter

A/D controllogic

10-bit test value

clock

10-bit output

startconversion

conversioncomplete

Page 10: Analog to Digital , Digital to Analog Conversion

SUCCESSIVE APPROXIMATION (SAR) ADC

Matching strategies: Counting conversion (slow) Successive approximation (faster)

Successive Approximation: Basically binary search: Exact 10 steps instead of

1024, SAR is fast!

XXX

0XX 1XX

00X 01X 11X10X

000 001 010 011 100 101 110 111

XXX<100?

0XX<010?

1XX<110?

00X<001?

01X<011?

10X<101?

11X<111?

Page 11: Analog to Digital , Digital to Analog Conversion

DIGITAL-TO-ANALOG CONVERSION USING SUCCESSIVE APPROXIMATION

Given an analog input signal whose voltage should range from 0 to 15 volts, and an 8-bit digital encoding, calculate the correct encoding for 5 volts. Then trace the successive-approximation approach to find the correct encoding.

5/15 = d/(28 - 1)=d/255d= 85

Successive-approximation method

0 1 0 0 0 0 0 0

Encoding: 01010101

½(Vmax + Vmin) = 7.5 voltsVmax = 7.5 volts.

½(7.5 + 0) = 3.75 voltsVmin = 3.75 volts.

0 0 0 0 0 0 0 0

0 1 0 0 0 0 0 0½(7.5 + 3.75) = 5.63 voltsVmax = 5.63 volts

½(5.63 + 3.75) = 4.69 voltsVmin = 4.69 volts.

0 1 0 1 0 0 0 0

½(5.63 + 4.69) = 5.16 voltsVmax = 5.16 volts.

0 1 0 1 0 0 0 0

½(5.16 + 4.69) = 4.93 voltsVmin = 4.93 volts.

0 1 0 1 0 1 0 0

½(5.16 + 4.93) = 5.05 voltsVmax = 5.05 volts.

0 1 0 1 0 1 0 0

½(5.05 + 4.93) = 4.99 volts 0 1 0 1 0 1 0 1

Page 12: Analog to Digital , Digital to Analog Conversion

3-BIT QUANTIZATION

A 3-bit binary (base 2) number has 23 = 8 values.

0

1

2

3

4

5

6

7

A rough approximation

Am

plit

ud

e

Time — measure amp. at each tick of sample clock

Page 13: Analog to Digital , Digital to Analog Conversion

COMMON SAMPLING RATES

Sampling Rate Uses

44.1 kHz (44100) CD, DAT

48 kHz (48000) DAT, DV, DVD-Video

96 kHz (96000) DVD-Audio

22.05 kHz (22050) Old samplers

Most software can handle all these rates.

Which rates can represent the range of frequencies audible by (fresh) ears?

Page 14: Analog to Digital , Digital to Analog Conversion

THANK TOU