|
PIC18F258 Datasheet, PDF (303/384 Pages) Microchip Technology – High Performance, 28/40-Pin Enhanced FLASH Microcontrollers with CAN | |||
|
◁ |
PIC18FXX8
LFSR
Load FSR
Syntax:
[ label ] LFSR f,k
Operands:
0â¤fâ¤2
0 ⤠k ⤠4095
Operation:
k â FSRf
Status Affected: None
Encoding:
Description:
1110
1111
1110 00ff k11kkk
0000 k7kkk kkkk
The 12-bit literal âkâ is loaded into
the file select register pointed to
by âfâ.
Words:
2
Cycles:
2
Q Cycle Activity:
Q1
Q2
Decode
Read literal
âkâ MSB
Decode
Read literal
âkâ LSB
Q3
Process
Data
Process
Data
Q4
Write
literal âkâ
MSB to
FSRfH
Write literal
âkâ to FSRfL
Example:
LFSR 2, 0x3AB
After Instruction
FSR2H
=
FSR2L
=
0x03
0xAB
MOVF
Move f
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
[ label ] MOVF
0 ⤠f ⤠255
d â [0,1]
a â [0,1]
f â dest
N, Z
f [,d [,a]]
0101 00da ffff ffff
The contents of register âfâ are
moved to a destination dependent
upon the status of âdâ. If 'd' is 0, the
result is placed in W. If 'd' is 1, the
result is placed back in register 'f'
(default). Location 'f' can be any-
where in the 256 byte bank. If âaâ is
0, the Access Bank will be
selected, overriding the BSR value.
If âaâ = 1, then the bank will be
selected as per the BSR value
(default).
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Decode
Read
register âfâ
Q3
Process
Data
Q4
Write W
Example:
MOVF
Before Instruction
REG
=
W
=
After Instruction
REG
=
W
=
REG, W
0x22
0xFF
0x22
0x22
 2002 Microchip Technology Inc.
DS41159B-page 301
|
▷ |