Depending on what programmer you use the config bits in the programmer settings may override the config bits in the hex file. Read the chip back and check the config bits (especially the watchdog) Peter van Hoof ----- Original Message ---- From: peter green To: Microcontroller discussion list - Public. Sent: Friday, January 11, 2008 4:50:21 AM Subject: Re: [PIC]18F8527 always restart after several lines of excuting Yuxian Yao wrote: > I'm developmeng [PIC]18F8527 with ht-PICC C compiler. The PIC is > programmed ok but always restart himself after several lines of code. > I disabled WDT, BrownOut, Vdd = 5V. but the problem still exist. I > can't figure out why this happens. Can any one help me? > Did you remember to either disable low voltage program or deal with the PGM line? Also how exactly did you set the configuration bits. If you are using MPLAB and set them from the IDE then they won't be present in the hex file the build process creates. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist