Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - from romania

(you are viewing a thread; or go back to list of threads)

from romania (by dascalu gheorghe)
i want to use 2 pwm out (pic16f887)
Tue Nov 17 2009, 07:31:06
(no subject) (by Joao Pereira)
It is not possible whith Ldmicro.
Tue Nov 17 2009, 17:07:15
(no subject) (by Jonathan Westhues)
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
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):