
PIC17C4X
DS30412C-page 118
1996 Microchip Technology Inc.
CLRWDT
Clear Watchdog Timer
Syntax:
[
label ] CLRWDT
Operands:
None
Operation:
00h
→ WDT
0
→ WDT postscaler,
1
→ TO
1
→ PD
Status Affected:
TO, PD
Encoding:
0000
0100
Description:
CLRWDT
instruction resets the watchdog
timer. It also resets the prescaler of the
WDT. Status bits TO and PD are set.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
register
ALUSTA
Execute
NOP
Example:
CLRWDT
Before Instruction
WDT counter
=
?
After Instruction
WDT counter
=
0x00
WDT Postscaler
=
0
TO
=1
PD
=1
COMF
Complement f
Syntax:
[
label ] COMF
f,d
Operands:
0
≤ f ≤ 255
d
∈ [0,1]
Operation:
→ (dest)
Status Affected:
Z
Encoding:
0001
001d
ffff
Description:
The contents of register 'f' are comple-
mented. If 'd' is 0 the result is stored in
WREG. If 'd' is 1 the result is stored
back in register 'f'.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
register 'f'
Execute
Write
register 'f'
Example:
COMF
REG1,0
Before Instruction
REG1
=
0x13
After Instruction
REG1
=
0x13
WREG
=
0xEC
(f)