Digital to Analog Conversion

Download Report

Transcript Digital to Analog Conversion

Digital to Analog Converters
1
Mark Neil - Microprocessor Course
Example Product: Signal Generator
2
 A Signal Generator should be programmable.
 A user can use the the LCD display and the keyboard
to change the:




Frequency scale
Amplitude scale
Offset on/off etc.
Waveform shape (Square, Sinusoidal, Triangle..)
 Analog control given by potentiometer
 Analog signal output by using a Digital to Analog
Converter (DAC)
Mark Neil - Microprocessor Course
3
Digital to
Analog
Conversion
Digital data
representing an analog
signal (for instance an
MP3 file) sampled at a
(usually) fixed time
interval is fed to a
Digital to Analog
Converter
The output is an analog
waveform which is an
approximation to the
original analog signal
Mark Neil - Microprocessor Course
Input Digital
Data
Digital to
Analog
Conversion
(DAC)
Output
“Sampled”
Analog
Waveform
The 741 Op.Amp
4
 Summing Amplifier
Vout = - (V1+V2+V3)
Mark Neil - Microprocessor Course
The 741 Op.Amp
5
 R-2R Network to convert digital to analog
Mark Neil - Microprocessor Course
6
Operation II
The basic operational
idea of the DAC we will
be using is simply to
have a series of switches
which control a resistor
network
Depending on which
bits are set, the output
voltage changes
Mark Neil - Microprocessor Course
7
The TLC7524
DAC
For your analog signal
generator you will be
using an 8-bit DAC to
convert an 8-bit data
stream , from the
ATmega128 ports, to
analog signals of given
frequency, amplitude
and offset
Mark Neil - Microprocessor Course
8
Write Cycles of
the TLC7524
The DAC has internal
registers to store the
input Data (1 Byte) and
signals which control
the write operation
(CS*, WR*):
Mark Neil - Microprocessor Course
9
DAC
Operation
The output signal will
need to be fed into an
external op-amp
Data should be put on
the data bus using one
of the ATMEL PORTs
CS* can be held low
Mark Neil - Microprocessor Course
10
Schematic
You can write numbers
to the DAC in a similar
way as with the 3-byte
memory module using
the ATmega128 Ports
CS* : keep it enabled
Mark Neil - Microprocessor Course
Task Plan
11
• Design and construct a Signal Generator:
• The signals should be produced using a DAC
and an Operational Amplifier driven by one of
the ATmega128 ports.
• Verify operation by copying the input voltage
read from the potentiometer to the DAC output
Mark Neil - Microprocessor Course