CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

What is PLL?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ressas



Joined: 15 Nov 2019
Posts: 135

View user's profile Send private message

What is PLL?
PostPosted: Sat Nov 28, 2020 3:36 am     Reply with quote

What is PLL? Very Happy
Ttelmah



Joined: 11 Mar 2010
Posts: 19510

View user's profile Send private message

PostPosted: Sat Nov 28, 2020 3:51 am     Reply with quote

Phase Locked Loop.

Standard way in electronics of generating a higher frequency from a source.
The 'classic' is a variable frequency RC oscillator, a divider and a phase
detector. Choose a particular division, and then compare the output signal
with the incoming source in the phase detector. If you are getting ahead
of the incoming signal you reduce the oscillator speed. If falling behind, you
increase the speed. So the oscillator then produces a signal that is the
'divider' times the incoming signal.
In the standard PIC version, it produces a signal 4* the source. Then in
the USB chips there is instead a version that produces 24 * the source. On
the DsPIC's and some of the later chips, you have the ability to specify the
division ratio, so the oscillator can produce a huge range of multiplication
factors.
It is also very commonly used in things like radios and phones, where in
many cases it is impossible to actually produce a crystal that runs at
the frequency you want, so instead you use a much easier to make
lower frequency, and a PLL to produce the required final frequency. This
is actually why it is being used in the PICs, since many now run well
above the maximum crystal frequencies available.
ressas



Joined: 15 Nov 2019
Posts: 135

View user's profile Send private message

PostPosted: Sat Nov 28, 2020 5:39 am     Reply with quote

Thank you Ttelmah.
I would like to ask another question specific to 18f46k22.
On the first page of the datasheet, the expression "- 64 MHz performance
available using PLL – no external components required" appears.
When I say INTRC in fuses, I actually get 64 MHz from the OSC2 pin with
an oscilloscope. But because it is / 4 the pin works at 16MHZ right ?
So if I hadn't activated the PLL, how many MHz would I work ?

As the third:
Should I include the #fuse PLLEN statement in my code?
Or just:
Code:
 setup_oscillator (OSC_64MHZ, OSC_PLL_ON);

Is the expression enough?
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Nov 28, 2020 6:08 am     Reply with quote

Quick answer.
16MHz....

Have a look at the datasheet, chapter2, figure 2-1, page 26 and follow the 'clock path'.

You'll see the various pathways you can get a 'clock' to the PIC. This PIC is easy to follow unlike the 4550 where there's a LOT of paths and combinations !!

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19510

View user's profile Send private message

PostPosted: Sun Nov 29, 2020 9:23 am     Reply with quote

and OSC_64MHz, actually includes the PLL enable 'internally'. So you
automatically get the PLL when you use this and don't have to specify it.
Code:

 setup_oscillator (OSC_64MHZ);
zeronix



Joined: 08 Jun 2010
Posts: 9

View user's profile Send private message

PostPosted: Tue Dec 08, 2020 3:42 pm     Reply with quote

nice topic
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group