Author Topic: PIC micro controller oscillator frequency  (Read 2195 times)

0 Members and 1 Guest are viewing this topic.

Offline khatusTopic starter

  • Regular Contributor
  • *
  • Posts: 166
  • Country: gl
PIC micro controller oscillator frequency
« on: November 25, 2018, 12:35:49 pm »
Hello guys

The internal clock (Q1–Q4) of PIC Micro controller runs at a quarter of the oscillator frequency (FOSC/4).

My question is if i divide the frequency with 4 Then the timer period of each clock pulse will increase 4 times.



However this picture is confusing. it shows after the internal circuitry divides the clock into four even quadrature clocks. the timer period of each clock (i.e Q1, Q2, Q3, and Q4) less than the main primary oscillator(that is connected to the OSC1 and OSC2 pins).
But i think time period of each clock pulse must be 4 times time period of main primary oscillator.


1. Can anybody explain the above??

2.What is the frequency of oscillator is it FOSC/4 or only FOSC??

3. What is machine cycle ??



 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6985
  • Country: li
Re: PIC micro controller oscillator frequency
« Reply #1 on: November 25, 2018, 12:58:58 pm »
When talking the pic12F..18F chips the Q1-Q4 are the "names" for the 4 "internal processor cycles" or "a single machine cycle", not the 4 individual clocks.

Therefore with Xtal/RC/Fosc 8MHz, the internal clock is 8MHz, but the processor needs 4 cycles (periods) of this 8MHz clcok to make a single instruction - a machine cycle (or more).

For example, with 8MHz Xtal (125ns period) the max speed is 2million instructions per second.

The CLKOUT frequency will be 8MHz/4 = 2MHz --> 500ns period where the pic does one single instruction (internally the processor needs min 4x125ns to make a single instruction).

The pic24/dspic33 need 2 clocks/instruction (or more) and the pic32 1clock/instruction (or more).
« Last Edit: November 25, 2018, 01:16:56 pm by imo »
Readers discretion is advised..
 

Offline khatusTopic starter

  • Regular Contributor
  • *
  • Posts: 166
  • Country: gl
Re: PIC micro controller oscillator frequency
« Reply #2 on: November 25, 2018, 04:56:33 pm »
What is oscillator cycle??what is the frequency of oscillator cycle??
« Last Edit: November 25, 2018, 05:10:14 pm by khatus »
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1955
  • Country: gb
Re: PIC micro controller oscillator frequency
« Reply #3 on: November 25, 2018, 09:52:55 pm »
What is oscillator cycle??what is the frequency of oscillator cycle??

FOSC.  That is the oscillator frequency in Hz, the cycle is the inverse of this, in seconds.  If you hadn't guessed FOSC is Frequency of the OSCillator.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->