I have a small application which was running fine on the 18F452. =20 When the announcement came that it was going obsolete I got some 18F4620 samples and converted the code to run on the newer chip. Everything is working again EXCEPT the WDT. To test the WDT I looped out almost all of my existing code,=20 which would periodically reset the WDT, just leaving the basic=20 core so I can check the WDT operation. The manual appears to=20 say that the WDT time-out causes a Reset event just as it did in=20 the 18F452, but a Reset never happens. I have tried this with the WDT enabled all the time and also disabling it in Config and turning it ON by setting the SWDTEN=20 bit in WDTCON. Here are snips from the code which sets up the=20 WDT and the idle loop which is running all the time. If the WDT=20 ever times out and causes a jump to MainProgramStart, the code=20 flashes both the Red & Green LEDs ON for 1 Second to indicate=20 the program was just restarted. This DOES happen from powerON or from the Reset button, and even from a software command over the RS232 control port, but never when sitting there idling, as it=20 should if the WDT is running. I have been over the data sheets many times and can't seem to find anything different in the WDT. Is there something else I=20 need to do to get the WDT to work? Something which was changed=20 between the 452s and the 4620?=20 Any help will be appreciated. ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ; --------> = Power ON Reset vector org 0x0000 ; program execution = starts here on RESET goto MainProgramStart ; the first thing we do is = jump over ISR data h'0412',H'0102' ; / Year / Month / Day / = Version# / ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D org 0x0008 ; --> Top Level = (MAIN) Interrupt Service Routine ;------------------------------------------------------------------------= -------------------- retfie=20 ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ; the main program execution starts here, either from Power ON or RESET = button ; or jumped to here from an error trap or watchdog timeout ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D org 0x00C0 ; leave blank space for = Interrupt Routines MainProgramStart bcf INTCON,GIE ; Disable Global Interrupts bcf INTCON,INT0IE ; Disable External Interrupt on = Data In from Max3100 clrf BSR ; clear Bank Select = Register MPstrt=20 call InitializeSystem ; more or less self = explanatory -=20 movlw b'11000000' ; this just lights both Red = & Green LEDs movwf PORTB =20 call DELAY1S ; for 1 second to show = that Reset occurred clrf PORTB call ReadBaudRateSwitch ; read the Baud Rate Jumpers call InitUART ; set up the RS-232 = Serial I/O=20 call InitSSP ; set up the = Synchronous Serial Port call InitMax3100 ; set up the Max3100 = Slave UART call Sign_On_Verbose ; put the big Text screen = on the terminal, if asked call SavCmd ; save serial command = bytes if any for further work call ZeroChr ; clear the Serial = DATA buffer call ZeroRxBuffer ; clear the Receive = buffer call ZeroCodeBuffer ; clear the code buffer = (used by parser) call ClearSlaveRxBuffer ; clear the Slave Receive = buffer call CR_LF ; send to terminal = screen clrwdt ; Zero the Watch = Dog Timer <--------------------------- bsf WDTCON,SWDTEN ; Start the Watch Dog Timer = <--------------------------- bsf INTCON,GIE ; Enable Global Interupts = <--------------------------- goto IdleTask ; go into endless = polling loop with Interrupts ON ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ; this loop (1mSec) = cycles over & over while IdleTask ; the system is waiting for = RS-232 bytes (commands) bsf PORTD,6 ; toggle the output bit =3DON = for scope timing call RedGreen ; Blink Red/Green LED - = heartbeat indicator - Watchdog call ParseRS232 ; decode the serial command = string, if any call DELAY02 ; 200uSec delay bcf PORTD,6 ; toggle the output bit =3DOFF = for scope timing call DELAY08 ; 800uSec delay goto IdleTask ; around the loop again until = something happens ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist