Crystal Frequencies like 32768 Hz?? - Page 1
Forum section: electronics / general

author: GlennSprigg
author_rank: Super Contributor
timestamp: July 26, 2021, 12:24:59 pm
content: Why these 'strange' numbers for clock frequencies etc. ??I'msuremost people here understand, but forthosethat don't, as it's not always explained!.....Computers/Digital systems (& hardware) are 'attuned' to Binary/Hexadecimal representations of numbers. Like 8-Bytes, or 16-Bit Words.However, we generalize typical computing numbers in multiples of like 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 etc, that are 'rounded' approximations.So in reality, 4K in decimal is 'really' 4096, and 64K is really 65,535 in Decimal. They just get 'rounded off' to those above mentioned multiples.This further adds confusion to some people, when we are relating such numbers in 'Hexadecimal', that computers/programmers love!Most typical memory banks/blocks are depicted on/in Hexadecimal boundaries, which most should know starts their designation with a '$' sign,and when working in 'Hex', it becomes relatively simple to see the whole picture!! So in the above context, we see/use numbers like '$8000' (hex),and '$C000' (hex). They are nicely rounded, (though accurately depicted now!), in a format that computers/digital-hardware fully understand...And decimal32768 = $8000 hex.And decimal49152 = $C000 hex!! So a Clock Frequency of '32768' is perfect for digital electronics/computersto work with, while calculating/cascading through numbers!!I used to love playing/coding stuff with the old Commodore-64, and writing BootLoaders using the 'SYS' command, like 'SYS 32768' to execute somecode that was loaded into the '$8000' region of memory, etc... Was all good fun!!!

author: retiredfeline
author_rank: Frequent Contributor
timestamp: July 26, 2021, 12:33:24 pm
content: Used for clock and wristwatch timing because a power of two so a chain of binary dividers is used. Here are the explanations for the various frequencies on the market:https://en.wikipedia.org/wiki/Crystal_oscillator_frequenciesEasy division to a desired frequency is usually the reason, not because the number "looks nice".

author: GlennSprigg
author_rank: Super Contributor
timestamp: July 26, 2021, 12:57:38 pm
content: Quote from: retiredfeline on July 26, 2021, 12:33:24 pmSorry mate... You misunderstood my 'simplistic' description, for those that may not have understood, that the 'End-Result' was NOTto "look nice", but how hexadecimal equivalents, though "looking pretty", are the basis behind the possibly strange decimal numbers...

author: retiredfeline
author_rank: Frequent Contributor
timestamp: July 26, 2021, 01:18:52 pm
content: And those numbers are round numbers in hex precisely because of binary multiples.

author: brucehoult
author_rank: Super Contributor
timestamp: July 26, 2021, 01:24:49 pm
content: Quote from: retiredfeline on July 26, 2021, 12:33:24 pm32768 is fine if you want seconds, but not so much if you want 10th or 100ths for a stopwatch function.It's scarcely any more difficult to divide a clock by any integer, either in software or with a chain of binary dividers with a "reset" function and an AND gate. Even rational numbers aren't hard, using an analog of Bresenham's algorithm.

author: GlennSprigg
author_rank: Super Contributor
timestamp: July 26, 2021, 01:27:41 pm
content: Quote from: retiredfeline on July 26, 2021, 12:33:24 pmI've just looked up YOU, and all your posts/comments....95% of it is not about contributing anything here... just 'knocking' and 'putdowns'??MY intention here, and with most of my posts, is just to be friendly & informative, and start normal conversations, in a worldwhere I am limited in many ways now, but love to converse with certain people, while I still can...Maybe YOU gain something else here...

author: GlennSprigg
author_rank: Super Contributor
timestamp: July 26, 2021, 01:31:33 pm
content: Quote from: brucehoult on July 26, 2021, 01:24:49 pmThank you Bruce, you are right. I was only trying to explain why/what those numbers mean.

author: retiredfeline
author_rank: Frequent Contributor
timestamp: July 26, 2021, 01:34:31 pm
content: Quote from: brucehoult on July 26, 2021, 01:24:49 pmAh but this is historical. The original quartz watches didn't have the luxury of software/firmware/arbitrary dividers. They had to minimise the use of silicon to conserve battery. Of course low power isn't a problem now, but the 32768 frequency has stuck.

