Dear BAJ, The bootloader asm source v2.2 from http://www.workingtex.com/htpic/PIC_bootloader.htm already include the necessary clrwdt command. In the source code I just set "#define WATCHDOGTIMER 1" Then the code should works. The complete asm code only 2kB size but I don't think it's welcome to circulate file in PIClist, otherwise u can understand my problem, and help me to solve it. Thanks in advance Ken >From: Byron A Jeff >Reply-To: pic microcontroller discussion list >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC]:Bootloader doesn't run when watchdog enable >Date: Sun, 3 Feb 2002 12:26:12 -0500 > >On Sun, Feb 03, 2002 at 11:05:51AM -0500, To Ken wrote: > > Dear all, > > > > I try the bootloader which coming from > > > > http://www.workingtex.com/htpic/PIC_bootloader.htm > > > > with my PIC16F876, running at 2MHz. Since the 2MHz fosc hex is not > > available, I assemble the hex by my self base on the bootloader asm source > > ver2.2 > > > > If the watchdog NOT flag not turn on, then the bootloader run without any > > problems. But if watchdog is on, then nothing run. Would any one help? > > Becase my design need watch running. > >Sounds simple enough. The bootloader isn't clearing the WDT so the PIC >keeps resetting in bootloader mode. You need to examine the source of >the bootloader and determine where it's wait loop is. You then insert a >'clrwdt' instruction there, reassemble and reload. > >Hope this helps, > >BAJ > >-- >http://www.piclist.com hint: The PICList is archived three different >ways. See http://www.piclist.com/#archives for details. > > _________________________________________________________________ &b http://explorer.msn.com.hk/intl.asp 'K6O$U8| MSN Explorer -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.