PIC18F2331/2431/4331/4431
GOTO
Unconditional Branch
INCF
Increment f
Syntax:
[ label ] GOTO
0 k 1048575
k PC<20:1>
None
k
Syntax:
[ label ] INCF f [,d [,a]]
Operands:
Operation:
Status Affected:
Operands:
0 f 255
d [0,1]
a [0,1]
Operation:
(f) + 1 dest
Encoding:
1st word (k<7:0>)
2nd word(k<19:8>)
Status Affected:
Encoding:
C, DC, N, OV, Z
1110
1111
1111
k kkk
kkkk
kkkk
7
0
8
k
kkk kkkk
0010
10da
ffff
ffff
19
Description:
GOTOallows an unconditional branch
Description:
The contents of register, ‘f’, are
anywhere within entire 2-Mbyte memory
range. The 20-bit value, ‘k’, is loaded
into PC<20:1>. GOTOis always a
two-cycle
incremented. If ‘d’ is ‘0’, the result is
placed in W. If ‘d’ is ‘1’, the result is
placed back in register, ‘f’. If ‘a’ is ‘0’,
the Access Bank will be selected, over-
riding the BSR value. If ‘a’ = 1, then the
bank will be selected as per the BSR
value.
instruction.
Words:
Cycles:
2
2
Words:
Cycles:
1
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Q Cycle Activity:
Q1
Decode
Read literal
‘k’<7:0>,
No
operation
Read literal
‘k’<19:8>,
Q2
Q3
Q4
Write to PC
Decode
Read
register ‘f’
Process
Data
Write to
destination
No
No
No
No
operation
operation
operation
operation
Example:
INCF
CNT,
Example:
GOTO THERE
Before Instruction
CNT
Z
C
=
0xFF
After Instruction
=
=
=
0
?
?
PC
=
Address (THERE)
DC
After Instruction
CNT
Z
C
=
0x00
=
=
=
1
1
1
DC
DS39616D-page 304
2010 Microchip Technology Inc.