Hello,
I'm trying to write a program that checks for a timeout. When there is no timeout the program has to return to the place it came from. No problems so far when I use a PIC16F877A. Now I compiled the program for PIC18F4550. It looks to work fine, but after 28 timeouts the processor resets. I guess there is somthing wrong with the settings in the include file. I use Microchip ICD2 programmer and MPLAB v7.11.
This is the include file I use:
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F4550, r = dec, w = -311, f = inhx32
INCLUDE "P18F4550.INC" ; MPASM Header
;20MHZ
__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
;HS
__CONFIG _CONFIG1H, _FOSC_HS_1H
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
__CONFIG _CONFIG3H, _PBADEN_OFF_3H
__CONFIG _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 32