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.

Need for higher frequency!

Status
Not open for further replies.

Neyolight

Full Member level 5
Full Member level 5
Joined
Aug 29, 2011
Messages
306
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
World
Activity points
3,624
Hi all

I need to increase the frequency of my PIC18F4620 to MAXIMUM possible. Im using it on a PICDEM2 PLUS board and has no external clock source- suggesting I would need to buy one.

Currently Im using internal oscillator with PLL [ Fosc= 32 Mhz ( 8Mhz, internal clock)]. I need to increase this 8Mhz to 40 Mhz...Is it possible using an external oscillator?

Maybe HS mode with PLL ?

Code:
The HSPLL mode makes use of the HS mode oscillator
for frequencies up to 10 MHz. A PLL then multiplies the
oscillator output frequency by 4 to produce an internal
clock frequency up to 40 MHz.

Does this mean I need a crystal with 10Mhz MAX ?
 

An external 10MHz crystal or oscillator can be used with HSPLL to give 40MHz.

I routinely use an 11.0592MHz crystal in HSPLL, so the PIC is running at 44.2368MHz. I've never had a PIC fail to work properly at that speed, although I probably wouldn't trust it for production.
 
Allright, so that 40Mhz is the instruction cycle and not the Fosc that gets divided by 4 ?

Also, If I use 16Mhz crystal, would I get 64Mhz out ?
 

I've just checked my old PICDEM 2 Plus - it has a socket for a full size, metal-can oscillator module (standard), so that would be easier than a crystal. Just plug one in and reconfigure the device fuses.

---------- Post added at 00:09 ---------- Previous post was at 00:05 ----------

The 40MHz (or whatever is after the PLL) will be divided by four for the instruction cycle.

I don't know if you could get 64MHz out of it - it's a big overclock. I've never tried that high. Try it if you want, but check the chip's temperature if it runs at all.
 
Its kind of silly to use a 10Mhz crystal with PLL , which multiplies the Fosc by 4 and then for the instruction cycle it gets dropped to 10Mhz again =|

I know without PLL, instruction cycle would be 10/4 = 2.5 Mhz

I have a feeling ( no valid reason ) that I cannot increase instruction cycle to over 10Mhz =| [For my application, I need instruction cycle to be as big as possible]

---------- Post added at 13:23 ---------- Previous post was at 13:15 ----------

I've just checked my old PICDEM 2 Plus - it has a socket for a full size, metal-can oscillator module (standard), so that would be easier than a crystal. Just plug one in and reconfigure the device fuses.



What Frequency would metal-can oscillator module (standard) give me? How that any different to a crystal ?
 

Other parts of the PIC (timers etc - sorry - that's wrong!) use Tosc and can take advantage of the full 40MHz, it's just the instruction cycle which needs four oscillator cycles to complete one instruction (sometimes it needs double that for some instructions).

If you need much faster than that (and faster than my 44MHz overclock) then you need a different PIC. The 18F4550 and similar parts with USB have a 48MHz standard maximum (might be overclockable) and the PLL has x2,3,4 and 6 modes for more flexible crystal choice.

The dsPIC30F4013 and similar can go up to 120MHz internally, with up to x16 PLL, giving you 30 MIPS - three times the 18F4620's official maximum.

---------- Post added at 00:31 ---------- Previous post was at 00:27 ----------

As far as the PIC is concerned, there is no difference between a metal can oscillator and a crystal+capacitors. A 10MHz oscillator, or a 10MHz crystal will both give the PIC 10MHz, which it can them multiply with its PLL. The oscillator simply gives a ready-to-use digital clock, whereas the crystal needs an oscillator circuit to give the clock (which is inside the PIC - that's why you need two pins to connect a crystal). The oscillator connects with a single connection to the OSC1 pin; the OSC2 pin is not needed and can be configured as an I/O if you want.
 
Last edited:
Other parts of the PIC (timers, PWM, ADC) use Tosc and can take advantage of the full 40MHz, it's just the instruction cycle which needs four oscillator cycles to complete one instruction (sometimes it needs double that for some instructions).

Really? Can I make Timer0 increment on Fosc ?

bit 5 T0CS: Timer0 Clock Source Select bit
1 = Transition on T0CKI pin
0 = Internal instruction cycle clock (CLKO)


Does the T0CKI pin output Fosc?

---------- Post added at 13:46 ---------- Previous post was at 13:43 ----------

Ok I just checked, theres nothing on T0CKI (RA4)
 

Oops - sorry, no. I was thinking of another MCU entirely with that comment!

(I should probably go to bed - it's 1am here and I think my brain is seizing up!)
 

hehehe you got my hopes up for 10 minutes ! =P

It would like heaven If could operate my Timer0 at 32Mhz =D
 

I don't know if you could get 64MHz out of it - it's a big overclock. I've never tried that high. Try it if you want, but check the chip's temperature if it runs at all.

I don't recommend overclocking a tiny PIC. There could be other issues such as stability related problems when overclocking. Hence Microchip states a maximum frequency at which full functionality and stability are guaranteed. You may get one or 2 MHz extra out of it, but it's not really worth it. And a big overclock is out of the question - the 64MHz mentioned.

It's best to stick within the manufacturer's proposed limit and make the switch to a more powerful/faster PIC (PIC24/dsPIC) if need be.

Hope this helps.
Tahmid.
 
Last edited:
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top