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

Help: Making the PIC18F252 work at 40 MHz

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



Joined: 16 Aug 2006
Posts: 19

View user's profile Send private message

Help: Making the PIC18F252 work at 40 MHz
PostPosted: Thu Apr 19, 2007 8:29 am     Reply with quote

Hi:

I've been working with the 18F252 for a while, always using a 20 MHz crystal. Now i need to speed up some routines, and besides improving the code, i want to use a higher clock. The manual states that this PIC can work up to 40 MHz; it implies that using a 10 MHz clock and a internal 4x PLL the PIC can work internally at 40 MHz. Is this the only way to make it work at this speed? Can it work directly with a 40 MHz resonator?

If you can give me a hand, i'll ve really grateful.

Best regards,
Fernando
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Thu Apr 19, 2007 8:43 am     Reply with quote

It can't work directly with a 40 MHz crystal/resonator. You can only use crystals up to and including 20 MHz. For operation above 20 MHz you have two options: use a crystal whose frequency is 1/4th your desired frequency and use the PIC's internal x4 PLL or use an external clock souce at your desired frequency to directly drive the PIC's OSC1/CLKI pin. The #fuse for this option is EC or EC_IO (usually).
fmartinezs



Joined: 16 Aug 2006
Posts: 19

View user's profile Send private message

PostPosted: Thu Apr 19, 2007 9:32 am     Reply with quote

Thanks!

I'll guess i'll try and find some 10 MHz xtals then.

Best regards,
Fernando
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