18f4525 clock source change

Status
Not open for further replies.

shaun_c_m

Junior Member level 2
Joined
Oct 12, 2007
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,518
hi, is anyone able to talk me through the steps required to change the clock source from an external 10 MHz crystal with PLL (ie 40 MHZ clock) down to the 31 KHz internal clock?

it looked simple until i found out that i had to start up oscilators before i could switch sources, now im a bit confused

thanks in advance
 

dont you need to turn on the oscilator before you switch? and what about polling the oscon frequency stable bit [OSCCON<2>&<3>] ?

i know it says it waits for a few clock cycles as it switches but can you safely just change OSCCON to 0x02 and back to 0x00 without it causing glitches?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…