author: retiredfeline
author_rank: Frequent Contributor
timestamp: July 26, 2021, 01:38:22 pm
content: Quote from: GlennSprigg on July 26, 2021, 01:27:41 pmI'm just explaining how those numbers came about. It all comes down to the binary basis of digital circuitry. Good for you if you have discovered something of interest to you.

author: TimFox
author_rank: Super Contributor
timestamp: July 26, 2021, 01:38:31 pm
content: A book from the 1970s with a title like "Devil's DP Dictionary" included a set of mnemonics for the extra digits needed for hexadecimal notation, based on demon's names:Asmodeus, Beelzebub, etc., but I have forgotten them.(The book also posed the question "Is a CDC 7600 four times better than an ICL 1900?")

author: retiredfeline
author_rank: Frequent Contributor
timestamp: July 26, 2021, 01:49:35 pm
content: A piece of trivia: The values for 10 to 15 weren't always or everywhere assigned A to F. An old mainframe I'm thinking of writing an online emulator for, the SILLIAC, which was a descendant of the ILLIAC, used the letters K S N J F L, which gives me a headache trying to map out the instruction set from the manuals. Other symbols have been used in the past:https://en.wikipedia.org/wiki/Hexadecimal#Other_symbols_for_10-15

author: Renate
author_rank: Super Contributor
timestamp: July 26, 2021, 01:49:56 pm
content: Well, nothing really gets rounded off.It's just that 2^10 ~= 10^3 so we get the sloppiness of what "k" means.Sometimes people explicitly call it out as being 1000 or 1024.In old days division of frequency by large numbers was difficult.If you are using a cheesy free-running oscillator that kind of syncs to a higher frequency then it's easy to get off on the wrong divider.A divide by 100 oscillator could easily lock to divide by 101 or 99.A divide by 2 locked oscillator is pretty bomb-proof.If you look at old TV clock circuits all the division was done by small numbers.In B&W NTSC the biggest single divisor was 7.When they went to color the biggest single divisor was 13.(The clock circuits were only used in the station's sync generator.Your old TV had actually no understanding of interlace, it just did it.Modern TVs are digital and count all that stuff.)But what is "natural" or clean is just dependent on number base.1/5 is 0.2 in decimal but 0.33333333.... in hexadecimal

author: TimFox
author_rank: Super Contributor
timestamp: July 26, 2021, 03:36:42 pm
content: There are many OCXO modules available on eBay that apparently were recycled from various boards. Most have "normal" frequencies (e.g., 10.0000 MHz), but some have "strange" frequencies and may be cheaper than the normal ones.However, since these odd frequencies are often special order, the part numbers may not be available on the manufacturer's website, and the eBay vendor may not have accurate listings of the power voltage or output (sine/square) type.Recently, I was looking for such devices, where I had a reasonable range of usable frequency for two applications, and ordered two different frequencies. Both units worked properly, and the label frequencies are accurate, but I had to experiment with Vcc and determine the output waveform myself.Just now, I looked up the two frequencies on the list linked by retiredfeline, but could only find one of them:63.8976 MHz was not listed. 77.7600 MHz (apparently doubled from 38.8800 MHz internally) was listed as a SONET clock frequency.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 26, 2021, 05:01:06 pm
content: Dividing and multiplying by powers of two is much cheaper than by other factors on a hardware level. That's the main reason why.

author: TimFox
author_rank: Super Contributor
timestamp: July 26, 2021, 05:42:29 pm
content: With respect to the difference between dividing by 2Nwith simple hardware,vs.using an arbitrary integer in a processor-based solution:One of my professors, visiting from Germany, gave a lecture where he paused after writing a simple differential equation on the blackboard, and asked how to solve it.A theoretically-minded student in the front row said to find the Green's function, instead of merely forcing an exponential or sinusoidal solution.The professor replied, "Yes, you could also put on your pants with tongs."

author: edpalmer42
author_rank: Super Contributor
timestamp: July 26, 2021, 07:00:05 pm
content: Here's a list of crystal frequencies and common uses for each frequency.https://en.wikipedia.org/wiki/Crystal_oscillator_frequenciesOccasionally, you come across very oddball frequencies that just don't match up with anything. I have a very old rubidium standard that takes a quartz oscillator at 4.981 549 815 MHz and multiplies it by 1372 to get to 6.834 686 346 GHz which is the resonant frequency of the Rb cell in this unit.I also have a couple of oscillators that are still unknown: 5.013 271 MHz and 5.012 654 MHz. These are the values on the labels.EdEdit: Sorry, I missed the fact that retiredfeline had already listed the wikipedia page.

author: TimFox
author_rank: Super Contributor
timestamp: July 26, 2021, 07:13:43 pm
content: Yes, that's the list he cited.

author: brucehoult
author_rank: Super Contributor
timestamp: July 27, 2021, 01:15:57 am
content: Quote from: retiredfeline on July 26, 2021, 01:34:31 pmI probably didn't have an early one. I got a cheap Timex mechanical watch when I started high school and a Casio digital when I graduated in 1980. The Casio had a 1/100th stopwatch and other functions, and was fairly distinctive by having a picture of a Marlin on the face.Exactly like this. It's probably still in a box somewhere. Batteries were supposed to last 5 years but mine lasted 7-8 years -- probably because I didn't use the alarm function. I stopped using it when I got a GSM phone (Ericsson T10) in 2000, before I needed to replace the battery for the 3rd time.

author: retiredfeline
author_rank: Frequent Contributor
timestamp: July 27, 2021, 01:35:33 am
content: Quote from: brucehoult on July 27, 2021, 01:15:57 amThe early ones (Wiki says Seiko marketed the first one in 1969) still had mechanical hands (no commercial LCDs then) but used a quartz crystal for timing. No more forgetting to wind the watch was a promotion point. Naturally as a schoolboy it wasn't something I could afford or needed.I still have a Casio which takes a CR2016 cell and refuses to die.Then of course the IBM PCs came with the MC146818B or DS1287 RTCs which used 32768 Hz crystals. That's why I have so many in my junk, er spares, box.

author: TimFox
author_rank: Super Contributor
timestamp: July 27, 2021, 03:38:06 am
content: I have a railroad Accutron that used a 360 Hz tuning fork and two smallish transistors to drive the stepper motor.Unfortunately, the mercury cells used are no longer made, and I haven't been able to get any of the ersatz cells to work properly.In college, a classmate in the music department exploited the sound to judge the key of unknown musical excerpts in exams.

author: Bassman59
author_rank: Super Contributor
timestamp: July 27, 2021, 05:17:20 am
content: Quote from: GlennSprigg on July 26, 2021, 12:24:59 pmStrange, like the 24.576 MHz and 22.5792 MHz oscillator frequencies commonly used for digital audio?Well, these all make sense. Red Book CD Audio specifies a sample rate of 44.1 kHz. (You can look up the origins of this rate.) A/D and D/A conversions these days use oversampling, and a common oversampling multiplier is 512x. And 512 times 44100 is 22.5792 MHz. Digital Audio Tape (DAT) and other professional gear used the 48 kHz sampling rate, which was derived from video standards, and 512 times 48000 is 24.576 MHz.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 27, 2021, 11:35:21 pm
content: For the lazy:https://en.wikipedia.org/wiki/44,100_Hz

author: fourfathom
author_rank: Super Contributor
timestamp: July 28, 2021, 12:29:08 am
content: Quote from: TimFox on July 26, 2021, 03:36:42 pmThat seems right. The fundamental SONET frequency is OC-1, at 51.84 Mbit/sec. The next one is OC-3, at 155.52 Mbs. Beyond that they go on as multiples of four, at least up to OC-768 (39.8xxx Gbs). That xtal is 155.52 / 2. SONET is a wonderful mix of old and fairly new technology and bit-rates, with asynchronous payloads carried within plesiochronous envelopes. All sorts of fun with multiple clock domains, bit-stuffing, leaking, pointer adjustments, etc.