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

18f452: PWM Channels & Timers

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



Joined: 19 May 2012
Posts: 26
Location: Pakistan

View user's profile Send private message

18f452: PWM Channels & Timers
PostPosted: Sat May 19, 2012 2:17 am     Reply with quote

I am new to Embedded Systems and need help regarding PWM & Timers.

18f452 has two CCP channels that can be used as 10 bit PWM Channels.

Can a single timer be used to operate both Channels.

I want to generate two PWM outputs which takes inputs from two POTs using ADC Channels.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Sat May 19, 2012 3:07 am     Reply with quote

In CCS you have to read ALL three of:-

(1) PIC data sheet.
(2) CCS manual.
(3) CCS .h file for chosen PIC.

From '452 data sheet, Timer2 controls the period for both PWM channels.

I.e. they run at the same frequency.

Mike
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