PIC16F62X
RETURN
Return from Subroutine
RRF
Rotate Right f through Carry
[ label ] RRF f,d
0 ≤ f ≤ 127
Syntax:
[ label ] RETURN
None
Syntax:
Operands:
Operands:
Operation:
Status Affected:
Encoding:
Description:
d
[0,1]
TOS → PC
None
Operation:
See description below
C
Status Affected:
Encoding:
00
0000
0000
1000
00
1100
dfff
ffff
Return from subroutine. The stack is
POPed and the top of the stack (TOS)
is loaded into the program counter.
This is a two cycle instruction.
The contents of register ’f’ are rotated
one bit to the right through the Carry
Flag. If ’d’ is 0 the result is placed in
the W register. If ’d’ is 1 the result is
placed back in register ’f’.
Description:
Words:
Cycles:
Example
1
2
C
Register f
RETURN
After Interrupt
Words:
Cycles:
Example
1
1
PC
=
TOS
RRF
REG1,0
Before Instruction
REG1
C
=
=
1110 0110
0
After Instruction
REG1
W
C
=
=
=
1110 0110
0111 0011
0
RLF
Rotate Left f through Carry
SLEEP
Syntax:
Operands:
[ label ]
RLF f,d
Syntax:
[ label ] SLEEP
None
0 ≤ f ≤ 127
Operands:
Operation:
d
[0,1]
00h → WDT,
0 → WDT prescaler,
1 → TO,
Operation:
See description below
C
Status Affected:
Encoding:
0 → PD
00
1101
dfff
ffff
Status Affected:
Encoding:
TO, PD
The contents of register ’f’ are rotated
one bit to the left through the Carry
Flag. If ’d’ is 0 the result is placed in
the W register. If ’d’ is 1 the result is
stored back in register ’f’.
Description:
00
0000
0110
0011
The power-down status bit, PD is
cleared. Time-out status bit, TO is
set. Watchdog Timer and its
Description:
C
Register f
prescaler are cleared.
The processor is put into SLEEP
mode with the oscillator stopped.
See Section 14.9 for more details.
Words:
Cycles:
Example
1
1
Words:
1
RLF
REG1,0
Cycles:
Example:
1
Before Instruction
SLEEP
REG1
=
=
1110 0110
0
C
After Instruction
REG1
W
C
=
=
=
1110 0110
1100 1100
1
DS40300B-page 122
Preliminary
1999 Microchip Technology Inc.