2
Most read
3
Most read
Interfacing Diagram:
Code:
#include<stdio.h>
#include "LPC1768_Includes.h"
void delay(unsigned int time)
{
unsigned int j=0,i=0;
for (j=0;j<time;j++)
for (i=0;i<20000;i++);
}
int main()
{
unsigned int periods=100000,i;
PINSEL3=0x00020000; //PWM1.5
PCONP=1<<6; //PCPWM1 PWM1 power/clock control bit.
PWM1CTCR=0x00000000; // Timer Mode, PCAP1.0,
PWM1PR=0x0000; // Prescale Register. The TC is incremented every PR+1 cycles of PCLK
PWM1MCR=0x00000002; //Reset on PWMMR0: the PWMTC will be reset if PWMMR0 matches it.
PWM1MR0=periods; // Match Register 0.
PWM1PCR=0x00002000; // The PWM5 output enabled.
PWM1TCR=0X00000009; // PWM Timer Counter,PWM Prescale Counter enabled , PWM mode is enabled
while(1)
{
for (i=10;i>0;i--)
{
PWM1MR5=i*periods/10;
PWM1LER=0x00000020; //Enable PWM Match 5 Latch (writing 1)
delay(1000);
}
}
}
Output:

More Related Content

PDF
BUilt-In-Self-Test for VLSI Design
PPTX
GUI for DRV fix in ICC2
PPT
VLSI routing
PDF
Implementing Useful Clock Skew Using Skew Groups
PPTX
Design for testability and automatic test pattern generation
PDF
2019 3 testing and verification of vlsi design_sta
PDF
Physical design-complete
PDF
Design-for-Test (Testing of VLSI Design)
BUilt-In-Self-Test for VLSI Design
GUI for DRV fix in ICC2
VLSI routing
Implementing Useful Clock Skew Using Skew Groups
Design for testability and automatic test pattern generation
2019 3 testing and verification of vlsi design_sta
Physical design-complete
Design-for-Test (Testing of VLSI Design)

What's hot (20)

PDF
Sta by usha_mehta
PDF
14 static timing_analysis_5_clock_domain_crossing
PPT
Level sensitive scan design(LSSD) and Boundry scan(BS)
PDF
Understanding cts log_messages
PDF
Logic synthesis using Verilog HDL
PPTX
Physical Design Flow Challenges at 28nm on Multi-million Gate Blocks
PDF
PDF
Automatic Test Pattern Generation (Testing of VLSI Design)
PPTX
Latch & Flip-Flop Design.pptx
PDF
Design for Testability
PDF
CPU Verification
PDF
13 static timing_analysis_4_set_up_and_hold_time_violation_remedy
PPTX
Introduction to System verilog
PDF
Introduction to VLSI Design
PPTX
Multi mode multi corner (mmmc)
PDF
Earlang ejercicios
PPTX
ASIC Design Flow | Physical Design | VLSI
DOCX
Lambda design rule
PPTX
Dft (design for testability)
PDF
Introduction to FPGA, VHDL
Sta by usha_mehta
14 static timing_analysis_5_clock_domain_crossing
Level sensitive scan design(LSSD) and Boundry scan(BS)
Understanding cts log_messages
Logic synthesis using Verilog HDL
Physical Design Flow Challenges at 28nm on Multi-million Gate Blocks
Automatic Test Pattern Generation (Testing of VLSI Design)
Latch & Flip-Flop Design.pptx
Design for Testability
CPU Verification
13 static timing_analysis_4_set_up_and_hold_time_violation_remedy
Introduction to System verilog
Introduction to VLSI Design
Multi mode multi corner (mmmc)
Earlang ejercicios
ASIC Design Flow | Physical Design | VLSI
Lambda design rule
Dft (design for testability)
Introduction to FPGA, VHDL
Ad

Similar to PWM based motor speed control using LPC 1768 (20)

PDF
Timer 0 programming on LPC 1768
PPTX
Timer counter in arm7(lpc2148)
DOCX
Arm7 Interfacing examples
PDF
Blinking Of LEDs On LPC2148 ARM 7 TDMIS Based Microcontroller
PPT
microcontroller pwm stepper moter prog 2.ppt
PPTX
pic microcontroller unit 5 detailed .pptx
ODP
FPGA Tutorial - LCD Interface
PPTX
Lpc 1768 timers
PDF
ADC (Analog to Digital conversion) using LPC 1768
PPTX
PDF
CAN interfacing on LPC1768 (ARM Cortex M3 based Micro controller)
PPTX
Timers done by Priyanga KR
PPTX
Pll in lpc2148
PDF
Timers and Endge-aligned PWM
PPTX
Introduction to PIC.pptx
DOCX
Solucion de practica1 calificada microcontroladores
PPT
PMA71xx- SmartLEWIS™ MCUs
PPT
lecture 12 counter_microcontroller2.ppt
PPTX
8051 MICROCONTROLLER TIMER AND ITS APPLICATIONS
PDF
Lecture7
Timer 0 programming on LPC 1768
Timer counter in arm7(lpc2148)
Arm7 Interfacing examples
Blinking Of LEDs On LPC2148 ARM 7 TDMIS Based Microcontroller
microcontroller pwm stepper moter prog 2.ppt
pic microcontroller unit 5 detailed .pptx
FPGA Tutorial - LCD Interface
Lpc 1768 timers
ADC (Analog to Digital conversion) using LPC 1768
CAN interfacing on LPC1768 (ARM Cortex M3 based Micro controller)
Timers done by Priyanga KR
Pll in lpc2148
Timers and Endge-aligned PWM
Introduction to PIC.pptx
Solucion de practica1 calificada microcontroladores
PMA71xx- SmartLEWIS™ MCUs
lecture 12 counter_microcontroller2.ppt
8051 MICROCONTROLLER TIMER AND ITS APPLICATIONS
Lecture7
Ad

