how to create two PWM with 15 kHz difference

Nishant's picture

Offline

Joined: Sep 12, 2018

Replies: 0
how to create two PWM with 15 kHz difference
July 25, 2019 - 5:52pm

hi i am doing a project where i need two different PWM. The project is with LPC1768 b32 bit arm cortex M3 microcontroller. 

Here i need the PWM frequency in the range of 3500kHz to 4000kHz and the difference should be around 15 kHz such as 3500 and 3515kHz. can you please help me how i can achieve this?

 

jack's picture

Offline

Joined: Sep 21, 2018

Replies: 2
how to create two PWM with 15 kHz difference
July 25, 2019 - 6:08pm

you should have attached the datasheet of LPC1768 also.

okay so i went through the datasheet. here is the link(https://www.nxp.com/docs/en/data-sheet/LPC1769_68_67_66_65_64_63.pdf)
and it is mentioned that LPC1768 has 2 PWM Units where one unit is 6 general purose PWM and second unit is Motor Control PWN.
You can easily program these two PWM to your specifications for your PWM requirement.
Also the datasheet states that The LPC1768/67/66/65/64/63 operate at CPU frequencies of up to 100 MHz. 
So you can generate the PWM frequency mentioned about your project. 
You can use the PWM.c library to configure the PWM fucntions. 
Also i would recommend to read datasheet properly. they mention most of the things.