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

rtcc on timer 1 ... is possible ?

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



Joined: 08 Sep 2003
Posts: 21

View user's profile Send private message

rtcc on timer 1 ... is possible ?
PostPosted: Mon Aug 04, 2003 3:39 am     Reply with quote

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

View user's profile Send private message Send e-mail

Re: rtcc on timer 1 ... is possible ?
PostPosted: Mon Aug 04, 2003 8:37 am     Reply with quote

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
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