PIC18 cheatsheet

CLRWDT

Detailed reference for the CLRWDT instruction in PIC18 ISA.

Description

Clear the Watchdog Timer (WDT). This instruction resets the WDT counter to zero, effectively restarting the watchdog countdown. It is typically used in loops or before the WDT would normally expire.

Examples

; clear WDT at startup
CLRWDT ; WDT counter reset
; clear WDT after a delay
CLRWDT ; WDT counter restored to zero
; clear WDT in a watchdog service routine
CLRWDT ; prevent WDT time‑out