Specifications

mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 9: Instruction Set
SLEEP - Enter Sleep mode
Syntax: [label] SLEEP
Description: The processor enters sleep mode. The oscillator is stopped. PD bit (Power
Down) of the STATUS register is cleared. TO bit of the same register is set. The WDT and its
prescaler are cleared.
Operation: 0 -> WDT, 0 -> WDT prescaler, 1 -> TO, 0 -> PD
Operand: -
Status affected: TO, PD
Number of cycles: 1
EXAMPLE :
....
[label] SLEEP
Before instruction execution: WDT counter = x
WDT prescaler = x
After instruction: WDT counter = 0x00
WDT prescaler = 0
TO = 1
PD = 0
SUBLW - Subtract W from literal
Syntax: [label] SUBLW k
Description: The content of register W is subtracted from the literal k. The result is stored
in register W.
Operation: k - (W) -> W
Operand: 0 k 255
Status affected: C, DC, Z
Number of cycles: 1
http://www.mikroe.com/en/books/picmcubook/ch9/ (29 of 35)5/3/2009 11:35:12 AM