On Wed, 28 Aug 2002, Samuel BOUQUET wrote: > Here is the #fuses line: > #fuses XT, NOPROTECT, NOWDT, PUT, NOPROTECT, NOBROWNOUT, NOLVP, WRT, CPD That's correct, and will disable WDT. > I read on a Microchip datasheet (Mid Range Reference Manuel, 33023.pdf) that > there are assemblary lines to get the PIC working on a good way (page 176).I > am working on it to try to get the timer working good. the WDT seems to be > stop with those instructions. That procedure is needed when switching the prescaler between the WDT and TIMER0, whether you have the WDT enabled or not. I think the problem is occurring when you manually set OPTION_REG bit 3. What are you trying to accomplish with that? This line: setup_counters (RTCC_EXT_H_TO_L, RTCC_DIV_2); will (safely) assign the prescaler to TIMER0, you don't need to do it yourself. The compiler will use the corerct procedure to avoid the problem noted in the midrange manual. Just delete the "bit_set (OPTION_REG, 3)" statement and I think you'll be OK. Dale -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body