Just wanted to add that the PLL only starts up properly on Power-Up.
The first time you program a chip with the PLL turned on, it won't actually start working at x4 untill you turn the power off and on again. A simple reset of MCLR wont do it.
<br>
Just wanted to add that the PLL only starts up properly on Power-Up.
The first time you program a chip with the PLL turned on, it won't actually start working at x4 untill you turn the power off and on again. A simple reset of MCLR wont do it.
<br>
DT
And it "does" work with a 4MHz TTL clock input with HSPLL set. Just tested it. __CONFIG _CONFIG1H,_OSCS_OFF_1H & _HSPLL_OSC_1H
You just can't use the OSC2 pin for I/O or clock/4 output without using EC or ECIO mode.
On that note then, using this code it should run at 16MHz internally, correct?
This reminds me of the old 486DX2 and DX4 microprocessorsCode:@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HSPLL_OSC_1H @ __CONFIG _CONFIG2L, _BOR_ON_2L & _PWRT_ON_2L & _BORV_45_2L @ __CONFIG _CONFIG2H, _WDT_ON_2H @ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L Main: HIGH portd.1 PAUSE 500 LOW portd.1 PAUSE 500 GOTO Main![]()
I'm using MPASM version 4.02 which complains if I use the old __config options, so I replaced the old options in the .inc file with:
CONFIG OSC=HSPLL,OSCS=OFF,LVP=OFF,PWRT=ON,BOR=ON,WDT=OFF, BORV=25,WDTPS=128,CCP2MUX=OFF,STVR=OFF
DEFINE OSC 16
LOOP:
HIGH 0
PAUSE 500
LOW 0
PAUSE 500
GOTO LOOP
With the 4MHz TTL input to OSC1, it produces .5 S pulses on RB0. So assuming your programmer isn't altering config fuse settings, and you're getting it programmed with HSPLL, then it should definitely be running at 16MHz internally.
Last edited by Bruce; - 22nd August 2005 at 21:37.
I added the DEFINE OSC 16 and it only flashes about once every 2 seconds. I have cycled power and still the same thing.
If you're programming in-circuit, did you cycle power?
As Darrel mentioned previously, you need to cycle power OFF then back ON when switching to HSPLL mode.
With DEFINE OSC 16 -- a 2 second pause is what you'll see if the PLL isn't locked in. It's running directly from the 4MHz TTL clock input until the PLL circuit locks-in, and kicks in the 4x PLL.
I think I just found my problem. The bootloader doesn't seem to be changing the configuration bits properly. I programmed the PIC in the EPIC programmer and it works fine now. Thanks for the help. I'll look further into the other programming method tomorrow.
Bookmarks