Jump to content
drumanart

Wdt Desactivate In Code

Recommended Posts

Hello.

Code for 18F4420

 

At the beginning of my code I tell the preprocessor to activate the watch dog.

 

#pragma DATA _CONFIG2H, _WDT_ON_2H & _WDTPS_2048_2H // WDTON, prescaler 1/2024.

 

 

Is there a possibility to deactivate the watchdog while the code is running but not with _asm clrwdt?

 

Thanks Martin

 

 

Share this post


Link to post
Share on other sites

Hi Martin,

 

Use the software watchdog enable bit. wdtcon.SWDTEN

 

It's the software version of the config bit.

 

See page 258 of the data sheet.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

Hi

 

Your IDLOC question has nothing to do with WDT control.

 

BTW, why are you ressurecting all those old threads?

If you have any question of yours, just open anew thread, instead of ressurecting threads that are several years old.

Look at the dates!

 

Best regards

Jorge

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×