Course Introduction - Renesas e

Download Report

Transcript Course Introduction - Renesas e

Course Introduction
Purpose
 This course provides an overview of the Digital-to-Analog (D/A)
converter (or simply, D/A) peripheral function that H8 series
microcontrollers (MCUs) provide.
Objectives
 Understand the basics of D/A converters.
 Discover key design facts about the D/A that H8 MCUs provide.
 Gain insights about how to get the best performance from an
on-chip D/A converter.
Content
 15 pages
 3 questions
Learning Time
 25 minutes
1
© 2008, Renesas Technology America, Inc., All Rights Reserved
Digital-to-Analog Converters
D/A
Converter
CPU
Typical Applications
Digital servo tracking systems (~100Hz)
Software programmable power supplies
Simple sound generators (warning tones, etc.)
Modem output circuits
LCD contrast controls
Text-to-speech outputs
Alarm generators
2
© 2008, Renesas Technology America, Inc., All Rights Reserved
Analog Voltage
or Current
Types of D/A Converters
Two basic types:
Low resolution (most common)
Scaled Resistor
Scaled Current Sources
R-2R Ladder
High resolution
PWM types
Scaled Resistor D/A
Scaled Current Source
3
© 2008, Renesas Technology America, Inc., All Rights Reserved
R-2R Ladder Type D/A
DA Output
AVss
AVref
The number of output
steps = 2n-1 where n is the
number of bits.
1 Step
3 Steps
15 Steps 255 Steps
4
© 2008, Renesas Technology America, Inc., All Rights Reserved
Module Data Bus
Bus Interface
Typical H8 MCU D/A Converter
Internal Data Bus
AVref
AVCC
DA0
DA1
8-bit D/A,
2 channels
D
A
D
R
0
D
A
D
R
1
D
A
C
R
AVSS
DACR: D/A Control Register
DADR0: D/A Data Register 0
DADR1: D/A Data Register 1
Control Circuit
6
© 2008, Renesas Technology America, Inc., All Rights Reserved
R-2R type
Two separate
converters
8-bit resolution
Voltage reference
(AVref) input is
available so output
value can be easily
scaled.
Module
Stop
D/A Control Register
DACR
DAE: D/A Enable bit; enables the D/A converter. (This bit is shared by the two
D/A channels; setting or clearing it affects both channels.)
DAOE0, DAOE1: D/A Output Enable bits, one for each channel
Note: The D/A Control Register is set to the default state by either a Reset or
by entering the Hardware Standby mode. Essentially, then, if you need
to retain the analog output, use Software Standby mode. If you use
Hardware Standby mode, you must re-initialize the D/A converter.
7
© 2008, Renesas Technology America, Inc., All Rights Reserved
Port Structure
Digital Buffer
Transmission Gate
8
© 2008, Renesas Technology America, Inc., All Rights Reserved
Basic CMOS Analog Switch
Transmission Gate
RON
RDSon
9
© 2008, Renesas Technology America, Inc., All Rights Reserved
H8S/2148A D/A Characteristics
Condition A: Vcc and Avcc = 5.00V ±10%; AVref = 4.5V to Avcc
Condition B: Vcc and Avcc = 4.5 to 5.5V; AVref = 4.0V to Avcc
Condition C: Vcc and Avcc = 3.0 to 5.5V; AVref = 3.0V to Avcc
11
© 2008, Renesas Technology America, Inc., All Rights Reserved
D/A Conversion Time
12
© 2008, Renesas Technology America, Inc., All Rights Reserved
Filtering the D/A Output
 This low-pass filter’s cut-off is about RC = 10 x 103 x 10-7 = 10-3
The cut-off frequency, F = 1/RC = 1kHz
 In most cases, an active filter with better characteristics
(such as a sharper roll-off, enhanced resistance to loading, etc.) is
recommended at the output of the D/A.
13
© 2008, Renesas Technology America, Inc., All Rights Reserved
Maximum Output Frequency
 Nyquist criteria: Must generate output samples at 2x the highest
frequency of the waveform being recreated
(This is the minimum requirement—a higher
sample rate is better.)
 Conversion time = 10µs (100kHz sample rate)
 Therefore, the theoretical maximum output frequency = 50kHz
 Problems/Limitations:
- D/A conversions reduce CPU time available for other processing.
(Typically, for an H8S/2148A, the highest frequency generated by
the D/A will be less than 10kHz.)
- If you sample at twice the frequency, you need a filter with a very
sharp roll off. If you sample at higher rates, you can use simpler,
less-expensive filters.
14
© 2008, Renesas Technology America, Inc., All Rights Reserved
Summary
 Applications for D/A converters
 D/A basics
 Typical D/A performance
16
© 2008, Renesas Technology America, Inc., All Rights Reserved