English
Language : 

PIC16F946 Datasheet, PDF (223/274 Pages) Microchip Technology – 64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology
PIC16F946
RLF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Rotate Left f through Carry
[ label ] RLF f,d
0 ≤ f ≤ 127
d ∈ [0,1]
See description below
C
00 1101 dfff ffff
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’.
C
Register f
Words:
Cycles:
Example:
1
1
RLF
REG1,0
Before Instruction
REG1 =
C
=
After Instruction
REG1 =
W
=
C
=
1110 0110
0
1110 0110
1100 1100
1
RRF
Rotate Right f through Carry
Syntax:
Operands:
Operation:
Status Affected:
Description:
[ label ] RRF f,d
0 ≤ f ≤ 127
d ∈ [0,1]
See description below
C
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’.
C
Register f
SLEEP
Syntax:
Operands:
Operation:
Status Affected:
Description:
Go into Standby mode
[ label ] SLEEP
None
00h → WDT,
0 → WDT prescaler,
1 → TO,
0 → PD
TO, PD
The power-down Status bit, PD is
cleared. Time-out Status bit, TO
is set. Watchdog Timer and its
prescaler are cleared.
The processor is put into Sleep
mode with the oscillator stopped.
SUBLW
Subtract W from Literal
Syntax:
[ label ] SUBLW k
Operands:
0 ≤ k ≤ 255
Operation:
k - (W) → (W)
Status Affected: C, DC, Z
Description:
The W register is subtracted (2’s
complement method) from the
eight-bit literal ‘k’. The result is
placed in the W register.
SUBWF
Subtract W from f
Syntax:
[ label ] SUBWF f,d
Operands:
0 ≤ f ≤ 127
d ∈ [0,1]
Operation:
(f) - (W) → (destination)
Status Affected: C, DC, Z
Description:
Subtract (2’s complement method)
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’.
© 2005 Microchip Technology Inc.
Preliminary
DS41265A-page 221