View previous topic :: View next topic |
Author |
Message |
Yasinji Guest
|
PWM(Enhanced) on 16F690 using CCS C compiler 4.038 |
Posted: Wed Jul 08, 2009 2:56 am |
|
|
HOw can I use the all the 4 PWM channels to work in independently using enhanced pwm with pulse steering mode so that I can control the four channels with different duty cycle. Kindly provide a solution as soon as possible as I am in a dangerous situation of loosing my Job. I have to use one PWM for battery charging, another for load control, another 2 channels for the current control. Kindly provide a solution. |
|
|
Ttelmah Guest
|
|
Posted: Wed Jul 08, 2009 4:37 am |
|
|
You can't.
Get away from the idea of having 4 PWM channels. MicroChip, is unfortunately slightly less than clear in it's wording about this....
You have _one_ PWM channel, with up to four outputs.
Because there is only one PWM channel, you can develop only _one_ pulse width at a time. You can 'steer' this to the different pins, but while one pin is driven with a particular duty cycle, the others _will_ be idle (left either high, or low).
You need to select a chip that has four independant PWM duty cycle generators.
Best Wishes |
|
|
YASINJI Guest
|
|
Posted: Thu Jul 09, 2009 5:45 am |
|
|
can u kindly suggest a device with four independent duty cycle generators |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Thu Jul 09, 2009 2:53 pm |
|
|
As a further comment, do not use v4.038! This is a very unstable release. Read the sticky v4 thread on top of this forum for more info, but it comes down to CCS having released a lot of alpha versions before the compiler became more or less usable around version 4.065. |
|
|
Guest
|
|
Posted: Fri Jul 10, 2009 4:00 am |
|
|
YASINJI wrote: | can u kindly suggest a device with four independent duty cycle generators |
Can anyone suggest a PIC microcontroller in 16F series in range of 2-3 $
with four independent duty cycle generator Please? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
|
|