SlideShare a Scribd company logo
1 of 9
PWM in ARM LPC2148
Mrs. D.M.Biradar
Introduction
• Pulse Width Modulation (PWM) is a technique by which width of a
pulse is varied while keeping the frequency constant.
• A period of a pulse consists of an ON cycle (HIGH) and an OFF cycle
(LOW). The fraction for which the signal is ON over a period is
known as duty cycle.
Duty Cycle (In %) = x 100
• E.g. Consider a pulse with a period of 10ms which remains ON
(high) for 2ms.
• The duty cycle of this pulse will be
D = (2ms / 10ms) x 100 = 20%
• Through PWM technique, we can control the power delivered to
the load by using ON-OFF signal.
PWMIR (PWM Interrupt Register)
PWM Registers configuration for
LPC2148
• PWMIR (PWM Interrupt Register)
• It is a 16-bit register.
• It has 7 interrupt bits corresponding to the 7
PWM match registers.
• If an interrupt is generated, then the
corresponding bit in this register becomes HIGH.
• Otherwise the bit will be LOW.
• Writing a 1 to a bit in this register clears that
interrupt.
• Writing a 0 has no effect.
PWMTCR (PWM Timer Control
Register)
PWMTCR (PWM Timer Control
Register)
• It is an 8-bit register.
• It is used to control the operation of the PWM Timer Counter.
• Bit 0 – Counter Enable
When 1, PWM Timer Counter and Prescale Counter are enabled.
When 0, the counters are disabled.
• Bit 1 – Counter Reset
When 1, the PWM Timer Counter and PWM Prescale Counter are
synchronously reset on next positive edge of PCLK.
Counter remains reset until this bit is returned to 0.
• Bit 3 – PWM Enable
This bit always needs to be 1 for PWM operation. Otherwise PWM will
operate as a normal timer.
When 1, PWM mode is enabled and the shadow registers operate along
with match registers.
A write to a match register will have no effect as long as corresponding bit
in PWMLER is not set.
PWMPCR (PWM Control Register)
• Bit 2 – PWMSEL2
0 = Single edge controlled mode for PWM2
1 = Double edge controlled mode for PWM2
• All other PWMSEL bits have similar operation
as PWMSEL2 above.
• Bit 10 – PWMENA2
0 = PWM2 output disabled
1 = PWM2 output enabled
• All other PWMENA bits have similar operation
as PWMENA2 above.

More Related Content

Similar to PWM in ARM LPC2148.pptx

EC8691 - UNIT 5.pdf
EC8691 - UNIT 5.pdfEC8691 - UNIT 5.pdf
EC8691 - UNIT 5.pdfSPonmalar1
 
Presentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptxPresentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptxAniruddh70
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Aarav Soni
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.pptpouyan6
 
PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC, or Programmable Logic Controller, is a specialized industrial computer u...PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC, or Programmable Logic Controller, is a specialized industrial computer u...Govindarajv11
 
PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)navalip331
 
PROGRAMMABLE LOGIC CONTROLLERS
PROGRAMMABLELOGIC CONTROLLERSPROGRAMMABLELOGIC CONTROLLERS
PROGRAMMABLE LOGIC CONTROLLERSDnr Creatives
 
UNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxUNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxGowrishankar C
 
DIGITAL HEART BEAT COUNTER
DIGITAL HEART BEAT COUNTERDIGITAL HEART BEAT COUNTER
DIGITAL HEART BEAT COUNTERDeevanshu Swani
 

Similar to PWM in ARM LPC2148.pptx (20)

EC8691 - UNIT 5.pdf
EC8691 - UNIT 5.pdfEC8691 - UNIT 5.pdf
EC8691 - UNIT 5.pdf
 
Presentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptxPresentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptx
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
plc1.ppt
plc1.pptplc1.ppt
plc1.ppt
 
PLC Basics
PLC BasicsPLC Basics
PLC Basics
 
Introduction to PIC.pptx
Introduction to PIC.pptxIntroduction to PIC.pptx
Introduction to PIC.pptx
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
PLC.ppt
PLC.pptPLC.ppt
PLC.ppt
 
PLC good.ppt
PLC good.pptPLC good.ppt
PLC good.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC, or Programmable Logic Controller, is a specialized industrial computer u...PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC, or Programmable Logic Controller, is a specialized industrial computer u...
 
PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)
 
UNIT 5.pptx
UNIT 5.pptxUNIT 5.pptx
UNIT 5.pptx
 
PROGRAMMABLE LOGIC CONTROLLERS
PROGRAMMABLELOGIC CONTROLLERSPROGRAMMABLELOGIC CONTROLLERS
PROGRAMMABLE LOGIC CONTROLLERS
 
UNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxUNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptx
 
DIGITAL HEART BEAT COUNTER
DIGITAL HEART BEAT COUNTERDIGITAL HEART BEAT COUNTER
DIGITAL HEART BEAT COUNTER
 

Recently uploaded

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 

Recently uploaded (20)

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 

PWM in ARM LPC2148.pptx

  • 1. PWM in ARM LPC2148 Mrs. D.M.Biradar
  • 2. Introduction • Pulse Width Modulation (PWM) is a technique by which width of a pulse is varied while keeping the frequency constant. • A period of a pulse consists of an ON cycle (HIGH) and an OFF cycle (LOW). The fraction for which the signal is ON over a period is known as duty cycle. Duty Cycle (In %) = x 100 • E.g. Consider a pulse with a period of 10ms which remains ON (high) for 2ms. • The duty cycle of this pulse will be D = (2ms / 10ms) x 100 = 20% • Through PWM technique, we can control the power delivered to the load by using ON-OFF signal.
  • 3.
  • 5. PWM Registers configuration for LPC2148 • PWMIR (PWM Interrupt Register) • It is a 16-bit register. • It has 7 interrupt bits corresponding to the 7 PWM match registers. • If an interrupt is generated, then the corresponding bit in this register becomes HIGH. • Otherwise the bit will be LOW. • Writing a 1 to a bit in this register clears that interrupt. • Writing a 0 has no effect.
  • 6. PWMTCR (PWM Timer Control Register)
  • 7. PWMTCR (PWM Timer Control Register) • It is an 8-bit register. • It is used to control the operation of the PWM Timer Counter. • Bit 0 – Counter Enable When 1, PWM Timer Counter and Prescale Counter are enabled. When 0, the counters are disabled. • Bit 1 – Counter Reset When 1, the PWM Timer Counter and PWM Prescale Counter are synchronously reset on next positive edge of PCLK. Counter remains reset until this bit is returned to 0. • Bit 3 – PWM Enable This bit always needs to be 1 for PWM operation. Otherwise PWM will operate as a normal timer. When 1, PWM mode is enabled and the shadow registers operate along with match registers. A write to a match register will have no effect as long as corresponding bit in PWMLER is not set.
  • 9. • Bit 2 – PWMSEL2 0 = Single edge controlled mode for PWM2 1 = Double edge controlled mode for PWM2 • All other PWMSEL bits have similar operation as PWMSEL2 above. • Bit 10 – PWMENA2 0 = PWM2 output disabled 1 = PWM2 output enabled • All other PWMENA bits have similar operation as PWMENA2 above.