More from Omkar Rane (20)

PDF
Enabling SSL Elasticsearch on server
PDF
Anti lock braking (ABS) Model based Design in MATLAB-Simulink
PPTX
Autosar fundamental
PPTX
Stress Management
PPTX
Bootloaders (U-Boot)
PPTX
Concept of Diversity & Fading (wireless communication)
PPTX
Tata Motors GDC .LTD Internship
PDF
Machine Learning Model for M.S admissions
PDF
UART interfacing on LPC1768 (Cortex M3 micro controller)
PDF
LED Blinking logic on LPC1768
PPTX
Vlisi Course project presentation:Keypad Scanner
PDF
VlSI course project report : Keypad Scanner
PPTX
LPC 1768 A study on Real Time clock features
PDF
Nexys4ddr rm FPGA board Datasheet
PDF
Linear Regression (Machine Learning)
DOCX
transmission gate based design for 2:1 Multiplexer in micro-wind
DOCX
2:1 Multiplexer using NAND gate in Microwind
PDF
NAND Gate design in microwind
PDF
Verilog full adder in dataflow & gate level modelling style.
PDF
Sequence detector for "111"
Enabling SSL Elasticsearch on server
Anti lock braking (ABS) Model based Design in MATLAB-Simulink
Autosar fundamental
Stress Management
Bootloaders (U-Boot)
Concept of Diversity & Fading (wireless communication)
Tata Motors GDC .LTD Internship
Machine Learning Model for M.S admissions
UART interfacing on LPC1768 (Cortex M3 micro controller)
LED Blinking logic on LPC1768
Vlisi Course project presentation:Keypad Scanner
VlSI course project report : Keypad Scanner
LPC 1768 A study on Real Time clock features
Nexys4ddr rm FPGA board Datasheet
Linear Regression (Machine Learning)
transmission gate based design for 2:1 Multiplexer in micro-wind
2:1 Multiplexer using NAND gate in Microwind
NAND Gate design in microwind
Verilog full adder in dataflow & gate level modelling style.
Sequence detector for "111"

Recently uploaded (20)

PDF
Module 1 part 1.pdf engineering notes s7
PDF
1.-fincantieri-investor-presentation2.pdf
PPTX
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PDF
AI agent, robotics based Smart Construction 2025
PPTX
22ME926Introduction to Business Intelligence and Analytics, Advanced Integrat...
PPT
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
PDF
PhD defense presentation in field of Computer Science
PPTX
L1111-Important Microbial Mechanisms.pptx
PPTX
Cloud Security and Privacy-Module-1.pptx
PPT
Basics Of Pump types, Details, and working principles.
PPTX
quantum theory on the next future in.pptx
PDF
CB Công Nghiệp Slide .dh bách khoa đà nẵng
PDF
V2500 Owner and Operatore Guide for Airbus
PDF
The Journal of Finance - July 1993 - JENSEN - The Modern Industrial Revolutio...
PDF
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
PPTX
Module 1 – Introduction to Computer Networks: Foundations of Data Communicati...
PDF
Project_Mgmt_Institute_- Marc Marc Marc.pdf
PDF
Electrical & Computer Engineering: An International Journal (ECIJ)
PPTX
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
Module 1 part 1.pdf engineering notes s7
1.-fincantieri-investor-presentation2.pdf
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
AI agent, robotics based Smart Construction 2025
22ME926Introduction to Business Intelligence and Analytics, Advanced Integrat...
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
PhD defense presentation in field of Computer Science
L1111-Important Microbial Mechanisms.pptx
Cloud Security and Privacy-Module-1.pptx
Basics Of Pump types, Details, and working principles.
quantum theory on the next future in.pptx
CB Công Nghiệp Slide .dh bách khoa đà nẵng
V2500 Owner and Operatore Guide for Airbus
The Journal of Finance - July 1993 - JENSEN - The Modern Industrial Revolutio...
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
Module 1 – Introduction to Computer Networks: Foundations of Data Communicati...
Project_Mgmt_Institute_- Marc Marc Marc.pdf
Electrical & Computer Engineering: An International Journal (ECIJ)
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx

PWM based motor speed control using LPC 1768

  • 2. Code: #include<stdio.h> #include "LPC1768_Includes.h" void delay(unsigned int time) { unsigned int j=0,i=0; for (j=0;j<time;j++) for (i=0;i<20000;i++); } int main() { unsigned int periods=100000,i; PINSEL3=0x00020000; //PWM1.5 PCONP=1<<6; //PCPWM1 PWM1 power/clock control bit. PWM1CTCR=0x00000000; // Timer Mode, PCAP1.0, PWM1PR=0x0000; // Prescale Register. The TC is incremented every PR+1 cycles of PCLK PWM1MCR=0x00000002; //Reset on PWMMR0: the PWMTC will be reset if PWMMR0 matches it. PWM1MR0=periods; // Match Register 0. PWM1PCR=0x00002000; // The PWM5 output enabled. PWM1TCR=0X00000009; // PWM Timer Counter,PWM Prescale Counter enabled , PWM mode is enabled while(1) { for (i=10;i>0;i--) { PWM1MR5=i*periods/10; PWM1LER=0x00000020; //Enable PWM Match 5 Latch (writing 1)