Download Using Open-Source TCP/IP Stacks - Renesas e

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Alternating current wikipedia , lookup

Current source wikipedia , lookup

Control system wikipedia , lookup

Time-to-digital converter wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Oscilloscope types wikipedia , lookup

Television standards conversion wikipedia , lookup

Multimeter wikipedia , lookup

Power electronics wikipedia , lookup

Metadyne wikipedia , lookup

Buck converter wikipedia , lookup

Integrating ADC wikipedia , lookup

Standby power wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Rectiverter wikipedia , lookup

Opto-isolator wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Transcript
ID A14C: Getting Optimal Performance
from your ADC
Renesas Electronics America Inc.
Jim Page
Senior Applications Engineer
12 October 2010
Version: 1.1
Jim Page
 Senior Applications Engineer
 14 years experience with variety of Renesas tools
 R8C/M16C/740 series processor primary support
 Member of Renesas Technical Support Staff for web customer support
 Key support and development role for several successful projects
being used in-field today using broad variety of Renesas and 3rd party
tools
 B.S. EET from Western Carolina University
 Go Catamounts!!
 Expert in USB and other serial technologies
 Co-patent holder/developer of original Renesas Flash-Over-USB
technology
 Expert in I2C, SPI, and other serial protocol interfaces using Renesas
MCUs
Renesas Technology and Solution Portfolio
Microcontrollers
& Microprocessors
#1 Market share
worldwide *
ASIC, ASSP
& Memory
Advanced and
proven technologies
Solutions
for
Innovation
Analog and
Power Devices
#1 Market share
in low-voltage
MOSFET**
* MCU: 31% revenue
basis from Gartner
"Semiconductor
Applications Worldwide
Annual Market Share:
Database" 25
March 2010
** Power MOSFET: 17.1%
on unit basis from
Marketing Eye 2009
(17.1% on unit basis).
Renesas Technology and Solution Portfolio
Microcontrollers
& Microprocessors
#1 Market share
worldwide *
Solutions
for
Innovation
ASIC, ASSP
& Memory
Advanced and
proven technologies
Analog and
Power Devices
#1 Market share
in low-voltage
MOSFET**
* MCU: 31% revenue
basis from Gartner
"Semiconductor
Applications Worldwide
Annual Market Share:
Database" 25
March 2010
** Power MOSFET: 17.1%
on unit basis from
Marketing Eye 2009
(17.1% on unit basis).
4
Microcontroller and Microprocessor Line-up
Superscalar, MMU, Multimedia
High Performance CPU, Low Power
High Performance CPU, FPU, DSC
 Up to 1200 DMIPS, 45, 65 & 90nm process
 Video and audio processing on Linux
 Server, Industrial & Automotive
 Up to 500 DMIPS, 150 & 90nm process
 600uA/MHz, 1.5 uA standby
 Medical, Automotive & Industrial
 Up to 165 DMIPS, 90nm process
 500uA/MHz, 2.5 uA standby
 Ethernet, CAN, USB, Motor Control, TFT Display
 Legacy Cores
 Next-generation migration to RX
General Purpose
 Up to 10 DMIPS, 130nm process
 350 uA/MHz, 1uA standby
 Capacitive touch
5
Ultra Low Power
Embedded Security
 Up to 25 DMIPS, 150nm process  Up to 25 DMIPS, 180, 90nm process
 190 uA/MHz, 0.3uA standby
 1mA/MHz, 100uA standby
 Application-specific integration  Crypto engine, Hardware security
Microcontroller and Microprocessor Line-up
Superscalar, MMU, Multimedia
High Performance CPU, Low Power
High Performance CPU, FPU, DSC
 Up to 1200 DMIPS, 45, 65 & 90nm process
 Video and audio processing on Linux
 Server, Industrial & Automotive
 Up to 500 DMIPS, 150 & 90nm process
 600uA/MHz, 1.5 uA standby
 Medical, Automotive & Industrial
 Up to 165 DMIPS, 90nm process
 500uA/MHz, 2.5 uA standby
 Ethernet, CAN, USB, Motor Control, TFT Display
 Legacy Cores
 Next-generation migration to RX
