In my project I use two crystal quartz.
The first is a 4 MHZ quartz connected to OSC1 and OSC2 and is used as pic clock.
The second quartz is a 32 KHZ quartz connected to RC0/T1OSO/T1CKL and RC1/T1OSI/CCP2 and is used to maintain the date/time as number of seconds since a start date (as PC bios).
I saw some CCS examples where to count the seconds number is used the rtcc interrupt.
The set_rtcc() is the same of set_timer0() and in these examples the rtcc is connected to timer0.
Is possible to use the rtcc interrupt on timer1() ?
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516642
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
Re: rtcc on timer 1 ... is possible ?
Posted: Mon Aug 04, 2003 8:37 am
No, the rtcc int is for timer0 the timer1 int is for timer1. To answer your question, yes you can use timer1 with an external clock to count your seconds. I would use one of the CCP ints (compare mode with special event trigger). This allows the CCP value to be a 16 bit period for timer1. It also allows you some adjustablity if you find you time to be slightly off.
:=In my project I use two crystal quartz.
:=The first is a 4 MHZ quartz connected to OSC1 and OSC2 and is used as pic clock.
:=The second quartz is a 32 KHZ quartz connected to RC0/T1OSO/T1CKL and RC1/T1OSI/CCP2 and is used to maintain the date/time as number of seconds since a start date (as PC bios).
:=I saw some CCS examples where to count the seconds number is used the rtcc interrupt.
:=The set_rtcc() is the same of set_timer0() and in these examples the rtcc is connected to timer0.
:=Is possible to use the rtcc interrupt on timer1() ?
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516653
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