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

Enabling PLL on 16F1847 - SOLVED
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 20061

View user's profile Send private message

PostPosted: Wed Apr 27, 2016 12:30 am     Reply with quote

What there should be is perhaps a warning saying 'software PLL mode automatically selected'.

You'll find if you fuse enable the PLL, with a crystal selected (or an external oscillator), the fuse will function exactly as you expect.
The chip can't actually boot in the PLL mode with the internal oscillator.
If you look at the data sheet, you have:

Quote:

"Note:"
"Following any Reset, the IRCF<3:0> bits"
"of the OSCCON register are set to ‘0111’"
"and the frequency selection is set to"
"500 kHz. The user can modify the IRCF"
"bits to select a different frequency."


Now the PLL can _only_ be used with 8Mhz selected. So the chip cannot boot up at 8MHz * 4.

The actual boot is done at 500Khz, then the compiler switches the oscillator to 8Mhz, and then enables the PLL bit.

This is the sequence you would have to do if working in assembler. The compiler does it for you.

Behind the scenes, the compiler prevents the PLL fuse from being selected if in RC mode (since this would result in a non-running chip)....
gjs_rsdi



Joined: 06 Feb 2006
Posts: 476
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Wed Apr 27, 2016 3:43 pm     Reply with quote

Thank you for the explanation Ttelmah.

Building a new board and will test with an external oscillator at 8MHz and 32MHz (using PLL)
Will post the results

Best wishes
Joe
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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