View previous topic :: View next topic |
Author |
Message |
scottc
Joined: 16 Aug 2010 Posts: 95
|
4X Pll Clock Multiplier on PIC18Fxxx Chip Issues |
Posted: Mon Oct 04, 2010 3:13 pm |
|
|
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
|
|
Posted: Mon Oct 04, 2010 3:20 pm |
|
|
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: 1908
|
|
Posted: Mon Oct 04, 2010 3:38 pm |
|
|
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
|
|
Posted: Mon Oct 04, 2010 4:34 pm |
|
|
Ok, I will try post a test program asap.
Thanks Scott |
|
|
|