PWM maximum frequency
#1
Posted 04 August 2010 - 11:22 AM
#2
Posted 04 August 2010 - 11:28 AM
Please have a look at page 426 for waveform period formulas.I've been through the specs of the processor but can't find the answer to what the maximum frequency of the PWM is.
#3
Posted 04 August 2010 - 11:49 AM
Please have a look at page 426 for waveform period formulas.
Does that mean there is no hardware limitation? Based on my calculations I can easily go above 20Kkz.. is that correct?
Thanks
#4
Posted 04 August 2010 - 12:37 PM
Sure there is hardware limitation, but you can easily have 20 KHz PWM on ~20 MHz uC. Or do you mean 'software' PWM, i.e. toggling pin after some delays?Does that mean there is no hardware limitation? Based on my calculations I can easily go above 20Kkz.. is that correct?
#5
Posted 04 August 2010 - 12:41 PM
#6
Posted 04 August 2010 - 02:04 PM
Very cool project. I've been through the specs of the processor but can't find the answer to what the maximum frequency of the PWM is.
Does anybody know?
In the first Netduino firmware, we've set PWM at 10KHz but we can go much higher than 20KHz (MHz PWM anyone?). In the first update (going into beta within the next two weeks), we'll be adding the ability to set your own clock speed.
Actually, there are _two_ clocks--so if it would be useful we could actually let you set both of those independently! And we can let people do center-aligned vs. left-aligned PWM, etc. The big thing to be careful with is making the object model simple enough for people who have never used PWM...but powerful enough for people that want to have total control.
I'll be starting a thread, probably next week, asking for feedback on what amount of control you'd like to see. If you have feedback in the meantime, please reply here--and then we'll consolidate it all internally.
Welcome to the community!
Chris
#7
Posted 04 August 2010 - 02:11 PM
#8
Posted 04 August 2010 - 02:35 PM
Thanks for the information. In my application I want to be able to modify the pulse width based on an analogue input, and use the netduino as a controller for a mosfet dimmer, with a frequency above 16Khz.
So for me just being able to modify the pulse width from 0 to 100% would do.
So, let me see if this would work for you:
1. Create a PwmClock feature which lets you set the PWM clock frequency
2. You can then use the PWM.SetDutyCycle(...) method to control the pulse width
Does that work for your needs?
This is great feedback...
Chris
#9
Posted 04 August 2010 - 03:08 PM
#10
Posted 27 August 2010 - 09:10 PM
#11
Posted 27 August 2010 - 09:14 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users