Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PIC Microcontroller Watchdog timer 1

Status
Not open for further replies.

Gokkul55

Computer
Mar 1, 2013
44
I am not sure if the topic fits here. Is there any microcontroller forum here?? [ponder]

Any ways i have my PIC16F685 on which i have watchdog enabled and it works fine and resets the pic on time out, but once i enable the GIE or PEIE (that is the interrupt - timer 1 actually) now the watchdog does not resets the pic but the pic goes on running with the timer 1 doing the regular interrupt.

Am i missing something or is this the way it is suppose to happen.

Thanks
Regards
Gokkul
 
Replies continue below

Recommended for you

No that's not what's supposed to happen. I believe you have a reset-the-WD instruction in your interrupt service routines somewhere. So, when you enable the GIE and PEIE the code is once again kicking the dog.


Keith Cress
kcress -
 

I solved the prob.

itsmoked said:
No that's not what's supposed to happen. I believe you have a reset-the-WD instruction in your interrupt service routines somewhere

You are right so i went deep down onto the disassembly listing and found that "__delay_us(20)" function, which is a function provided by the compiler for delay inserts a CLRWDT in the code

If i change the delay form 20us to 10 or 30 us its does not add the CLRWDT.

But any way found the culprit. [bigglasses]
Now the program resets fine.

Thanks
Regards
Gokkul
 
Hitech-C Compiler

Thanks
Regards
Gokkul
 
Huh. Same one I use.

Normally I'd say email them with this. They've fixed 3 compiler errors I've found in the past. Usually in less than 24hrs. But since Microjerk bought them to murder them and damage all their competitors I have no idea whether they can fix anything or not. Might be worth at least shooting them an email with all the details.


Keith Cress
kcress -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor