Re: GPS Project: PIC18F26K22 or PIC18F46K22
I seldom use crystals [you lose two pins for marginal increase in accuracy ] but I believe you can set pll mode in the config section and is all you need
CONFIG PLLCFG = ON
;CONFIG PLLCFG = OFF // pll can only be engaged with software selection for int osc
and then all this is not valid , it applies to internal osc only
OSCCON = %01110000 ; 64Mhz
OSCTUNE.6 = 1 ; Enable 4x PLL
this may or may not be necessary with xtal osc , I have found bootloaders won't sync up unless this is done using int osc with pll.
the PLLRDY bit is asserted when pll is stable [although I can find no mention in data sheet]
while ! osccon2.7 :WEND
Warning I'm not a teacher
Bookmarks