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

1 hz clock

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



Joined: 27 Nov 2004
Posts: 1

View user's profile Send private message

1 hz clock
PostPosted: Sat Nov 27, 2004 7:52 am     Reply with quote

How can i obtain a 1 hz clock with a 16f628, only using timer and interrupt? I can't use delay because this clock is to synchronise others operations.
Thanks
Max
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Sat Nov 27, 2004 11:31 am     Reply with quote

And you would be driving the PIC with what?
How accurate?
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Sat Nov 27, 2004 4:10 pm     Reply with quote

Configure Timer1 as a counter, with a 32.768KHz crystal. This way you can create 1Hz interrupts.
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Sat Nov 27, 2004 4:14 pm     Reply with quote

Configure a 100uSec timer, divide by 10 to obtain 1ms, by 100 and get 100mS and by 10 again to obtain 1S.

You can have many timings.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sun Nov 28, 2004 9:31 am     Reply with quote

Search this forum for "Real Time Clock" or 'RTC' and you will find many examples.
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