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

PIC18F14K50 and PLL

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



Joined: 31 Dec 2010
Posts: 39

View user's profile Send private message

PIC18F14K50 and PLL
PostPosted: Thu Dec 08, 2011 11:03 pm     Reply with quote

I had a program that worked fine under 4.124 using a PC18F14K50.

I compiled it under 4.128 and it didn't work properly.

After a few hours of digging i noticed that the PLL wasn't being enabled under 4.128 even though it worked under 4.124 with the same code.

More digging and I stumbled on that if I changed my previous #use delay(crystal=12M) to #use delay(clock=12M) everything works as before.

Is this a bug or why wouldn't the PLL be enabled by using the "crystal" designation?

Note: #use delay(clock=12M, crystal) also doesn't work
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Fri Dec 09, 2011 4:12 am     Reply with quote

If you have a crystal at 12M, and the CPU running at 12M, then the PLL has to be off.....
What has happened is that CCS have tightened things up.
So if you have the CPU running at 12MHz, you either have to say just this (clock=12M), and specify the PLL fuse yourself, or you have to specify both the clock frequency (clock=xxx), _and_ the crystal _frequency_ (not just crystal, but crystal=yyy), which then enables the PLL if needed to get that combination.

Best Wishes
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