General Purpose
 Up to 10 DMIPS, 130nm process
 350 uA/MHz, 1uA standby
 Capacitive touch
6
Ultra Low Power
Embedded Security
 Up to 25 DMIPS, 150nm process  Up to 25 DMIPS, 180, 90nm process
 190 uA/MHz, 0.3uA standby
 1mA/MHz, 100uA standby
 Application-specific integration  Crypto engine, Hardware security
Innovations in Analog
7
Innovations in Analog – Voice Recognition
8
Agenda
 Successive Approximation and Delta-Sigma Converters
 Basic Concepts
 Advantages and Disadvantages
 ADC Key Terms and Concepts
 Source resistance limitations
 Discussions of how often to sample
9
Successive Approximation (SAR) ADC
ADC Register
1
0 1 0 11 0 0 1 0 0
Vref
DAC (R2R Ladder)
AVss
AN0
AN1
AN2
AN3
AN4
AN5
AN6
AN7
Comparator
Sample and
Hold Circuit
Input Analog
Mux
10
Advantages and Disadvantages of SAR
 Advantages of Successive Approximation
 Easy to multiplex
 Relatively fast
 R2R ladder does not require precision parts
 Disadvantages of Successive Approximation
 Analog circuitry required
 Not easy to get high resolution
11
Delta Sigma Converter
5V
0V
Vin
4V
∑
+V
∫
H
H
Ref
D
CK
12
Digital
Filter
Advantages and Disadvantages of Delta Sigma
 Advantages of Delta Sigma




Digital circuits set resolution
No sample & hold circuit
Digital filtering controls noise very effectively
Digital filter can be tailored to application
 Disadvantage
 High speed digital circuits required
 Delay in first code (signal is phase delayed)
 Not easy to multiplex
13
Agenda
 Successive Approximation and Delta-Sigma Converters
 Basic Concepts
 Advantages and Disadvantages
 ADC Key Terms and Concepts
14
ADC Specifications - Errors
Full Scale Error
Full Scale
Non-Linearity
Error
Ideal Curve
ADC
Counts
Corrected
Curve
Absolute
Error
Real Curve
0V
Vfull Scale
Offset Error
15
Input Voltage
10 bit ADC facts
 Resolution is 1 part in 1024
 Can resolve 0C to 250C (480F) within ¼ degree C
 Inherent Accuracy is 0.1%
 If Vref = 5V each step is equal to 4.88 mV (5V/1024)
 If Vref is decreased to 2.5V each step is 2.44 mV
 ± 3 LSB error means 3 counts of the reading may be off
 For example: Voltage in should result in count of 100
– Real count could be from 97 to 103
 Does not mean that the A/D is a 7 bit A/D converter
16
What is the ADC reading for the circuit below?
+Vref
1. Depends on Vref
2. Depends on Vcc
3. Need to know resistor
values
4. 512
5. Ask the HW engineer
Vcc
Vref
R1
R2
R1=R2
17
+V
MCU
10 bit AD
Input
Ratiometric and Non-Ratiometric conversions
+V
+V
+Vref
Vcc
Vref
+Vref
Vcc
Vref
Vcc
Vref
Vcc
Vref
MCU
MCU
MCU
MCU
AD Input
AD Input
AD Input
AD Input
a) ratiometric
18
+V
+V
b) ratiometric
c) non-ratiometric
d) non-ratiometric
Advantage of Ratiometric conversions
Since Vref is the voltage driving the resistor divider
1) Vm = Vref * (Rk/(Rx+Rk))
+V
Rx
Vcc
Substituting Equation 1 into Equation 2
Vref
ADC reading/max counts = Rk/(Rx+Rk)
MCU
Vm
AD Input
Rk
a) ratiometric
19
2) ADC reading = Vm/Vref * max ADC counts
*** Notice there are no voltages left in the relationship
Sensing Error Considerations
Vcc
 Ratiometric Errors
Vref
 ADC error
