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 support@ccsinfo.com

PLL with INTRC

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



Joined: 06 Feb 2006
Posts: 468
Location: Bali

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

PLL with INTRC
PostPosted: Mon Jan 30, 2017 6:36 pm     Reply with quote

My email to CCS regarding PLL:
Quote:
CCS PCH C Compiler, Version 5.059, 31220
#device PIC18F26K22

#FUSES INTRC_IO
#FUSES PLLEN
#use delay(internal=32MHz)
The LST file Configuration Fuses:
Word 1: 2800 INTRC_IO NOPLLEN PRIMARY NOFCMEN NOIESO
Shows PLL not enabled but the controllers works at 32MHz, tested with a blinking LED

#FUSES ECM_IO
#FUSES PLLEN
#use delay(clock=32MHz)
The LST file configuration Fuses:
Word 1: 3B00 ECM_IO PLLEN PRIMARY NOFCMEN NOIESO
The controller works correct at 32MHz

CCS answer
Quote:
When you use #use delay(internal=xx) the compiler set the clock
related configuration fuses, in this case it's setting the INTRC_IO
and NOPLLEN fuses and then enables the PLL in software by setting
the PLLEN bit in the OSCTUNE register.
We do this so it's possible to switch to the 8 MHz and 16 MHz
internal oscillator in software using the setup_oscillator() function.

Just in case that somebody faces the same issue

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