Documente Academic
Documente Profesional
Documente Cultură
José Borges, Patrício Lima, Marcos Brito, Marek Mastyło, Jakub Nyk
GROUP 4
DEEC –MPIN
FEUP
April, 2010
April 10
Outlines
April 10 2
Overview of DA converter types
April 10 3
Overview of DA converter types
April 10 4
Overview of DA converter types
April 10 5
Overview of DA converter types
April 10 6
Overview of DA converter types
April 10 7
Overview of DA converter types
April 10 8
Overview of DA converter types
Reference: http://en.wikipedia.org/wiki/Digital-to-analog_converter
April 10 9
Overview of DA converter types
April 10 10
Overview of DA converter types
April 10 11
Overview of DA converter types
Applications
April 10 12
Principle operations
Counting Pulse-width modulator
Reference: http://www.analog.com/library/analogDialogue/archives/39-
06/data_conversion_handbook.html
April 10 13
Principle operations
Counting Pulse-width modulator
April 10 14
Principle operations
Counting Pulse-width modulator
April 10 15
Principle operations
R-2R Ladder
Reference: http://en.wikipedia.org/wiki/Resistor_ladder
April 10 16
Principle operations
R-2R Ladder
April 10 17
Principle operations
R-2R Ladder
April 10 18
Principle operations
R-2R Ladder - example
April 10 19
Principle operations
R-2R Ladder - example
April 10 20
Principle operations
R-2R Ladder - example
April 10 21
Principle operations
R-2R Ladder - example
April 10 22
Principle operations
R-2R Ladder - example
April 10 23
Principle operations
R-2R Ladder - example
Reference: http://www.ecelab.com/circuit-dac-r2r.htm
April 10 24
Principle operations
Four-bit DA Converter
Reference:
http://hyperphysics.phyastr.gsu.edu/hbase/electronic/dac.html#c2
April 10 25
Principle operations
Binary-Weighted DAC
Reference: http://www.analog.com/library/analogDialogue/archives/39-
06/data_conversion_handbook.html
April 10 26
Principle operations
Binary-Weighted DAC
April 10 27
Principle operations
Binary-Weighted DAC
Reference: http://www.analog.com/library/analogDialogue/archives/39-
06/data_conversion_handbook.html
April 10 28
Main Technical Specifications
Static Performance
• Resolution (N)
• Differential Nonlinearity (DNL)
• Relative Accuracy or Integral Nonlinearity (INL)
• Zero-Scale Error (VZSE)
• Full-Scale Voltage (VFS)
April 10 29
Main Technical Specifications
Resolution
April 10 30
M.T.S.
Differential Nonlinearity (DNL)
April 10 31
M. T. S.
Integral nonlinearity (INL)
April 10 32
Main Technical Specifications
Analog Output
April 10 33
Main Technical Specifications
Logic Inputs
April 10 34
Main Technical Specifications
April 10 35
Main Technical Specifications
Interface Timing Specifications
April 10 36
Main Technical Specifications
AC characteristics
April 10 37
Main Technical Specifications
Supply characteristics
April 10 38
DAC performance
Resolution
April 10 39
DAC performance
Maximum sampling frequency
April 10 40
DAC performance
Monotonicity
April 10 41
DAC performance
THD+N(Total harmonic distortion)
April 10 42
DAC performance
Dynamic range
April 10 43
DAC performance
Phase distortion
April 10 44
Application Example
Waves Generator
Requirements:
Generate four waveforms:
• Square,
• Triangle ,
• Sawtooth
• Sine
Amplitude choise
DC Level choise
Frequency choise
April 10 45
Application Example
Waves Generator
Schematic circuit
April 10 46
Waves Generator
How to generate
wave?
Choosing DA Converter:
National Semiconductors
April 10 47
Application Example
Waves Generator
Interface :
SET FUNC: to select functions:
• Waveform
• Amplitude
• Frequency
PLUS
MINUS
RST
April 10 48
Application Example
Waves Generator
Interface:
April 10 49
Waves Generator
How to generate waves?
Square wave:
Characteristics:
Vmax
Vmin
Pulse-width
April 10 50
Waves Generator
How to generate waves?
Square wave:
April 10 51
Waves Generator
How to generate
waves?
Algorithm to generate Square Wave:
April 10 52
Waves Generator
How to generate
wave?
Triangle wave:
April 10 53
Waves Generator
How to generate
wave?
Triangle wave:
Equation definition
April 10 54
Waves Generator
How to generate
wave?
Tabling values of magnitude:
April 10 55
Waves Generator
How to generate
wave?
Algorithm to generate Triangle Wave :
April 10 56
Waves Generator
How to generate
wave?
HOW TO GENERATE TAWTOOTH WAVE?
April 10 57
Waves Generator
How to generate
wave?
Sine Wave
April 10 58
Waves Generator
How to generate
wave?
Algorithm to generate Sine Wave:
April 10 59
Waves Generator
How to generate
wave?
Calculating values of Sk:
0 10 20 28 36 42 47 50 51
𝑽𝒑𝒑
𝑵𝒌 = 𝑽𝒅𝒄 + ∗ 𝑺𝒌
𝟐
April 10 60
Application Example
8051 Car
Circuit schematic
• Interface with DA converter serial port and motor controller.
April 10 61
Application Example
8051 Car
Circuit schematic
Connecting 8051 to:
• DA Converter
• Motor Controller
April 10 62
Application Example
8051 Car
Circuit schematic
• VREF+ – Reference voltage (Maximum)
• VREF- – Reference voltage (Minimum)
• IOUT – Output current of the converted data
• VEE – Power supply
• COMP – Compensation
• A1 to A8 – Digital input pins
April 10 63
Application Example
8051 Car
Circuit schematic
• Output Signal
8
𝑉𝑅𝑒𝑓
𝐼𝑜𝑢𝑡 = ∗ 𝐷𝑖 ∗ 2𝑖−8
𝑅𝑅𝑒𝑓
𝑖=1
𝐷1 𝐷2 𝐷3 𝐷4 𝐷5 𝐷6 𝐷7 𝐷8
𝐼𝑜𝑢𝑡 = 𝐼𝑅𝑒𝑓 ∗( + + + + + + + )
2 4 8 16 32 64 128 256
Ex:
𝐷 = 10001001
𝐼𝑅𝑒𝑓 = 1𝑚𝐴
1 1 1 137
𝐼𝑜𝑢𝑡 = 1𝑚𝐴 ∗ + + = 1𝑚𝐴 ∗ = 0.535𝑚𝐴
2 32 256 256
April 10 64
Application Example
8051 Car
Circuit schematic
• Motor interface
• The amplifier operates as a
current to voltage converter.
April 10 65
Application Example
8051 Car
Circuit schematic
• Motor interface
• The voltage is used to generate
the necessary current to feed
The motors..
April 10 66
Application Example
8051 Car
Coding
• Main program
• Check the command saved on 8051 memory and execute it.
• Commands supported:
• Speed – arg
• Front – arg
• Front right – arg
• Front Left – arg
• Back – arg
• Back right – arg
• Accelerate
April 10 67
Application Example
8051 Car
Coding
• Serial port
• Commands comes from a terminal connected to the serial port
• The supported commands, will be saved on memory
• In the end the code is compiled and a warning message tells
us if the syntax is correct
April 10 68
Application Example
8051 Car
Coding
• Main program Flowchart
April 10 69
Application Example
8051 Car
Coding
• Serial port interrupt routine
• Flowchart
April 10 70
References
Sites:
http://www.ecelab.com/circuit-dac-r2r.htm
http://en.wikipedia.org/wiki/Digital-to-analog_converter
http://en.wikipedia.org/wiki/Resistor_ladder
http://hyperphysics.phyastr.gsu.edu/hbase/electronic/dac.html#c2
http://www.the-crankshaft.info/2009/08/dac-interfacing.html
http://www.8051projects.net/
http://www.labcenter.co.uk/download/prodemo_autodl_general.cfm
Softwares:
ISIS Proteus
Uvision
April 10 71
Thank you !
April 10 72