|
|
View previous topic :: View next topic |
Author |
Message |
Kevin Mayer Guest
|
Timers on the PIC |
Posted: Mon Dec 03, 2001 5:47 pm |
|
|
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
|
Re: Timers on the PIC |
Posted: Mon Dec 03, 2001 10:12 pm |
|
|
:=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 |
Posted: Mon Dec 03, 2001 10:27 pm |
|
|
THANKS :-)
___________________________
This message was ported from CCS's old forum
Original Post ID: 1443 |
|
|
|
|
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
|