Datasheet

PIC16C71X
DS30272A-page 82 1997 Microchip Technology Inc.
SLEEP
Syntax: [
label
] SLEEP
Operands: None
Operation: 00h WDT,
0 WDT prescaler,
1 T
O,
0 PD
Status Affected: TO, PD
Encoding:
00 0000 0110 0011
Description:
The power-down status bit, PD is
cleared. Time-out status bit, TO is
set. Watchdog Timer and its pres-
caler are cleared.
The processor is put into SLEEP
mode with the oscillator stopped.
See Section 8.8 for more details.
Words: 1
Cycles: 1
Q Cycle Activity: Q1 Q2 Q3 Q4
Decode NOP NOP Go to
Sleep
Example: SLEEP
SUBLW Subtract W from Literal
Syntax: [
label
] SUBLW k
Operands: 0 k 255
Operation: k - (W) → (W)
Status Affected: C, DC, Z
Encoding: 11 110x kkkk kkkk
Description:
The W register is subtracted (2’s comple-
ment method) from the eight bit literal 'k'.
The result is placed in the W register.
Words: 1
Cycles: 1
Q Cycle Activity: Q1 Q2 Q3 Q4
Decode Read
literal 'k'
Process
data
Write to W
Example 1: SUBLW 0x02
Before Instruction
W = 1
C = ?
Z = ?
After Instruction
W = 1
C = 1; result is positive
Z = 0
Example 2: Before Instruction
W = 2
C = ?
Z = ?
After Instruction
W = 0
C = 1; result is zero
Z = 1
Example 3: Before Instruction
W = 3
C = ?
Z = ?
After Instruction
W = 0xFF
C = 0; result is nega-
tive
Z = 0