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

Fuse question

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



Joined: 18 Nov 2013
Posts: 160

View user's profile Send private message

Fuse question
PostPosted: Wed Jan 27, 2016 11:24 am     Reply with quote

I'm using an 18F67K22. With the settings:

#Fuses PLLEN
#use delay(clock=64000000,internal=16000000,restart_wdt)

Why does the list file show fuse NOPLLEN?

I'm using v5.054 IDE.
Ttelmah



Joined: 11 Mar 2010
Posts: 19498

View user's profile Send private message

PostPosted: Wed Jan 27, 2016 11:34 am     Reply with quote

It should be turning it on at the start of the code. If the timings say it isn't, use setup_oscillator to do this.

The reason is that several of the other similar PIC's (don't think this one actually does), have a errata that they can't actually wake up with the PLL enabled above certain clock rates. So to 'be safe' if you define the clock and crystal in the clock statement, the compiler defaults to enabling the PLL in software. It won't do this if you just use the PLLEN fuse, and specify clock=64MHz, rather than specifying both clock and srystal values.
SeeCwriter



Joined: 18 Nov 2013
Posts: 160

View user's profile Send private message

PostPosted: Wed Jan 27, 2016 11:47 am     Reply with quote

Originally, I only had the delay statement with clock=64M, and no fuse statement. But when I noticed the fuse setting in the list file of NOPLLEN I added the fuse as well, but it had no effect.
So I need use the set_oscillator to enable the pll?
Ttelmah



Joined: 11 Mar 2010
Posts: 19498

View user's profile Send private message

PostPosted: Wed Jan 27, 2016 12:05 pm     Reply with quote

Yes.

If you look at the data sheet, for the internal oscillator the PLL can _only be enabled in software_. The PLL fuse is ignored.

"For the INTIOx modes (HF-INTOSC):
• Only the PLLEN can enable the PLL (PLLCFG is
ignored).
• When the oscillator is configured for the internal
oscillator (FOSC<3:0> = 100x), the PLL can be
enabled only when the HF-INTOSC frequency is
8 or 16 MHz."
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