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

Dallas Real Time Clock interrupt question

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







Dallas Real Time Clock interrupt question
PostPosted: Wed Aug 04, 2004 8:41 am     Reply with quote

I believe I turned on the SQW with the binary 10010011 / 0x93. Someone in a previous post said I could wake up every second using this OUT/SQW, but it seems it is will waking up many times a second since its a SQW at 32hz.

Wonder if I should do something like an pic internal timer and just sleep and just wake up once a minute.


Here is the datasheet page 9 http://pdfserv.maxim-ic.com/en/ds/DS1307.pdf

Nick
ckielstra



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

View user's profile Send private message

PostPosted: Wed Aug 04, 2004 8:54 am     Reply with quote

For a 1 Hz signal you must set bit0 and bit1 both to zero, with both bits set to 1 you will get a 32kHz signal. Change to binary 10010000 / 0x90.
Nick
Guest







PostPosted: Wed Aug 04, 2004 9:04 am     Reply with quote

Yep

Here is a link that also helps

http://www.ccsinfo.com/forum/viewtopic.php?t=1700&highlight=1307+interrupt



I as you can tell I'm new to pics. Here is a dumb question. Can I tell the pic to sleep for 50 seconds then wake up? I see that I can get it to sleep and wake up on an interupt RB0 attached to the RTC, but that is still way more awake time than I need.

Nick
Mark



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

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

PostPosted: Wed Aug 04, 2004 10:40 am     Reply with quote

Drive timer0 and wake up on overflow. You can preload the timer value to set the number of seconds.
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