your config is incorrect for those settings
Code:
ASM
__config _CONFIG1H, _FOSC_HSHP_1H & _PLLCFG_ON_1H & _PRICLKEN_OFF_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__config _CONFIG2L, _PWRTEN_OFF_2L & _BOREN_SBORDIS_2L & _BORV_190_2L
__config _CONFIG2H, _WDTEN_ON_2H & _WDTPS_32768_2H
__config _CONFIG3H, _CCP2MX_PORTC1_3H & _PBADEN_OFF_3H & _CCP3MX_PORTB5_3H & _HFOFST_ON_3H & _T3CMX_PORTC0_3H & _P2BMX_PORTD2_3H & _MCLRE_EXTMCLR_3H
__config _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
__config _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
__config _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
__config _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
__config _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
__config _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
__config _CONFIG7H, _EBTRB_OFF_7H
ENDASM
and you need a
define OSC 32
statement in your code
why use a xtal ? why run at 8MHz ?
when the chip has a int osc that can do 64mhz
Bookmarks