Professional Documents
Culture Documents
LECTURE 07 (ADC)
Nushara Wedasingha
Mphil(AI) Candidate, Bsc.(Hons) EEE
Department of Electrical and Computer
Engineering
Faculty of Engineering
Sri Lanka Institute of Information Technology
WHAT ARE ANALOG AND
DIGITAL SIGNALS?
Analog Signals Digital Signals
2. Resolution
3. Sampling
4. Quantizing
REFERENCE VOLTAGE
1. Maximum expected for the analog input : - V REF+
VREF- 0v
Special Note:
Analog signals beyond this range should be properly amplified and off-set before they are fed to A2D converter.
RESOLUTION
A measure of the fineness of conversion is called the resolution.
(𝑉 𝑅𝐸𝐹 +−𝑉𝑅 𝐸𝐹 −)
Γ=¿ 𝑛
2
– Resolution
VREF+ - Maximum Voltage
VREF- - Maximum Voltage
n – Bit Length of the ADC Register
SAMPLING
Input Signal
Fs
Γ
QE=±
q0 - 0…000 – 0v – Lowest Analog Value 2
q1 - 0…001
: : : : :::
: : : : ::: Γ − 𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛
qn - 1…111 – 5v or 3.3v – Highest Analog Value
• Interrupt vector register for fast decoding of six ADC interrupts (ADC10IFG0, ADC10TOVIFG, ADC10OVIFG,
ADC10LOIFG, ADC10INIFG, ADC10HIIFG)
ADC INSIDE A MSP430
ADC IN MSP430 FR
REGISTERS
ADC10CTL0
ADC10CTL1
ADC10CTL2
ADC10MEMO
ADCMCTL0
ADCIE
ADCIFG
ADC REGISTERS MSP430
EXAMPLE CODE
Starting ADC:
while(1):
ADC10CTL0|= ADC10SC;
while(ADC10CTL1 & ADCBUSY);
mem = ADC10MEM;
ADC CORE OF
MSP430FR5739
• The conversion formula for the ADC result NADC: