Download presentation
Presentation is loading. Please wait.
Published bySilvia Robbins Modified over 9 years ago
1
1 ADC – Analog to Digital Converter and PWM Waveform Generation with EZDSP2812 Professor: Chen, Pei-Chung 陳 沛 仲 Student: Thanh-Nhan Nguyen 阮 誠 仁 2008, December, 11 th Presentation:
2
2 1.ADC module introduction 2. PWM waveform generation 3. An example
3
3 ADC – Analog to Digital Converter EZDSP 2812 ADC module consists of a 12-bit ADC. Functions of the ADC module include: 12-bit ADC core with built-in S/H Analog input: 0.0 V to 3.0 V (Voltages above 3.0 V produce full-scale conversion result5s.) Fast conversion rate: 80 ns at 25-MHz ADC clock, 12.5 MSPS 16-channel, MUXed inputs Sixteen result registers (individually addressable) to store conversion values − The digital value of the input analog voltage is derived by: Digital Value = 0 When input <= 0V Digital Value = 4096 * ((Input Analog Voltage- ADCLO)/3) When 0V < input <3V Digital Value = 4095 When input >=3V ADC voltage resolution is: (0V - 3V) / 4096 codes = 3V / 4096 codes ~ 0.000732 volts/code ~ 0.732 mV/code
4
4 Fig 1. ADC pin connections with internal reference
5
5 Fig 2. The procedure to use ADC – Analog to Digital Converter Initialize System Control Initialize GPIO Clear all interrupts and initialize PIE vector table Initialize all the Device Peripherals Specific code for A/D conversion
6
6 Characteristics of the PWMs are as follows: 16-bit registers Wide range of programmable deadband for the PWM output pairs Change of the PWM carrier frequency for PWM frequency wobbling as needed Change of the PWM pulse widths within and after each PWM period as needed External-maskable power and drive-protection interrupts Pulse-pattern-generator circuit, for programmable generation of asymmetric, symmetric, and four-space vector PWM waveforms Minimized CPU overhead using auto-reload of the compare and period registers The PWM pins are driven to a high-impedance state when the PDPINTx pin is driven low and after
7
7 Fig 3. The procedure to generate the PWM waveform EVAEVB
8
8 Fig 4. The procedure to generate the PWM waveform Initialize System Control Initialize GPIO Clear all interrupts and initialize PIE vector table Initialize all the Device Peripherals Specific code for PWM waveform generation
9
9 Analog Voltage 3V AD conversion Input Digital Value For PWM waveform Output Processing… Fig 5. The steps for A/D conversion and PWM waveform generation Get the analog signal from ADCINA0 (P9) A/D conversion Using Digital signal to change the duty cycle of PWM waveform generation Output PWM waveform to P8
10
10 ADCPWM 2812 CPU Var-R 10K R 1K Zener 3V GND +5V ADCLO (P9) PWM1 (P8) DSP power source Fig 6. The connections for ADC and PWM generation Osciloscope Display
11
11 Thank you very much for your listening!
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.