Specifically, because while that part has two CCP units, one of those must be used to measure the cycle time. So only one is available for use as a PWM.
Tue Nov 17 2009, 23:52:33
(no subject)(by Evan Raftery)
Does the one CCP unit measure the frequency or the duty time?
Is it possible for two frequencies out at a standard 50% duty cycle?
Wed Nov 18 2009, 04:28:03
(no subject)(by Jonathan Westhues)
A CCP unit (or its equivalent on the AVR) is basically a register with a count value, and hardware to compare that count value against some timer. It takes an action when that comparison is true--either to set or clear a pin (for a PWM), or just to set a flag in software (to measure the cycle time).
It's not possible to do two frequencies, even if both are 50% duty cycle. What is programmed into a PWM controller is not the duty cycle and frequency, but the divisor (from some faster clock to the output clock), and the on- or off-time, in units of periods of the faster clock.
LDmicro handles the conversion from duty cycle and frequency to those values automatically, and warns if the requested frequency is not achievable within a few percent.
Thu Nov 19 2009, 08:50:16
(no subject)(by Ilie)
You can make all pin PWM with 2 Timer and 1 output digital but you not have high frequency.
Ce ai nevoie?
Thu Nov 19 2009, 14:34:49, download attachment PWM to Timer.ld