Vm
MCU
AD In
 Divider errors
Vcc
 Sensor error
 Non-Ratiometric errors
 Ratiometric errors plus Vref errors
 Tolerance error can be calibrated out
 Drift components typically cannot be calibrated out
20
Vref
MCU
AD In
Agenda
 Successive Approximation and Delta-Sigma Converters
 Basic Concepts
 Advantages and Disadvantages
 ADC Key Terms and Concepts
 Source resistance limitations
21
Source Resistance Errors
From M16C/62P Manual
If you solve this you will see the source resistance can be approximately 13.9K
22
Source Resistance Errors
Vref
10k
Rs
ADC Input Ckt Equivalent
Req
10k
To AD
Converter
Block
S1
Ceq
For M16C/62P
Req = 7.8k
Ceq = 1.5 pF
S1 closed for 3 fAD cycles
RC time constant of source resistance and sampling cap can
cause error
23
Source Resistance Limitation (An intuitive approach)
 Since we want the error much less than
1/1024 (0.1%) let’s allow 10 time
constants (0.005%)
 Sampling occurs for 300 nSec
 (3 cycles of 10 MHz AD clock)
 10 time constants = 300 nSec 1 TC = 30 nSec

C = 1.5 pF so Rtotal (Rs + Req) must be 20Kohm or less
 (300 nSec/1.5 pF)
 Rsource can not be greater than 12.2 K ohms
 Equivalent resistance of the AD circuit is 7.8K
 (Strict analysis indicated 13.8 kOhm)
24
Source Resistance Errors
What can we do?
1.
2.
Vref
Decrease Rs
Increase sampling time
(decrease fAD)
3.
Q=C*E
40k
To AD
Converter
Block
Rs
If Ctotal changes by <1/1000 then E
will change by <1/1000
Req
30k
S1
C1
Ceq
Ceq = 1.5 pF so make C1 1500 pf
For M16C/62P
Req = 7.8k
Ceq = 1.5 pF
S1 closed for 3 fAD cycles
25
Effect of Adding Capacitor to Input Pin
Adding capacitor creates a low pass filter
fc
To AD Converter
Block
Rs
Req
C1
Gain
Freq
fc = 1/2πRC
20k Rs and .0015 uF = 5.3 kHz corner
26
S1
Ceq
Agenda
 Successive Approximation and Delta-Sigma Converters
 Basic Concepts
 Advantages and Disadvantages
 ADC Key Terms and Concepts
 Source resistance limitations
 Sampling Rate Considerations
27
How often should I sample if:
I am just providing a data reading (not closed loop control)?
 Example: you are measuring outside air temperature to
display on a gauge
 How often should you monitor
 What is the update rate on the display ?
 Oversample and filter at least 8:1
 Consider taking 10 samples, throw out high and low and
average rest
 Evenly spaced measurements tend to minimize noise affects
28
How often should I sample if:
I am using the value in a control loop
 Example: you are controlling a fan with an integrated BLDC
controller
 How fast can the fan respond to a change in input
 If speed response time to a prompt step is 100 mSec
 No need to close loop every mSec
 Probably want to consider sampling many times near the
update time
Command
Change
Response Time
Fan Speed
Time
29
Approximating an Integral (Riemann Sum)
100V
X
99V
X 70V
54V
X
X 28V
x
99
70
54
28
(54 +70 +28 +99 + 0)/5= 50.2
30
0V
When should I remember Nyquist
 When you want to impress your friends
 Filtering algorithms (FIR, IIR)
 Transforms involved (Fourier and many Codecs)
31
Summary of Topics Discussed
Block diagrams of Successive Approximation and DeltaSigma Converters
 Major Characteristics
 Advantages/Disadvantages
Key Terms and Concepts
 Resolution
 Accuracy
 Ratiometric/Non-Ratiometric
Source resistance limitations
 “Calculating Maximum Source Resistance”
 Alternatives for source resistance limitations
 Discussions of how often to sample
32
Questions?
33
Thank You!
34
Renesas Electronics America Inc.