Handmade Network»Forums
1 posts
None
Quartz crystal frequency and short int range
Probably the most stupid question:

Quartz crystals oscillate at 32768 times a second.
Short integer ranges from –32,768 to 32,767.

Is there a connection or just a coincidence?
498 posts
Quartz crystal frequency and short int range
Resonance frequency of a crystal depends on the geometry of the crystal as well.

So it's been chosen specifically for the power of 2 property.
Mattie
35 posts
Quartz crystal frequency and short int range
Edited by Mattie on
From Wikipedia:
In modern quartz clocks, the quartz crystal resonator or oscillator is in the shape of a small tuning fork, laser-trimmed or precision lapped to vibrate at 32,768 Hz. This frequency is equal to 2^15 cycles per second. A power of 2 is chosen so a simple chain of digital divide-by-2 stages can derive the 1 Hz signal needed to drive the watch's second hand.