View previous topic :: View next topic |
Author |
Message |
cagacug
Joined: 14 Apr 2004 Posts: 5
|
a way to use 4 pwm ch's on 16F684? |
Posted: Sat Dec 17, 2005 6:33 am |
|
|
Hi,
Is there a way to use the 4 ( or more than 1) channels of 16F684 individually? I mean can we use 4 different duty_cycles for each ch?
Has any body deal with it or saw any info about it?
Be well, all. |
|
|
Ttelmah Guest
|
|
Posted: Sat Dec 17, 2005 3:38 pm |
|
|
There are not four PWM channels on the 684.
What it offers, is 'full bridge' mode, and in this, four output pins are available, _but only two can be used at a time_, with just one PWM timer source. There is just one set of PWM timing registers. These modes are supported by CCS. It only has one CCP.
I'm afraid if you want four (or even two) properly seperate PWM times, you need to look at another chip...
Best Wishes |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Mon Dec 19, 2005 10:02 am |
|
|
What kind of duty cycle are you looking for? A timer interrupt could be used to realize 4 PWM outputs. It depends on how critical the timing must be. If you want ms on / off times, then a 16f84 on a 20 mhz crystal and using timer0 interrupt ought to get you some nice PWM outputs.... |
|
|
cagacug
Joined: 14 Apr 2004 Posts: 5
|
|
Posted: Mon Dec 19, 2005 10:44 am |
|
|
Thanks.
I already written software version, but if the hardware ones can be used it will good of course |
|
|
|