I suspect you're not getting HSPLL setup/working properly. If it is, and you're defining the osc speed, then you won't need to adjust or tweak any timing.
PBP does this for you automatically. That's the purpose of DEFINE OSC x.
Try this with your LAB-X1 board. Set osc configuration jumper "A" to position 2-3. Remove the other two.
Open the 18F452.INC file in your PBP directory, and change the following line.
;__CONFIG _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H ; <-- comment out this line
__CONFIG _CONFIG1H, _OSCS_OFF_1H & _HSPLL_OSC_1H ; Add this one directly below it
Save the include file with the change.
Now compile & run this on your X-1 board. The LED on D.0 should be blinking at 1/2S intervals.
DEFINE OSC 16
Main:
HIGH PORTD.0
PAUSE 500
LOW PORTD.0
PAUSE 500
GOTO Main
If it is, you should be ready to go.




Bookmarks