Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Enabling PLL in PIC18F

Status
Not open for further replies.

engr_joni_ee

Advanced Member level 3
Joined
Nov 3, 2018
Messages
718
Helped
2
Reputation
4
Reaction score
4
Trophy points
18
Activity points
5,940
Hi,

I am having 16 MHz X-Tal crystal and I would like to get 40 MHz FOSC for higher baud rate. I guess PLL in PIC18F2550 can generate 4 times the crystal frequency but then it will be 64 MHz which device does not support as it is designed to support up to 48 MHz, right ?

Is there any way to get 40 MHz from 16 MHz X-Tal crystal ?
 

PLLDIV = 4
USDDIV = 2
CPUDIV = HS, divided by 3

These will give you 48 MHz CPU clock.

Edit:

Or

PLLDIV = 4
USBDIV = 2
CPUDIV = HSPLL, divided by 2.
FOSC3...0 = 1
 

In a word: No!
The issue with that MCU is that the PLL only multiples by 24 and must have an input frequency of 4MHz. (The reason is that this gives the 96/2 = 48MHz required for USB operation).
Once you have a 96MHz clock, the only post-scalar divider options are divide by 2, 3, 4 or 6. To get 40MHz from 96MHz would require a division of 2.4!
If you must have 40MHz then your only option is to use a 40MHz external oscillator, use EC mode and the 'divide by 1' option for the oscillator postscalar.
On the other hand, as @baileychic has pointed out, you can easily get 48MHz, or 32MHz using the PLL and dividing by 3.
As you are only wanting a faster Fosc for UART Baud rate purposes, then use the formula in the data sheet to find something that is close - but remember that a UART really need to be within 1-2% to be reliable.
Susan
 

PLL only multiples by 24 or 4 ? How about getting 40 MHz using PLL from internal 8 HMz ?
 

Im under the impression, you are trying to drag on the thread without ever looking into the 18F2550 datasheet…

Simply notice that the PLL has fixed 96 MHz frequency. Possible CPU clock frequencies are integer parts (2,3,4,6) of 96 MHz.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top