PIC12F510/16F506
RETLW
Return with Literal in W
SLEEP
Enter SLEEP Mode
Syntax:
[ label ] RETLW k
0 ≤ k ≤ 255
Syntax:
[label ] SLEEP
Operands:
Operation:
Operands:
Operation:
None
k → (W);
TOS → PC
00h → WDT;
0 → WDT prescaler;
1 → TO;
Status Affected: None
0 → PD
Description:
The W register is loaded with the
Status Affected: TO, PD, RBWUF
eight-bit literal ‘k’. The program
counter is loaded from the top of
the stack (the return address).
This is a two-cycle instruction.
Description:
Time-out Status bit (TO) is set.
The Power-down Status bit (PD) is
cleared.
RBWUF is unaffected.
The WDT and its prescaler are
cleared.
The processor is put into Sleep
mode with the oscillator stopped.
See Section 10.9 “Power-Down
Mode (Sleep)” on Sleep for more
details.
RLF
Rotate Left f through Carry
SUBWF
Syntax:
Subtract W from f
Syntax:
[ label ] RLF f,d
[label ] SUBWF f,d
Operands:
0 ≤ f ≤ 31
d ∈ [0,1]
Operands:
0 ≤ f ≤ 31
d ∈ [0,1]
Operation:
See description below
C
Operation:
(f) – (W) → (dest)
Status Affected:
Description:
Status Affected: C, DC, Z
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:
Subtract (2’s complement method)
the W register from register ‘f’. If ‘d’
is ‘0’, the result is stored in the W
register. If ‘d’ is ‘1’, the result is
stored back in register ‘f’.
register ‘f’
C
RRF
Rotate Right f through Carry
SWAPF
Swap Nibbles in f
Syntax:
[ label ] RRF f,d
Syntax:
[ label ] SWAPF f,d
Operands:
0 ≤ f ≤ 31
d ∈ [0,1]
Operands:
0 ≤ f ≤ 31
d ∈ [0,1]
Operation:
See description below
C
Operation:
(f<3:0>) → (dest<7:4>);
(f<7:4>) → (dest<3:0>)
Status Affected:
Description:
Status Affected: None
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: The upper and lower nibbles of
register ‘f’ are exchanged. If ‘d’ is
‘0’, the result is placed in W
register. If ‘d’ is ‘1’, the result is
placed in register ‘f’.
register ‘f’
C
© 2006 Microchip Technology Inc.
Preliminary
DS41268B-page 77