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

4X Pll Clock Multiplier on PIC18Fxxx Chip Issues

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



Joined: 16 Aug 2010
Posts: 95

View user's profile Send private message

4X Pll Clock Multiplier on PIC18Fxxx Chip Issues
PostPosted: Mon Oct 04, 2010 3:13 pm     Reply with quote

I am using a pic18f2331 part running with a 10Mhz crystal.
Running the Pic at 10Mhz, my code works perfect. I traded out the
10Mhz crystal for a 20Mhz one and my code still runs perfect, tho
a bit faster.

Now to my issue. If using the 10Mhz Crystal and I enable the internal
4x multiplier, My code crashes or stops. The problem is that the actual
10Mhz Crystal oscillator on the pic stops working. So no clock and
the code does not run.

This is only happening when the internal 4x PLL is enabled. My intent
was to use the 10Mhz Oscillator and multiply it up to 40Mhz Internal.

In my code I configure the pll like so.

#USE delay(oscillator=10Mhz, clock=40Mhz)

I checked the fuses and they are correct. I also verified the Clock
oscillator and its running at 10Mhz. I tried some older compilers and
the issue remains, currently running 4.110. I modified delays etc to
slow the code way down and still the cpu bombs.

Has anyone seen this kind of wierdness when using the 4x internal
multiplier on the Pic18f.

Any advice on what to look for would be welcome.

Thanks Scott.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Oct 04, 2010 3:20 pm     Reply with quote

Post a simple test program that blinks an LED or that displays
"Hello World" once per second, and that shows the crashing problem.
Post the #include for the PIC, the #fuses, #use delay() and main().

Post a description of the board and external circuits connected to the
PIC, including the crystal circuit, and any bypass capacitors that are
connected to Vdd pins on the PIC. Post the component values. Post the
manufacturer and part number of the crystal. Post the Vdd voltage
of the PIC. Also post if you have the AVdd and AVss pins connected, or
are they left unconnected ? Same thing for MCLR.
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Mon Oct 04, 2010 3:38 pm     Reply with quote

Don't know if this is relevant or not, but the x4 PLL fuse takes a full power cycle (off then on again) before it's properly enabled after a programming cycle. I only mention this since you didn't explicitly state that you cycled the power....my apologies if you have.
scottc



Joined: 16 Aug 2010
Posts: 95

View user's profile Send private message

PostPosted: Mon Oct 04, 2010 4:34 pm     Reply with quote

Ok, I will try post a test program asap.

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