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

Timers on the PIC

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







Timers on the PIC
PostPosted: Mon Dec 03, 2001 5:47 pm     Reply with quote

Alright - I'm getting the hang of things now - but I'm not 100\% sure about the timer operations.

- Is it correct to say that all the timers (I'm using the PIC16F877) tick once over (4/clock rate) seconds? (if so, why '4'?)

- What is the deal with internal or external clock (eg., T1_INTERNAL, T1_EXTERNAL, T1_EXTERNAL_SYNC) - do the timers not necessarily go off the clock input I have hooked up to the chip?

Cheers :-)
Kevin
___________________________
This message was ported from CCS's old forum
Original Post ID: 1438
ajt



Joined: 07 Sep 2003
Posts: 110

View user's profile Send private message

Re: Timers on the PIC
PostPosted: Mon Dec 03, 2001 10:12 pm     Reply with quote

:=Alright - I'm getting the hang of things now - but I'm not 100\% sure about the timer operations.
:=
:=- Is it correct to say that all the timers (I'm using the PIC16F877) tick once over (4/clock rate) seconds? (if so, why '4'?)

Yes, unless you use a prescaler or postscaler. The reason for 4 is that the processor executes an instruction in one CPU cycle (except jumps which take 2 cycles) and 1 cycle of the CPU takes four oscillator clock ticks. The Timers "clock" on instruction cycles.

:=
:=- What is the deal with internal or external clock (eg., T1_INTERNAL, T1_EXTERNAL, T1_EXTERNAL_SYNC) - do the timers not necessarily go off the clock input I have hooked up to the chip?

Timer0 and Timer1 can be clocked from an external source using a PORTA or PORTC pin, respectively.

:=
:=Cheers <img src="http://www.ccsinfo.com/pix/forum/disagree.gif" border="0">)
:=Kevin
___________________________
This message was ported from CCS's old forum
Original Post ID: 1441
_________________
Al Testani
Kevin Mayer
Guest







Re: Timers on the PIC
PostPosted: Mon Dec 03, 2001 10:27 pm     Reply with quote

THANKS :-)
___________________________
This message was ported from CCS's old forum
Original Post ID: 1443
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