PIC17C42 Microchip Technology, PIC17C42 Datasheet - Page 121

no-image

PIC17C42

Manufacturer Part Number
PIC17C42
Description
High-Performance 8-Bit CMOS EPROM/ROM Microcontroller
Manufacturer
Microchip Technology
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC17C42-16/JW
Manufacturer:
AD
Quantity:
12
Part Number:
PIC17C42A-16/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC17C42A-16/PQ
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC17C42A-16/PQ
Manufacturer:
MICROCH
Quantity:
20 000
Part Number:
PIC17C42A-16/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC17C42A-16E/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC17C42A-16E/PQ
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC17C42A-25/P
Manufacturer:
MICROCLOCK
Quantity:
20 000
DECF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example:
1996 Microchip Technology Inc.
Before Instruction
After Instruction
Decode
CNT
Z
CNT
Z
Q1
=
=
=
=
register 'f'
Decrement f
[ label ] DECF f,d
0
d
(f) – 1
Decrement register 'f'. If 'd' is 0 the
result is stored in WREG. If 'd' is 1 the
result is stored back in register 'f'.
1
1
DECF
OV, C, DC, Z
Read
0000
Q2
0x01
0
0x00
1
f
[0,1]
255
(dest)
CNT,
011d
Execute
Q3
1
ffff
destination
Write to
Q4
ffff
DECFSZ
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example:
Before Instruction
After Instruction
Decode
PC
CNT
If CNT
If CNT
Q1
PC =
PC =
=
=
=
register 'f'
Decrement f, skip if 0
[ label ] DECFSZ f,d
0
d
(f) – 1
skip if result = 0
None
The contents of register 'f' are decre-
mented. If 'd' is 0 the result is placed in
WREG. If 'd' is 1 the result is placed
back in register 'f'.
If the result is 0, the next instruction,
which is already fetched, is discarded,
and an NOP is executed instead mak-
ing it a two-cycle instruction.
1
1(2)
HERE
CONTINUE
Read
0001
Q2
Address (HERE)
CNT - 1
0;
Address (CONTINUE)
0;
Address (HERE+1)
f
[0,1]
255
PIC17C4X
(dest);
011d
DECFSZ
GOTO
Execute
Q3
DS30412C-page 121
ffff
CNT, 1
LOOP
destination
Write to
Q4
ffff

Related parts for PIC17C42