PIC16C662-20/TQ Microchip Technology, PIC16C662-20/TQ Datasheet - Page 79
![no-image](/images/manufacturer_photos/0/4/439/microchip_technology_sml.jpg)
PIC16C662-20/TQ
Manufacturer Part Number
PIC16C662-20/TQ
Description
8-Bit EPROM Microcontrollers with Analog Comparators
Manufacturer
Microchip Technology
Datasheet
1.PIC16C662-20TQ.pdf
(136 pages)
- Current page: 79 of 136
- Download datasheet (635Kb)
CLRWDT
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
COMF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
1996 Microchip Technology Inc.
Clear Watchdog Timer
[ label ] CLRWDT
None
00h
0
1
1
TO, PD
CLRWDT instruction resets the Watch-
dog Timer. It also resets the prescaler
of the WDT. Status bits TO and PD
are set.
1
1
Before Instruction
After Instruction
Complement f
[ label ] COMF
0
d
(f)
Z
The contents of register 'f' are comple-
mented. If 'd' is 0 the result is stored in
W. If 'd' is 1 the result is stored back in
register 'f'.
1
1
Before Instruction
After Instruction
CLRWDT
COMF
00
00
f
[0,1]
WDT prescaler,
TO
PD
(dest)
127
WDT
WDT counter =
WDT counter =
WDT prescaler=
TO
PD
REG1
REG1
W
0000
1001
REG1,0
=
=
=
f,d
0110
dfff
=
=
0x13
0x13
0xEC
?
0x00
0
1
1
0100
ffff
PIC16C64X & PIC16C66X
DECF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
DECFSZ
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
Decrement f
[ label ] DECF f,d
0
d
(f) - 1
Z
Decrement register 'f'. If 'd' is 0 the
result is stored in the W register. If 'd'
is 1 the result is stored back in register
'f'
1
1
Before Instruction
After Instruction
Decrement f, Skip if 0
[ label ] DECFSZ f,d
0
d
(f) - 1
None
The contents of register 'f' are decre-
mented. If 'd' is 0 the result is placed in
the W register. 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. A
NOP is executed instead making it a two
cycle instruction.
1
1(2)
Before Instruction
After Instruction
.
DECF
HERE
CONTINUE •
00
00
f
f
PC
CNT
if CNT =
PC
if CNT
PC
[0,1]
[0,1]
127
127
(dest)
(dest);
CNT
Z
CNT
Z
=
=
=
=
0011
1011
CNT, 1
DECFSZ
GOTO
•
•
address
CNT - 1
0,
address CONTINUE
0,
address HERE+1
DS30559A-page 79
=
=
=
=
skip if result = 0
dfff
dfff
HERE
0x01
0
0x00
1
CNT, 1
LOOP
ffff
ffff
Related parts for PIC16C662-20/TQ
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![PIC16C662-04/SO](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![PIC16C662-04/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04/PQ](/photos/6/59/65984/150-44-pqfp_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44-MQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-10/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04I/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04I/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662/JW](/photos/6/63/66338/150-40-cdip_tmb.jpg)
Part Number:
Description:
IC MCU EPROM 4KX14 COMP 40CDIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04E/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04E/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04E/PQ](/photos/6/59/65984/150-44-pqfp_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44-MQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04E/PT](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44TQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04I/PQ](/photos/6/59/65984/150-44-pqfp_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44-MQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04I/PT](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44TQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C662-04/PT](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
IC MCU OTP 4KX14 COMP 44TQFP
Manufacturer:
Microchip Technology
Datasheet: