Main Site Documentation

Resolution of the PWM outputs of the EMX to control led power?


#1

Hi,

It’s not explicitely described in the EMX documentation, so maybe you can help.

I need to have a fine control of the power delivered by leds. I control the leds using a PWM signal sent to the led drivers. Today I only have 8 bits PWM resolution with the board I currently use. I can grade the PWM between 0 (OFF) and 255 (Full Power)

Can you tell me what is the resolution of the PWM channels of the EMX Module ? Can I have 10bits or 12bits resolution for the PWM gradation ?

Thanks

Stephan.


#2

Take a look at PWM.SetPulse which gives you direct access to the timers in microseconds. This will give you a VERY high level of fine tuning, down to microseconds. http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/f5883c4e-64cc-66c8-b20a-c8fd23533155.htm


#3

Hi Gus,

Thanks for the answer. So, if the cycle is coded in nano seconds, it means that for a 400Hz cycle, which is 2.5ms, I have 2,500,000 steps to code the PWM value, right ?

I have another question : i saw that the PWM outputs are linked. Are they linked only for the frequency, or for both the frequency and the High Time value ? In other words, PWM 0 and 2 are linked. Can i set both pwm with the same period of 2.5 ms, then set High value of PWM 0 to 1ms and High value of PWM 2 to 0.5 ms, to have different output signals ?

Thanks again for sharing your knowledge.

Stephan.


#4

You can set each PWM signal to its own high value.


#5

They must have the same period/frequency.