Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Create two PWM pulses with 10kHz difference

Status
Not open for further replies.

jalil92

New Member
Hello
I want to produce two PWM pulses with lpc1768 module. The frequency of PWM should be in the range of 3000kHz to 3500kHz and the difference of frequencies should be 10 kHz (for example 3100kHz and 3110kHz). How do I do this?
Please help me.
Thank you
 
3000khz = 3mhz I don't think it can do 3mhz.
119411

Maybe the clock to the PWM is 3mhz, resulting in a 11.7khz pwm frequency. There is a counter. Lets say it is a 8 bit counter. If the clock was 3mhz then it will roll over at 11.7khz. The PWM frequency is 11.7khz not 3mhz. The 3mhz is hidden inside and does not come out. The 3mhz sets the smallest step size when you change the duty cycle.
LPC1768 has one PWM channel with six ports. You can have 6 output with different duty cycles. But the PWM frequency will be the same for all output. Because there is only one counter.
 
This should help. LPC PWM
119415

The picture had animation when I attached it but it must have broken. See the link above.

If each PWM has its separate TC and separate MR0 then you can have two different frequencies.
Most PWMs have one TC and one MR0 so all PWM will run at the same frequency.
I do not have time to read up on the lpc1768 PWM module.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top