Jump to content


Photo

Wdt Desactivate In Code


4 replies to this topic

#1 drumanart

drumanart

    Regular

  • EstablishedMember
  • Pip
  • 50 posts

Posted 10 April 2014 - 05:38 PM

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

 

 



#2 Reynard

Reynard

    Maniac

  • EstablishedMember
  • PipPipPipPip
  • 659 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Archery - target and field

Posted 18 April 2014 - 04:34 PM

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



#3 drumanart

drumanart

    Regular

  • EstablishedMember
  • Pip
  • 50 posts

Posted 30 April 2014 - 11:00 AM

Thanks



#4 WalterFax

WalterFax

    Newbrie

  • EstablishedMember
  • 5 posts
  • Gender:Male
  • Location:143040
  • Interests:WalterFaxFB

Posted 03 March 2016 - 07:10 AM

Ahmet - Sorry, but its not clear to me what you want. Are you looking for code to read the chip IDLOC area?

#5 JorgeF

JorgeF

    Super Enthusiast

  • EstablishedMember
  • PipPipPip
  • 273 posts
  • Gender:Male
  • Location:ES @ Europe, third rock from the Sun

Posted 06 March 2016 - 06:40 PM

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





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users