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

RTC why 32768 crystal?

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



Joined: 18 Apr 2011
Posts: 1

View user's profile Send private message

RTC why 32768 crystal?
PostPosted: Mon Apr 18, 2011 6:05 am     Reply with quote

Why is it that a 32768 crystal seems to be the standard choice for a real time clock even though timer 1 is 16 bit? Why not use a 65536 crystal and have timer 1 overflow every second without having to change the register value as with 32k?
Is the lower frequency more accurate, lower power, or ???

Thanks
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Mon Apr 18, 2011 6:26 am     Reply with quote

You guessed it generally the lower the frequency the lower the power. Now this doesn't mean there is a race to develop a 1 hertz crystal.
temtronic



Joined: 01 Jul 2010
Posts: 9142
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Apr 18, 2011 7:17 am     Reply with quote

Also, the 32kHz 'watch crystal' was made well before the PIC came out ! It was designed for the first 'digital' watches( analog movements 'pulsed' every second).
It is the 'optimum' frequency considering speed,size,power and easily divisable by powers of 2.And of course price...probably BILLIONS of them in the world !
Ttelmah



Joined: 11 Mar 2010
Posts: 19278

View user's profile Send private message

PostPosted: Mon Apr 18, 2011 9:02 am     Reply with quote

For each different crystal 'cut', there is a range of frequencies over which it works best. Then each cut has a temperature tolerances etc.. Now the particular cut used at 32768, has the advantage of small size (try looking at the sizes of some 100K SC cut crystals, and you will see why these are not used in watches!). The 'X' cut commonly used in the watches, has a temperature turnover point that is close to 20C, and the frequency is quite accurate, over a range of perhaps 10C to 30C. This makes it easy to use without an oven, in 'room temperature' applications. For this cut, the 'useable' range, that can easily be made, is about 16KHz, to perhaps 150KHz, with the highest gain and lowest drive requirement, occurring between around 30 and 50KKHz. For a one second divider, the nearest 'binary' count to this, 'best' point, was 32768, so this became the standard. Perhaps however worth commenting, that the very first crystal clock used 50KHz, and some Seiko watches made a few years ago, used a 2MHz AT cut crystal instead, but with a rather high battery consumption....
So, perfectly possible to get a 65K X cut crystal. Cost small - but not as small as the 32768Hz unit. Extra power needed, tiny.
Most clocks though use dividers other than a PIC, so are just happy to divide by 2^15.
On the PIC, for most applications, a 2 second counter is entirely adequate.
If you want though to make a 'clock', with a 1 second 'tick', then use a PIC with the RTCC module. This divides by 16384, and can handle events at intervals from 0.5 seconds up.

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