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

enalbe pll with internal osc

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



Joined: 27 Jun 2006
Posts: 39

View user's profile Send private message

enalbe pll with internal osc
PostPosted: Wed Dec 13, 2006 2:34 pm     Reply with quote

Hello,

I am using a 18F4520 and see that the PLL is available to the internal OSC, but i do not see any fuses or configuration functions in the .h file to enable the PLLEN. See the below quote, which came from the data sheet.


Do i need to set the bit with directly writing assembly to access the register in my code???



Quote:
2.6.4 PLL IN INTOSC MODES
The 4x frequency multiplier can be used with the internal
oscillator block to produce faster device clock
speeds than are normally possible with an internal
oscillator. When enabled, the PLL produces a clock
speed of up to 32 MHz.

Unlike HSPLL mode, the PLL is controlled through
software. The control bit, PLLEN (OSCTUNE<6>), is
used to enable or disable its operation.

The PLL is available when the device is configured to
use the internal oscillator block as its primary clock
source (FOSC3:FOSC0 = 1001 or 1000). Additionally,
the PLL will only function when the selected output frequency
is either 4 MHz or 8 MHz (OSCCON<6> = 111
or 110). If both of these conditions are not met, the PLL
is disabled.

The PLLEN control bit is only functional in those internal
oscillator modes where the PLL is available. In all
other modes, it is forced to ‘0’ and is effectively
unavailable.


Thank you for input!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Dec 13, 2006 2:55 pm     Reply with quote

Quote:
Do i need to set the bit with directly writing assembly ?

This post shows how to set the PLLEN bit. The register address and
bit position shown in the post are the same for your PIC.
http://www.ccsinfo.com/forum/viewtopic.php?t=27276&start=4
Just add the #byte and #bit statements shown in that post,
and also add the statement in main() to set the PLLEN bit.
Guest








PostPosted: Thu Dec 14, 2006 10:08 am     Reply with quote

That did the trick.

Thank you!
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