PIC17C4X
MOVPF
Syntax:
Move p to f
MOVWF
Move WREG to f
[ label ] MOVWF
0 ≤ f ≤ 255
[label] MOVPF p,f
Syntax:
f
Operands:
0 ≤ f ≤ 255
0 ≤ p ≤ 31
Operands:
Operation:
Status Affected:
Encoding:
Description:
(WREG) → (f)
None
Operation:
(p) → (f)
Status Affected:
Encoding:
Z
0000
0001
ffff
ffff
010p
pppp
ffff
ffff
Move data from WREG to register 'f'.
Location 'f' can be anywhere in the 256
word data space.
Move data from data memory location
'p' to data memory location 'f'. Location
'f' can be anywhere in the 256 byte data
space (00h to FFh) while 'p' can be 00h
to 1Fh.
Description:
Words:
Cycles:
1
1
Either 'p' or 'f' can be WREG (a useful
special situation).
Q Cycle Activity:
Q1
Q2
Q3
Q4
MOVPFis particularly useful for transfer-
ring a peripheral register (e.g. the timer
or an I/O port) to a data memory loca-
tion. Both 'f' and 'p' can be indirectly
addressed.
Decode
Read
register 'f'
Execute
Write
register 'f'
MOVWF
REG
Example:
Before Instruction
Words:
Cycles:
1
1
WREG
REG
=
=
0x4F
0xFF
After Instruction
Q Cycle Activity:
Q1
WREG
=
0x4F
0x4F
Q2
Q3
Q4
REG
=
Decode
Read
Execute
Write
register 'p'
register 'f'
MOVPF
REG1, REG2
Example:
Before Instruction
REG1
REG2
=
=
0x11
0x33
After Instruction
REG1
=
=
0x11
0x11
REG2
DS30412C-page 128
1996 Microchip Technology Inc.