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 CCS Technical Support

Can a watch crystal be used with a 16F690 for an RTC ??

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



Joined: 08 Sep 2003
Posts: 492
Location: India

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

Can a watch crystal be used with a 16F690 for an RTC ??
PostPosted: Fri Oct 30, 2009 3:39 am     Reply with quote

Hi,

How can I connect a 32.768 Khz crystal to a 16F690 mcu.

I need to use this crystal as a RTC and generate an interrupt. The mcu would work on the internal oscillator at 8 Mhz.

Is this possible with 16F690 ??? I used to do this with a 16F628 and a 16F648A mcu, the PICs derived the RTC timing interrupt from the watch crystal but run on internal oscillator mode.

Please help...

thanks
a
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Oct 30, 2009 6:28 am     Reply with quote

Microchip has an application note about it. http://ww1.microchip.com/downloads/en/AppNotes/91097A.pdf
Ttelmah
Guest







PostPosted: Fri Oct 30, 2009 6:32 am     Reply with quote

Yes, but you don't connect the watch crystal to the master oscillator pins.
Connect it to T1CKI and T1G pins.
Then setup Timer1, with T1_EXTERNAL | T1_CLK_OUT, which enables the oscillator between these pins. Obviously add the required capacitors, to get the frequency right.
Timer1 then counts using the external crystal, and you can run the CPU itself off any other clock you want. INTRC_IO, with a clock setting of 8MHz, gves you operation off the internal 8MHz RC clock.

Best Wishes
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Oct 30, 2009 10:19 am     Reply with quote

Quote:
Yes, but you don't connect the watch crystal to the master oscillator pins.
Connect it to T1CKI and T1G pins.
They are the same with 16F690.
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

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

RE:
PostPosted: Sat Oct 31, 2009 3:15 am     Reply with quote

Thank you for the help..it was the most informative

a
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