i'm not sure how you pgm your chip but since you are using pbp3 you should insert your config fuses in the pgm
look at PIC18F46K20.INFO in the pbp3 device_reference folder for more info.
just let pbp look after the wdt unless you really need to change it.
until you get the config fuses right nothing will work right.
#CONFIG
CONFIG FOSC = INTIO67
CONFIG PWRT = ON
CONFIG BOREN = ON
CONFIG DEBUG = OFF
CONFIG WDTEN = ON
CONFIG XINST = OFF
CONFIG PBADEN = OFF
CONFIG MCLRE = ON
CONFIG STVREN = ON
CONFIG LVP = OFF
#ENDCONFIG
oscon=$70 will give you a 8mhz clk $60 $4 MHz
you need a
DEFINE OSC 8 or whatever if the clk is not 4mhz
if you are unsure about switching off the analog features have a look at the
ALLDIGITAL.PBP file by daryl taylor thah can be found in this forum
Bookmarks