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
Posted: Thu Apr 19, 2007 8:43 am
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
Posted: Thu Apr 19, 2007 9:32 am
Thanks!
I'll guess i'll try and find some 10 MHz xtals then.
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