hey there :
I'm using PIC16F877A.
I've read a lot about dealing with timer but I didn't get how am I supposed to code the ISR to make the PIC count one second.
My problem is with the prescaler thing and its calculations.
help please
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
Posted: Tue Mar 24, 2015 4:10 pm
the prescaler on timer 0,1,3 counts Fosc/4,
further divided by the prescaler divisor.
the timer in question sets it's interrupt flag on overflow -
and that is what calls your ISR.
What is your take away from reading the manual on the topic
setup_timer_x()
???
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Tue Mar 24, 2015 10:05 pm
This CCS example file use Timer0 (also called rtcc) to count seconds:
Quote:
c:\program files\picc\examples\ex_stwt.c
balboa
Joined: 24 Mar 2015 Posts: 8 Location: Syria
thank you for help
Posted: Fri Mar 27, 2015 1:18 pm
PCM programmer wrote:
This CCS example file use Timer0 (also called rtcc) to count seconds:
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