# How many Hz = 1kHz

Hi, I run into a trouble: I believed 1MHz=1,000kHz=1,000,000Hz. But when measuring my RTC DS3231 32kHz output pin frequency with Arduino I measured 32,772 Hz (I am counting pulses and dividing it with time from millis()). My Arduino runs a bit slower (losing 1s every hour or so) and so I guess the correct frequency on the pin is 32,768 = 32*1024 Hz. So what mega-, kilo- etc. in frequency means? Is my program measuring the RTC wrong or the RTC is not working properly? Is my understanding of frequency naming wrong and Arduino is running on 16*1024*1024 Hz instead of 16,000,000 Hz? Is Maxim (manufacturer of DS3231) confused using 32kHz instead of 32.768 kHz?

I am aware 1kB=1024B but as far as I know it shouldn't be use for frequencies - or not?

Thanks for help.

How many metres in 1 km?

Smajdalf: Hi, I run into a trouble: I believed 1MHz=1,000kHz=1,000,000Hz. But when measuring my RTC DS3231 32kHz output pin frequency with Arduino I measured 32,772 Hz (I am counting pulses and dividing it with time from millis()). My Arduino runs a bit slower (losing 1s every hour or so) and so I guess the correct frequency on the pin is 32,768 = 32*1024 Hz. So what mega-, kilo- etc. in frequency means? Is my program measuring the RTC wrong or the RTC is not working properly? Is my understanding of frequency naming wrong and Arduino is unning on 16*1024*1024 Hz instead of 16,000,000 Hz? Is Maxim (manufacturer of DS3231) confused using 32kHz instead of 32.768 kHz?

No, manufacturer tells about 32.768kHz and that is 32768Hz.

The manufacturers "part number" for the TXCO oscillator is "DS32KHZ", but the frequwncy accordingly to the specs is 32.768kHz.

Sometimes there is an issue with "." and ",".

So 32.768 kHz in some countries are read as 32768 x 1000 Hz = 32,678 MHz and in others: 32,678 KHz = 32678 Hz.

What a wonderful world would it be having same interpretation/definition all over the globe. How much money value has already been wasted in missing global standards or different definitions ...

As others have said 1000Hz is definitely 1Khz, there's no binary maths involved.

and you are correct that the frequency is 32.678 Khz ( click on "key specs" here)

I would suspect that your millis() time is less accurate than the RTC clock frequency. The crystal resonator used on most Arduinos is only accurate to around 5000ppm whereas the stated accuracy of the RTC is 1ppm.

So 32.768 kHz in some countries are read as 32768 x 1000 Hz = 32,678 MHz

I don't believe I've ever seen anyone make that mistake, certainly not entire countries.

How much money value has already been wasted in missing global standards or different definitions

Or how many Mars probes.

Thank you all (except for trolling like Paul__B).

rw950431:
As others have said 1000Hz is definitely 1Khz, there’s no binary maths involved.

and you are correct that the frequency is 32.678 Khz ( click on “key specs” here)

I would suspect that your millis() time is less accurate than the RTC clock frequency. The crystal resonator used on most Arduinos is only accurate to around 5000ppm whereas the stated accuracy of the RTC is 1ppm.

It looks like I was correct 1kHz should be 1000 Hz but Maxim doesn’t know it: in their datasheet they state 32kHz output, 32kHz TCXO. Even if it were rounded it should have been 33kHz. Next time I won’t trust datasheets so blindly.

P.S. Now I noticed “This bit controls the status of the 32kHz pin. When set to logic 1, the 32kHz pin is enabled and outputs a 32.768kHz squarewave signal.” in the datasheet. I guess if I knew more about timekeeping I would know it immediately because it looks like all(?) RTCs use 32.768kHz as their frequency…

32768 Hz crystals have been used in consumer digital timepieces since the 1970s.

Smajdalf: Thank you all (except for trolling like Paul__B).

And best wishes to you too. :roll_eyes:

Paul__B: And best wishes to you too. :roll_eyes:

Some people just don't take to the Socratic method.

AWOL: I don't believe I've ever seen anyone make that mistake, certainly not entire countries.

Or how many Mars probes.

