hugoender
New Member
I am new to PICs and have seen some tutorials include external crystal oscillators without explaining why or how they chose the frequency.
I would like to know how you decide what oscillator frequency you need and how the oscillator affects your circuit. I know this is a very general question and it depends on what you are trying to make/do but if you guys could provide some examples where you might need an external crystal oscillator, why you need it, and how you decide the oscillator frequency I would greatly appreciate it.
I did a search through the forums and found a post about assembly instructions taking 4 clock cycles. Does that mean that instructions can be carried out faster with a higher oscillator frequency?
For example:
4MHz Oscillator: Period (clock cycle) = 1/4MHz = 250ns; 1 instruction = 4 clock cycles = 1us
20MHz Oscillator: Period (clock cycle) = 1/20MHz= 50ns; 1 instruction = 4 clock cycles = 200ns
Is this correct? I would greatly appreciate any examples where certain frequencies are required or additional information on oscillators and their function in PIC circuits.
I would like to know how you decide what oscillator frequency you need and how the oscillator affects your circuit. I know this is a very general question and it depends on what you are trying to make/do but if you guys could provide some examples where you might need an external crystal oscillator, why you need it, and how you decide the oscillator frequency I would greatly appreciate it.
I did a search through the forums and found a post about assembly instructions taking 4 clock cycles. Does that mean that instructions can be carried out faster with a higher oscillator frequency?
For example:
4MHz Oscillator: Period (clock cycle) = 1/4MHz = 250ns; 1 instruction = 4 clock cycles = 1us
20MHz Oscillator: Period (clock cycle) = 1/20MHz= 50ns; 1 instruction = 4 clock cycles = 200ns
Is this correct? I would greatly appreciate any examples where certain frequencies are required or additional information on oscillators and their function in PIC circuits.