CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC18F66K22 - Multiple PWMs

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MotoDan



Joined: 30 Dec 2011
Posts: 55

View user's profile Send private message

PIC18F66K22 - Multiple PWMs
PostPosted: Fri Dec 30, 2011 3:45 pm     Reply with quote

Hello All,

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

View user's profile Send private message

PostPosted: Fri Dec 30, 2011 5:47 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 30, 2011 5:55 pm     Reply with quote

Thanks PCM for the reply. I plan on running all of the PWMs at the same frequency so it should work out OK.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group