Yep that should set it for 8MHz.
1. You'll need to set the osc config fuse for HS
2. Be sure you're using MPASM as the assembler.
3. Be sure to select the 18F452 at compile time.
4. Make sure your programmer is not changing any config fuse
settings before you program the 18F.
The PBP header file for this particular PIC has default config fuse settings. I think it's set for XT which is only good for up to 4MHz.
Open your 18F452.INC file found in your PBP INC file directory.
Make the change (shown below), save, exit, re-compile, and program your 18F on your LAB-X1. Should work fine.
INCLUDE "P18F452.INC" ; MPASM Header
;__CONFIG _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
__CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
__CONFIG _CONFIG4L, _LVP_OFF_4L
Note: Just comment out the 1st line shown above, and enter the next one with the _HS_OSC_1H.
That sets your config fuse up for the higher oscillator speed. The simple blink program below should work fine.
Code:
DEFINE OSC 8
Main:
HIGH 0
PAUSE 250
LOW 0
PAUSE 250
GOTO MAIN
Bookmarks