I'm considering using a PIC18F66K22 for a new project that will require 8 PWM outputs whose duty cycle can be controlled independently. All PWMs will be operating at the same frequency. According to the datasheet, there are 7 CCP and 3 ECCP PWM outputs. The datasheet also lists the timer choices for each output. What I'm not 100% sure of is whether or not the duty cycle of each output can be unique. I don't have a development board for this family of MCUs, but do have the latest CCS compiler. My sample code compiles fine with 8 PWMs. Has anyone used this many PWMs on this family of devices?
Thanks in advance and Happy New Year!
MotoDan
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Fri Dec 30, 2011 5:47 pm
They all have separate Period registers (CCPRx) so you should be able
to have a different duty cycle for each PWM channel.
You may not be able to have a different frequency for each PWM channel.
The Timer selection registers allow many different assignments of Timer
resources to the PWM modules. But I didn't go through the 18F66K22
data sheet in detail, to see if you can have a unique Timer for each PWM channel.
MotoDan
Joined: 30 Dec 2011 Posts: 55
Posted: Fri Dec 30, 2011 5:55 pm
Thanks PCM for the reply. I plan on running all of the PWMs at the same frequency so it should work out OK.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum