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

Compare mode for timer0?

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



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

Compare mode for timer0?
PostPosted: Thu Aug 11, 2011 5:56 am     Reply with quote

How can I set a number for comparing with timer0???
setup_ccp1(CCP_COMPARE_RESET_TIMER); - this should set ccp1 to compare mode and when the numbers match to reset the timer.
setup_timer_0 (RTCC_DIV_8|RTCC_8_BIT); - this should set timer 0 to work with the oscillator divided by 8 and in 8 bit mode.

I suppose after that the timer should start counting, but how to set a value to cpp1 for comparison???
Can you give me a example???
Thanks!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 11, 2011 1:03 pm     Reply with quote

What PIC are you using ? All the PICs I know of, use Timer1 with the
CCP, not Timer0.

Also post your CCS compiler version.
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