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

how to use timer2

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



Joined: 04 Jul 2008
Posts: 12
Location: Karachi Pakistan

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

how to use timer2
PostPosted: Mon Nov 17, 2008 1:48 am     Reply with quote

hi everyone

I m using Timer2 with PWM for IR transmitter

the format we use is like.
Code:

{
setup_timer_2(mode,period,postscale);
set_pwm2_duty(value);
}


In MODE we use divide by 1 or 4 or 16 what difference does it make.

Now there are two things to select frequency & duty cycle
1.n IR we generally use 38KHZ & 50% duty cycle
2. it is necessary to put 50% duty cycle while transmitting.

What is post scale value range 0 to 16 , what happenes on every digit select.

THANKS.
sanddune008



Joined: 23 Oct 2008
Posts: 38

View user's profile Send private message

PostPosted: Mon Nov 17, 2008 1:56 am     Reply with quote

There is a very good explanation on timers in code library......

following is the link
http://www.ccsinfo.com/forum/viewtopic.php?t=22467

Best regards,
Sanny
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