Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to determine clock frequency input?

Status
Not open for further replies.

bigfarmerdave

New Member
I was curious how you determine what frequency of oscillator to select for a micro? If you select a 25Khz crystal oscillator, doesn't that mean that your program will start its loop over exactly every 40uS, no sooner, no later? So what is the reasoning behind a crystal such as a 32.768KHz crystal? Why not just spec a 33KHz crystal? Must be a logical explanation why all oscillators are not integers only?
 
I'm using the PIC 16F690 and it looks like bits 4-6 of the OSCCON register would configure the "new" clock from the default 4MHz? At 4MHz, the main loop begins every 250nS, no sooner, no later, right? What are the benefits to running at slower clock speeds... use less power? Are there any drawbacks to running at a faster clock speed like 8MHz?
 
The micro clock determines the instruction execution time, and that determines the loop time, which can consist of many instructions. Depending upon the type of micro, it can take one to four clock cycles to complete one instruction.

Running a lower clock speed can reduce the power requirements. You never want to run at a higher clock speed than the maximum rated, as micro operation can become erratic.

The reason for odd crystal frequencies is that they often are divisible by a simple binary counter to get a desired lower frequency. If you divide 32.768KHz by 2^15 (a 15-stage binary counter) you get exactly one pulse per second, so that frequency is used for most battery powered digital clocks and watches. Other odd crystal frequencies are related to certain types of RF or digital transmission that require specific frequencies.
 
......
The reason for odd crystal frequencies is that they often are divisible by a simple binary counter to get a desired lower frequency. If you divide 32.768KHz by 2^15 (a 15-stage binary counter) you get exactly one pulse per second, so that frequency is used for most battery powered digital clocks and watches. Other odd crystal frequencies are related to certain types of RF or digital transmission that require specific frequencies.

And there are (or where?) some standard crystal frecuencies related to analog color TV transmission (eg: "color burst" frecuency).

As hey were made in great cuantities they were cheap and essily obtained.
 
And there are (or where?) some standard crystal frecuencies related to analog color TV transmission (eg: "color burst" frecuency).

As hey were made in great cuantities they were cheap and essily obtained.
To minimize interference with the chrominance (b&W) signal, the color subcarrier frequency was selected to be 445/2 times the TV horizontal line frequency, which gives a value of 3.579....MHz (for the NTSC system). The crystal maintained the frequency accuracy of the subcarrier clock during each line period in the TV, with the crystal oscillator phase locked at the end of each line to the 8 cycles of 3.579MHz "the color-burst" signal located at the back end of the horizontal sync pulse.
 
Status
Not open for further replies.

Latest threads

Back
Top