16F84 MICROCHIP [Microchip Technology], 16F84 Datasheet - Page 62

no-image

16F84

Manufacturer Part Number
16F84
Description
18-pin Flash/EEPROM 8-Bit Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
PIC16F8X
IORWF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example
MOVF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example
DS30430C-page 62
Inclusive OR W with f
[ label ]
0
d
(W) .OR. (f)
Z
Inclusive OR the W register with regis-
ter 'f'. If 'd' is 0 the result is placed in the
W register. If 'd' is 1 the result is placed
back in register 'f'.
1
1
Before Instruction
After Instruction
Move f
[ label ]
0
d
(f)
Z
The contents of register f is moved to a
destination dependant 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 regis-
ter since status flag Z is affected.
1
1
After Instruction
Decode
IORWF
Decode
MOVF
Q1
Q1
00
00
f
f
[0,1]
[0,1]
(destination)
127
127
RESULT =
W
RESULT =
W
Z
W = value in FSR register
Z = 1
IORWF
MOVF f,d
register
register
0100
1000
FSR, 0
Read
Read
Q2
Q2
'f'
'f'
(destination)
RESULT, 0
=
=
=
Process
Process
dfff
dfff
f,d
data
data
Q3
Q3
0x13
0x91
0x13
0x93
1
destination
destination
ffff
ffff
Write to
Write to
Q4
Q4
MOVLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example
MOVWF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example
Move Literal to W
[ label ]
0
k
None
The eight bit literal 'k' is loaded into W
register
as 0’s.
1
1
After Instruction
Move W to f
[ label ]
0
(W)
None
Move data from W register to register
'f'
1
1
Before Instruction
After Instruction
.
MOVLW
MOVWF
Decode
Decode
Q1
Q1
11
00
k
f
(W)
1998 Microchip Technology Inc.
.
127
(f)
255
The don’t cares will assemble
W
OPTION =
W
OPTION =
W
MOVLW k
MOVWF
literal 'k'
register
00xx
0000
0x5A
Read
Read
Q2
Q2
OPTION_REG
'f'
=
0x5A
=
=
Process
Process
kkkk
1fff
data
data
Q3
Q3
f
0xFF
0x4F
0x4F
0x4F
register 'f'
Write to
kkkk
ffff
Write
Q4
Q4
W

Related parts for 16F84