|
PIC18F2331_10 Datasheet, PDF (307/392 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High-Performance PWM and A/D | |||
|
◁ |
PIC18F2331/2431/4331/4431
LFSR
Load FSR
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Decode
[ label ] LFSR f,k
0ï£fï£2
0 ï£ k ï£ 4095
k ï® FSRf
None
1110
1111
1110 00ff k11kkk
0000 k7kkk kkkk
The 12-bit literal âkâ is loaded into the
file select register pointed to by âfâ.
2
2
Q2
Read literal
âkâ MSB
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
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Move f
[ 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â. Location, âfâ,
can be anywhere 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.
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
1
1
Q2
Read
register âfâ
Q3
Process
Data
Example:
MOVF
Before Instruction
REG
=
W
=
After Instruction
REG
=
W
=
REG, W
0x22
0xFF
0x22
0x22
Q4
Write
W
ï£ 2010 Microchip Technology Inc.
DS39616D-page 307
|
▷ |