DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PIC16F648AESS View Datasheet(PDF) - Microchip Technology

Part Name
Description
Manufacturer
PIC16F648AESS Datasheet PDF : 178 Pages
First Prev 121 122 123 124 125 126 127 128 129 130 Next Last
PIC16F627A/628A/648A
RRF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Rotate Right f through Carry
[ label ] RRF f,d
0 f 127
d [0,1]
See description below
C
00
1100 dfff ffff
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
Words:
Cycles:
Example
1
1
RRF
REG1, 0
Before Instruction
REG1 = 1110 0110
C =0
After Instruction
REG1 = 1110 0110
W = 0111 0011
C =0
SLEEP
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example:
[ label ] SLEEP
None
00h WDT,
0 WDT prescaler,
1 TO,
0 PD
TO, PD
00
0000 0110 0011
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. See Section 14.8
“Power-Down Mode (Sleep)”
for more details.
1
1
SLEEP
SUBLW
Syntax:
Operands:
Operation:
Status
Affected:
Encoding:
Description:
Words:
Cycles:
Example 1:
Example 2:
Example 3:
Subtract W from Literal
[ label ] SUBLW k
0 k 255
k - (W) → (W)
C, DC, Z
11
110x kkkk kkkk
The W register is subtracted (2’s
complement method) from the eight-
bit literal ‘k’. The result is placed in
the W register.
1
1
SUBLW 0x02
Before Instruction
W=1
C =?
After Instruction
W= 1
C = 1; result is positive
Before Instruction
W= 2
C=?
After Instruction
W= 0
C = 1; result is zero
Before Instruction
W= 3
C= ?
After Instruction
W = 0xFF
C = 0; result is negative
DS40044F-page 126
© 2007 Microchip Technology Inc.

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]