I suppose the cost of one collapsed nose gear (17 years earlier) wasn't enough warning for NASA.

Hi,

The reason the frequency 32,768 Hz is commonly used, because it is a power of 2 (215) value. And, you can get a precise 1 second period (1 Hz frequency) by using a 15 stage binary counter.
Practically, in majority of the applications, particularly digital, the current consumption has to be as low as possible to preserve battery life. So, this frequency is selected as a best compromise between low frequency and convenient manufacture with market availability and real estate in term of physical dimensions while designing board, where low frequency generally means the quartz is physically bigger.

Because of the commonality of these crystals for time keeping, they are termed 32kHz crystals
Hope this helps…Tom.

There is nothing wrong with the data sheet, it is just how you are interpreting the data you read there.

Thank you all (except for trolling like Paul__B

What Paul was trying to do was to make you think. To comparing what you already know to what you are asking.

How many bytes in a kiloByte somewhere in the 80s :D

Grumpy_Mike: What Paul was trying to do was to make you think. To comparing what you already know to what you are asking.

I am sorry, I didn't recognize you sooo clever guys speak in riddles. To others as dumb as me, there is (hopefully) the solution:

1 km=1000 meters everytime, everywhere. 1 kbyte = 1024 bytes most of times - but sometimes it is only 1000 bytes (mostly when someone wants to sell you a large memory for 1T 2^40 >> 10^12). 1 kHz = 1000 Hz most of times - except for real time counting where sometimes (for historical reasons?) 1 kHz = 1024 Hz: usually in a datasheet of a crystal named "32kHz (quartz) crystal" is stated the frequency is 32.768 kHz.

As a side note it looks like 1kbit/s means 1 k(bit/s) = 1000 bit/s not 1 (kbit)/s = 1024 bit/s.

The other popular timekeeping crystal was 3.579545 mhz which was the color burst frequency for TV's - you could buy that crystal very cheaply along with a little 8 pin dip if I remember correctly that would generate the 1hz output. In general though, k=kilo=1000 - it is only with memory/disk sizes where we are talking powers of 2 (and the advertising people get involved in what sells) that the confusion arises :-)

That was the MM5369 chip in an 8 pin dip. Pretty cool chip for it's time - don't think it is made any more though.

Smajdalf: I am sorry, I didn't recognize you sooo clever guys speak in riddles.

It is not a riddle it is a question, so brush that chip off you shoulder and start thinking what that question could possible mean.

If you don't know then ask.

Education is about training people to think, it is not about getting answers and remembering them. Although you might not think so giver the parlous state of education in the UK and US at the moment.

Grumpy_Mike: Education is about training people to think, it is not about getting answers and remembering them. Although you might not think so giver the parlous state of education in the UK and US at the moment.

Man - you sure hit that one right on !! We have gone from "ok, how did you do that and why?" to "I need someone to write a code for me so I can get my degree". Very sad state of affairs.

mikey

gpsmikey: Man - you sure hit that one right on !! We have gone from "ok, how did you do that and why?" to "I need someone to write a code for me so I can get my degree". Very sad state of affairs.

mikey

And when it's pre-med majors, cheating on anatomy exams, it's especially worrisome.

Grumpy_Mike: It is not a riddle it is a question, so brush that chip off you shoulder and start thinking what that question could possible mean.

If you don't know then ask.

Education is about training people to think, it is not about getting answers and remembering them. Although you might not think so giver the parlous state of education in the UK and US at the moment.

Well I don't know so I ask: how do you think the (stupid?) question could help me? I was quite sure Paul didn't read my original post, just subject of the thread.

When I was young and overconfidend I would agree with you: it is not needed to memorize, just think. It is not true: you can think as much and hard as you wish but you cannot discover what "transistor" is. You need someone to tell you and remeber it is the semiconductor (what is semiconductor?) that ... Knowledge without thinking is as useless as thinking without knowledge.

ChrisTenone: And when it's pre-med majors, cheating on anatomy exams, it's especially worrisome.

But this is the other extreme. 99% of anatomy is useless. For example anatomy of brain is very complicated but as long as you are not doing neurosurgery you only have to know where brain is and that you should NEVER EVER touch it. Anatomy teaches students not to think and it is very good in it...