|
PIC16F946 Datasheet, PDF (221/274 Pages) Microchip Technology – 64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology | |||
|
◁ |
PIC16F946
MOVF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example:
Move f
[ label ] MOVF f,d
0 ⤠f ⤠127
d â [0,1]
(f) â (dest)
Z
00 1000 dfff ffff
The contents of register âfâ is
moved to a destination dependent
upon the status of âdâ. If âdâ = 0,
destination is W register. If âdâ = 1,
the destination is file register âfâ
itself. âdâ = 1 is useful to test a file
register since status flag Z is
affected.
1
1
MOVF FSR, 0
After Instruction
W = value in FSR
register
Z= 1
MOVLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example:
Move Literal to W
[ label ] MOVLW k
0 ⤠k ⤠255
k â (W)
None
11 00xx kkkk kkkk
The eight bit literal âkâ is loaded
into W register. The âdonât caresâ
will assemble as â0âs.
1
1
MOVLW 0x5A
After Instruction
W = 0x5A
MOVWF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example:
Move W to f
[ label ] MOVWF f
0 ⤠f ⤠127
(W) â (f)
None
00 0000 1fff ffff
Move data from W register to
register âfâ.
1
1
MOVWF OPTION
Before Instruction
OPTION =
W
=
After Instruction
OPTION =
W
=
0xFF
0x4F
0x4F
0x4F
NOP
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example:
No Operation
[ label ] NOP
None
No operation
None
00 0000
No operation.
1
1
NOP
0xx0
0000
© 2005 Microchip Technology Inc.
Preliminary
DS41265A-page 219
|
▷ |