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 CCS Technical Support

PIC16F1937: Select which timer is used for PWM

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



Joined: 25 Aug 2010
Posts: 1

View user's profile Send private message

PIC16F1937: Select which timer is used for PWM
PostPosted: Wed Aug 25, 2010 2:28 am     Reply with quote

On the 16F193x devices, Timer 2, 4 or 6 can be selected for PWM:

22.3.3 TIMER2/4/6 TIMER RESOURCE
The PWM standard mode makes use of one of the 8-bit
Timer2/4/6 timer resources to specify the PWM period.
Configuring the CxTSEL<1:0> bits in the CCPTMRSx
register selects which Timer2/4/6 timer is used.

How can I select those using setup_ccpx?

- Martin
Ttelmah



Joined: 11 Mar 2010
Posts: 19546

View user's profile Send private message

PostPosted: Wed Aug 25, 2010 3:39 am     Reply with quote

Look in the include file for the processor.
Section entitles 'constants used for SETUP_CCPx() are:'

As an example:

SETUP_CCP1(CCP_PWM | CCP_TIMER2);

Best Wishes
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