English
Language : 

PIC17C7XX Datasheet, PDF (223/328 Pages) Microchip Technology – High-Performance 8-Bit CMOS EPROM Microcontrollers with 10-bit A/D
PIC17C7XX
SLEEP
Enter SLEEP mode
Syntax:
[ label ] SLEEP
Operands:
Operation:
Status Affected:
None
00h → WDT;
0 → WDT postscaler;
1 → TO;
0 → PD
TO, PD
Encoding:
Description:
Words:
0000 0000 0000 0011
The power-down status bit (PD) is
cleared. The time-out status bit (TO) is
set. Watchdog Timer and its
postscaler are cleared.
The processor is put into SLEEP
mode with the oscillator stopped.
1
Cycles:
1
Q Cycle Activity:
Q1
Decode
Q2
No
operation
Q3
Process
Data
Q4
Go to
sleep
Example:
SLEEP
Before Instruction
TO = ?
PD = ?
After Instruction
TO = 1 †
PD = 0
† If WDT causes wake-up, this bit is cleared
SUBLW
Subtract WREG from Literal
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
[ label ] SUBLW k
0 ≤ k ≤ 255
k – (WREG) → (WREG)
OV, C, DC, Z
1011 0010 kkkk kkkk
WREG is subtracted from the eight bit
literal 'k'. The result is placed in
WREG.
1
1
Q2
Read
literal 'k'
Q3
Process
Data
Q4
Write to
WREG
Example 1:
SUBLW 0x02
Before Instruction
WREG = 1
C
=?
After Instruction
WREG = 1
C
=1
Z
=0
Example 2:
; result is positive
Before Instruction
WREG = 2
C
=?
After Instruction
WREG = 0
C
=1
Z
=1
Example 3:
; result is zero
Before Instruction
WREG = 3
C
=?
After Instruction
WREG =
C
=
Z
=
FF ; (2’s complement)
0 ; result is negative
0
© 1998 Microchip Technology Inc.
DS30289A-page 223