|
PIC18F2X1X_09 Datasheet, PDF (281/376 Pages) Microchip Technology – 28/40/44-Pin Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology | |||
|
◁ |
LFSR
Load FSR
Syntax:
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
Decode
Q2
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, 3ABh
After Instruction
FSR2H
FSR2L
= 03h
= ABh
PIC18F2X1X/4X1X
MOVF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Move f
MOVF f {,d {,a}}
0 ⤠f ⤠255
d â [0,1]
a â [0,1]
f â dest
N, Z
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 anywhere in the
256-byte bank.
If âaâ is â0â, the Access Bank is selected.
If âaâ is â1â, the BSR is used to select the
GPR bank (default).
If âaâ is â0â and the extended instruction
set is enabled, this instruction operates
in Indexed Literal Offset Addressing
mode whenever f ⤠95 (5Fh). See
Section 23.2.3 âByte-Oriented and
Bit-Oriented Instructions in Indexed
Literal Offset Modeâ for details.
1
1
Q2
Read
register âfâ
Q3
Process
Data
Q4
Write W
Example:
MOVF
Before Instruction
REG
=
W
=
After Instruction
REG
=
W
=
REG, 0, 0
22h
FFh
22h
22h
© 2009 Microchip Technology Inc.
DS39636D-page 283
|
▷ |