pulse widith modulation ee 587 presented by viswanadha kakarlapudi

14
PULSE WIDITH MODULATION PULSE WIDITH MODULATION EE 587 EE 587 Presented by Presented by Viswanadha Kakarlapudi Viswanadha Kakarlapudi

Upload: clark-estes

Post on 01-Jan-2016

9 views

Category:

Documents


0 download

DESCRIPTION

PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi. Overview. Introduction Implementing 16-Bit PWM Using the PCA 16-Bit PWM Using the On-Chip Timer How Servos Work References. Introduction. Signal Information is encoded in the duty cycle - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

PULSE WIDITH MODULATIONPULSE WIDITH MODULATION

EE 587EE 587

Presented byPresented by Viswanadha KakarlapudiViswanadha Kakarlapudi

Page 2: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

OverviewOverview

IntroductionIntroduction

Implementing 16-Bit PWM Using the PCAImplementing 16-Bit PWM Using the PCA

16-Bit PWM Using the On-Chip Timer16-Bit PWM Using the On-Chip Timer

How Servos Work How Servos Work

ReferencesReferences

Page 3: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

IntroductionIntroduction

Signal Information is encoded in the Signal Information is encoded in the duty cycleduty cycle

Input to the PWM implementation is an integer Input to the PWM implementation is an integer proportional to the duty cycle desiredproportional to the duty cycle desired

Page 4: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

Implementing PWM Using PCAImplementing PWM Using PCA Introduction to PCA (Programmable Counter Array)Introduction to PCA (Programmable Counter Array)

Page 5: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

Implementing PWM Using PCAImplementing PWM Using PCA

8-Bit PWM8-Bit PWM

Page 6: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

Implementing PWM Using PCAImplementing PWM Using PCA

8-Bit PWM8-Bit PWM

Duty cycle can be changed by single 8-bit write Duty cycle can be changed by single 8-bit write to PCAOCPHnto PCAOCPHn

Page 7: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

16-Bit PWM Using the PCA16-Bit PWM Using the PCA

Page 8: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

16-Bit PWM Using the PCA16-Bit PWM Using the PCA

Duty cycle can be changed by single 16-bit write Duty cycle can be changed by single 16-bit write to the variable to the variable PWMPWM

Page 9: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

16-Bit PWM Using an On-Chip Timer16-Bit PWM Using an On-Chip Timer

The C8051F2xx family SoC’s feature three on-The C8051F2xx family SoC’s feature three on-board timers that can be used for PWM board timers that can be used for PWM generationgeneration

The C8051F226-TB features a low-pass filter that The C8051F226-TB features a low-pass filter that can be readily used for the PWM DACcan be readily used for the PWM DAC

Page 10: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

16-Bit PWM Using an On-Chip Timer16-Bit PWM Using an On-Chip Timer

Timer is set to the amount of time the PWM wave Timer is set to the amount of time the PWM wave is high during one cycleis high during one cycle

When the timer overflows, the program vectors to When the timer overflows, the program vectors to an ISR to take a port pin high or low to produce an ISR to take a port pin high or low to produce the PWM wavethe PWM wave

The smallest pulse width that can be assigned is The smallest pulse width that can be assigned is 19 clock cycles. The ISR takes 14 cycles to take 19 clock cycles. The ISR takes 14 cycles to take the PWM wave from high to lowthe PWM wave from high to low

Page 11: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

16-Bit PWM Using an On-Chip Timer16-Bit PWM Using an On-Chip Timer

Page 12: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

How Servos WorkHow Servos Work

Servos are commanded through PWM signalsServos are commanded through PWM signals In order for the Servo to hold position, the In order for the Servo to hold position, the

command must be sent every 20mscommand must be sent every 20ms

Page 13: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

How Servos WorkHow Servos Work

Page 14: PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi

ReferencesReferences

www.cygnal.com/appnoteswww.cygnal.com/appnotes

www.brookshiresoftware.comwww.brookshiresoftware.com