English
Language : 

PIC16F8X_13 Datasheet, PDF (68/128 Pages) Microchip Technology – 18-pin Flash/EEPROM 8-Bit Microcontrollers
PIC16F8X
SLEEP
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
[ label ] SLEEP
None
00h  WDT,
0  WDT prescaler,
1  TO,
0  PD
TO, PD
00 0000 0110 0011
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 14.8 for more details.
1
1
Q1
Q2
Q3
Q4
Decode No-Opera No-Opera Go to
tion
tion
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 Process Write to W
literal 'k'
data
Example 1:
Example 2:
Example 3:
SUBLW
0x02
Before Instruction
W= 1
C= ?
Z=?
After Instruction
W=
C=
Z=
1
1; result is positive
0
Before Instruction
W= 2
C= ?
Z=?
After Instruction
W=
C=
Z=
0
1; result is zero
1
Before Instruction
W= 3
C= ?
Z=?
After Instruction
W=
C=
Z=
0xFF
0; result is negative
0
DS30430D-page 68
 1996-2013 Microchip Technology Inc.