16c72a PDF
16c72a PDF
16c72a PDF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PIC16C72A
28
27
26
25
24
23
22
21
20
19
18
17
16
15
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0/INT
VDD
VSS
RC7
RC6
RC5/SDO
RC4/SDI/SDA
Peripheral Features:
Timer0: 8-bit timer/counter with 8-bit prescaler
Timer1: 16-bit timer/counter with prescaler,
can be incremented during sleep via external
crystal/clock
Timer2: 8-bit timer/counter with 8-bit period
register, prescaler and postscaler
Capture, Compare, PWM module
Capture is 16-bit, max. resolution is 12.5 ns,
Compare is 16-bit, max. resolution is 200 ns,
PWM maximum resolution is 10-bit
8-bit multi-channel Analog-to-Digital converter
Synchronous Serial Port (SSP) with Enhanced
SPI and I2C
Preliminary
DS35008B-page 1
PIC16C62B/72A
Pin Diagrams
MCLR/VPP
RA0
RA1
RA2
RA3
RA4/T0CKI
RA5/SS
VSS
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CKI
RC1/T1OSI
RC2/CCP1
RC3/SCK/SCL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PIC16C62B
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0/INT
VDD
VSS
RC7
RC6
RC5/SDO
RC4/SDI/SDA
Key Features
PICmicro Mid-Range Reference Manual
(DS33023)
PIC16C62B
PIC16C72A
Operating Frequency
DC - 20 MHz
DC - 20 MHz
2K
2K
128
128
Interrupts
I/O Ports
Ports A,B,C
Ports A,B,C
Timers
Capture/Compare/PWM modules
Serial Communications
SSP
DS35008B-page 2
SSP
Preliminary
5 input channels
PIC16C62B/72A
Table of Contents
1.0 Device Overview .................................................................................................................................................... 5
2.0 Memory Organization ............................................................................................................................................. 7
3.0 I/O Ports ............................................................................................................................................................... 19
4.0 Timer0 Module ..................................................................................................................................................... 25
5.0 Timer1 Module ..................................................................................................................................................... 27
6.0 Timer2 Module ..................................................................................................................................................... 31
7.0 Capture/Compare/PWM (CCP) Module ............................................................................................................... 33
8.0 Synchronous Serial Port (SSP) Module ............................................................................................................... 39
9.0 Analog-to-Digital Converter (A/D) Module ............................................................................................................ 49
10.0 Special Features of the CPU................................................................................................................................ 55
11.0 Instruction Set Summary ...................................................................................................................................... 67
12.0 Development Support........................................................................................................................................... 75
13.0 Electrical Characteristics ...................................................................................................................................... 81
14.0 DC and AC Characteristics Graphs and Tables................................................................................................. 103
15.0 Packaging Information........................................................................................................................................ 105
Appendix A: Revision History ................................................................................................................................... 111
Appendix B: Conversion Considerations .................................................................................................................. 111
Appendix C: Migration from Base-line to Mid-Range Devices .................................................................................. 112
Index ........................................................................................................................................................................... 113
On-Line Support.......................................................................................................................................................... 117
Reader Response ....................................................................................................................................................... 118
PIC16C62B/72A Product Identification System .......................................................................................................... 119
Errata
An errata sheet may exist for current devices, describing minor operational differences (from the data sheet) and recommended
workarounds. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
Microchips Worldwide Web site; http://www.microchip.com
Your local Microchip sales office (see last page)
The Microchip Corporate Literature Center; U.S. FAX: (480) 786-7277
When contacting a sales office or the literature center, please specify which device, revision of silicon and data sheet (include literature number) you are using.
Preliminary
DS35008B-page 3
PIC16C62B/72A
NOTES:
DS35008B-page 4
Preliminary
PIC16C62B/72A
1.0
DEVICE OVERVIEW
FIGURE 1-1:
There are two devices (PIC16C62B, PIC16C72A) covered by this datasheet. The PIC16C62B does not have
the A/D module implemented.
Figure 1-1 is the block diagram for both devices. The
pinouts are listed in Table 1-1.
Data Bus
Program Counter
PORTA
RA0/AN0(2)
RA1/AN1(2)
RA2/AN2(2)
RA3/AN3/VREF(2)
RA4/T0CKI
RA5/SS/AN4(2)
EPROM
2K x 14
Program
Memory
Program
Bus
RAM
128 x 8
File
Registers
8 Level Stack
(13-bit)
14
RAM Addr(1)
PORTB
Addr MUX
Instruction reg
Direct Addr
RB0/INT
Indirect
Addr
RB7:RB1
FSR reg
STATUS reg
8
3
MUX
Power-up
Timer
Instruction
Decode &
Control
Timing
Generation
OSC1/CLKIN
OSC2/CLKOUT
Oscillator
Start-up Timer
ALU
Power-on
Reset
RC0/T1OSO/T1CKI
RC1/T1OSI
RC2/CCP1
RC3/SCK/SCL
RC4/SDI/SDA
RC5/SDO
RC6
RC7
Watchdog
Timer
Brown-out
Reset
MCLR
PORTC
W reg
VDD, VSS
Timer0
Timer1
Timer2
CCP1
Synchronous
Serial Port
A/D(2)
Preliminary
DS35008B-page 5
PIC16C62B/72A
TABLE 1-1
SOIC
Pin#
I/O/P
Type
OSC1/CLKIN
OSC2/CLKOUT
10
10
MCLR/VPP
I/P
ST
RA0/AN0(4)
I/O
TTL
RA1/AN1(4)
I/O
TTL
I/O
TTL
I/O
TTL
RA4/T0CKI
I/O
ST
RA5/SS/AN4(4)
I/O
TTL
RA5 can also be analog input 4 or the slave select for the
synchronous serial port.
Pin Name
Buffer
Type
Description
RA2/AN2(4)
RA3/AN3/VREF
(4)
21
21
I/O
TTL/ST(1)
RB1
22
22
I/O
TTL
RB2
23
23
I/O
TTL
RB3
24
24
I/O
TTL
RB4
25
25
I/O
TTL
RB5
26
26
I/O
TTL
RB6
27
27
I/O
TTL/ST(2)
RB7
28
28
I/O
TTL/ST(2)
RC0/T1OSO/T1CKI
11
11
I/O
ST
RC1/T1OSI
12
12
I/O
ST
RC2/CCP1
13
13
I/O
ST
RC3/SCK/SCL
14
14
I/O
ST
RC4/SDI/SDA
15
15
I/O
ST
RC5/SDO
16
16
I/O
ST
RC6
17
17
I/O
ST
ST
RC7
18
18
I/O
VSS
8, 19
8, 19
VDD
20
20
Legend: I = input
Note 1:
2:
3:
4:
O = output
I/O = input/output
P = power or program
= Not used
TTL = TTL input
ST = Schmitt Trigger input
This buffer is a Schmitt Trigger input when configured as the external interrupt.
This buffer is a Schmitt Trigger input when used in serial programming mode.
This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise.
The A/D module is not available on the PIC16C62B.
DS35008B-page 6
Preliminary
PIC16C62B/72A
2.0
MEMORY ORGANIZATION
FIGURE 2-1:
There are two memory blocks in each of these microcontrollers. Each block (Program Memory and Data
Memory) has its own bus, so that concurrent access
can occur.
PC<12:0>
CALL, RETURN
RETFIE, RETLW
2.1
13
Stack Level 1
User Memory
Space
Reset Vector
0000h
Interrupt Vector
0004h
0005h
On-chip Program
Memory
07FFh
0800h
1FFFh
Preliminary
DS35008B-page 7
PIC16C62B/72A
2.2
FIGURE 2-2:
RP0
File
Address
(STATUS<6:5>)
Bank0
Bank1
Bank2 (not implemented)
Bank3 (not implemented)
File
Address
00h
INDF(1)
01h
TMR0
INDF(1)
80h
OPTION_REG 81h
02h
PCL
PCL
82h
03h
STATUS
STATUS
83h
04h
FSR
FSR
84h
05h
PORTA
TRISA
85h
06h
PORTB
TRISB
86h
Note 1: Maintain this bit clear to ensure upward compatibility with future products.
07h
PORTC
TRISC
87h
08h
88h
09h
89h
0Ah
PCLATH
PCLATH
8Ah
0Bh
INTCON
INTCON
8Bh
0Ch
PIR1
PIE1
8Ch
0Dh
8Dh
0Eh
TMR1L
PCON
8Eh
0Fh
TMR1H
8Fh
10h
T1CON
90h
11h
TMR2
91h
12h
T2CON
PR2
92h
13h
SSPBUF
SSPADD
93h
14h
SSPCON
SSPSTAT
94h
15h
CCPR1L
95h
16h
CCPR1H
96h
17h
CCP1CON
97h
18h
98h
19h
99h
1Ah
9Ah
1Bh
9Bh
1Ch
9Ch
1Dh
9Dh
1Eh
ADRES(2)
9Eh
1Fh
ADCON0(2)
ADCON1(2)
9Fh
General
Purpose
Registers
A0h
C0h
2.2.1
The register file can be accessed either directly, or indirectly through the File Select Register FSR
(Section 2.5).
20h
General
Purpose
Registers
BFh
7Fh
Bank 0
FFh
Bank 1
DS35008B-page 8
Preliminary
PIC16C62B/72A
2.2.2
TABLE 2-1
Addr
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on:
POR,
BOR
Value on all
other resets
(4)
Bank 0
00h
INDF(1)
Addressing this location uses contents of FSR to address data memory (not a physical register) 0000 0000 0000 0000
01h
TMR0
02h
PCL(1)
03h
STATUS
04h
FSR(1)
(1)
IRP(5)
RP1(5)
RP0
TO
PD
DC
05h
PORTA
06h
PORTB(6,7)
07h
(6,7)
PORTC
08h-09h
(1,2)
0Ah
PCLATH
0Bh
INTCON(1)
0Ch
Unimplemented
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
ADIF
(3)
GIE
PIR1
0Dh
Unimplemented
0Eh
TMR1L
Holding register for the Least Significant Byte of the 16-bit TMR1 register
0Fh
TMR1H
Holding register for the Most Significant Byte of the 16-bit TMR1 register
10h
T1CON
11h
TMR2
12h
T2CON
13h
SSPBUF
14h
SSPCON
15h
CCPR1L
16h
CCPR1H
17h
CCP1CON
18h-1Dh
T1SYNC
TMR1CS
TMR1ON
1Eh
ADRES(3)
1Fh
ADCON0(3)
TMR2ON
SSPOV
SSPEN
CCP1X
CKP
CCP1Y
SSPM3
SSPM1
SSPM0
CCP1M2
CCP1M1
CCP1M0
Unimplemented
ADCS1
CHS1
CHS0
GO/DONE
ADON
Preliminary
DS35008B-page 9
PIC16C62B/72A
TABLE 2-1
Addr
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on:
POR,
BOR
Value on all
other resets
(4)
Bank 1
80h
INDF(1)
Addressing this location uses contents of FSR to address data memory (not a physical register) 0000 0000 0000 0000
81h
OPTION_REG
82h
PCL(1)
83h
STATUS
84h
FSR(1)
RBPU
INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
IRP
(5)
(5)
RP1
RP0
TO
DC
85h
TRISA
86h
TRISB
87h
TRISC
88h-89h
Unimplemented
(1,2)
8Ah
PCLATH
8Bh
INTCON(1)
8Ch
8Eh
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
SSPIE
CCP1IE
TMR2IE
TMR1IE
ADIE
(3)
Unimplemented
PCON
8Fh-91h
GIE
PIE1
8Dh
POR
BOR
Unimplemented
92h
PR2
93h
SSPADD
94h
SSPSTAT
95h-9Eh
9Fh
ADCON1
SMP
CKE
D/A
R/W
UA
BF
Unimplemented
(3)
PCFG2
PCFG1
PCFG0
---- -000
---- -000
DS35008B-page 10
Preliminary
PIC16C62B/72A
2.2.2.1
STATUS REGISTER
Note 1: The IRP and RP1 bits are reserved. Maintain these bits clear to ensure upward
compatibility with future products.
Note 2: The C and DC bits operate as a borrow
and digit borrow bit, respectively, in subtraction. See the SUBLW and SUBWF
instructions.
REGISTER 2-1:
R/W-0
IRP
R/W-0
RP1
R-1
TO
R-1
PD
R/W-x
Z
R/W-x
DC
bit7
bit 7:
R/W-x
C
bit0
R = Readable bit
W = Writable bit
U = Unimplemented bit,
read as 0
- n = Value at POR reset
bit 6-5: RP1:RP0: Register Bank Select bits (used for direct addressing)
01 = Bank 1 (80h - FFh)
00 = Bank 0 (00h - 7Fh)
Each bank is 128 bytes
Note: RP1 is reserved, maintain clear
bit 4:
bit 3:
bit 2:
Z: Zero bit
1 = The result of an arithmetic or logic operation is zero
0 = The result of an arithmetic or logic operation is not zero
bit 1:
DC: Digit carry/borrow bit (ADDWF, ADDLW,SUBLW,SUBWF instructions) (for borrow, the polarity is reversed)
1 = A carry-out from the 4th low order bit of the result occurred
0 = No carry-out from the 4th low order bit of the result
bit 0:
C: Carry/borrow bit (ADDWF, ADDLW,SUBLW,SUBWF instructions) (for borrow, the polarity is reversed)
1 = A carry-out from the most significant bit of the result occurred
0 = No carry-out from the most significant bit of the result occurred
Note: For borrow, the polarity is reversed. A subtraction is executed by adding the twos complement of the
second operand. For rotate (RRF, RLF) instructions, this bit is loaded with either the high or low order bit of
the source register.
Preliminary
DS35008B-page 11
PIC16C62B/72A
2.2.2.2
OPTION_REG REGISTER
Note:
REGISTER 2-2:
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
RBPU
INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
bit7
bit0
bit 7:
bit 6:
bit 5:
bit 4:
bit 3:
R = Readable bit
W = Writable bit
- n = Value at POR reset
DS35008B-page 12
TMR0 Rate
1:2
1:4
1:8
1 : 16
1 : 32
1 : 64
1 : 128
1 : 256
WDT Rate
1:1
1:2
1:4
1:8
1 : 16
1 : 32
1 : 64
1 : 128
Preliminary
PIC16C62B/72A
2.2.2.3
INTCON REGISTER
Note:
The INTCON Register is a readable and writable register, which contains various interrupt enable and flag
bits for the TMR0 register overflow, RB Port change
and External RB0/INT pin interrupts.
REGISTER 2-3:
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-x
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
bit7
bit0
R = Readable bit
W = Writable bit
- n = Value at POR reset
bit 7:
bit 6:
bit 5:
bit 4:
bit 3:
bit 2:
bit 1:
bit 0:
Preliminary
DS35008B-page 13
PIC16C62B/72A
2.2.2.4
PIE1 REGISTER
Note:
REGISTER 2-4:
U-0
R/W-0
U-0
U-0
R/W-0
R/W-0
R/W-0
R/W-0
ADIE(1)
SSPIE
CCP1IE
TMR2IE
TMR1IE
bit7
bit0
bit 7:
Unimplemented: Read as 0
bit 6:
R = Readable bit
W = Writable bit
U = Unimplemented bit,
read as 0
- n = Value at POR reset
bit 2:
bit 1:
bit 0:
Note 1: The PIC16C62B does not have an A/D module. This bit location is reserved on these devices. Always maintain this
bit clear.
DS35008B-page 14
Preliminary
PIC16C62B/72A
2.2.2.5
PIR1 REGISTER
Note:
REGISTER 2-5:
U-0
R/W-0
U-0
U-0
R/W-0
R/W-0
R/W-0
R/W-0
ADIF(1)
SSPIF
CCP1IF
TMR2IF
TMR1IF
bit7
bit0
bit 7:
Unimplemented: Read as 0
bit 6:
R = Readable bit
W = Writable bit
U = Unimplemented bit,
read as 0
- n = Value at POR reset
bit 2:
bit 1:
bit 0:
Note 1: The PIC16C62B does not have an A/D module. This bit location is reserved on these devices. Always maintain this
bit clear.
Preliminary
DS35008B-page 15
PIC16C62B/72A
2.2.2.6
PCON REGISTER
Note:
REGISTER 2-6:
U-0
U-0
U-0
U-0
U-0
U-0
R/W-0
R/W-q
POR
BOR
bit7
bit0
R = Readable bit
W = Writable bit
U = Unimplemented bit,
read as 0
- n = Value at POR reset
bit 0:
DS35008B-page 16
Preliminary
PIC16C62B/72A
2.3
2.4
STACK
Preliminary
DS35008B-page 17
PIC16C62B/72A
2.5
EXAMPLE 2-1:
The INDF register is not a physical register. Addressing INDF actually addresses the register whose
address is contained in the FSR register (FSR is a
pointer).
NEXT
;initialize pointer
; to RAM
;clear INDF register
;inc pointer
;all done?
;NO, clear next
;YES, continue
DIRECT/INDIRECT ADDRESSING
Direct Addressing
RP1:RP0
0x20
FSR
INDF
FSR
FSR,4
NEXT
CONTINUE
FIGURE 2-3:
movlw
movwf
clrf
incf
btfss
goto
Indirect Addressing
from opcode
IRP
(1)
FSR register
(1)
bank select
bank select
location select
00
00h
01
80h
10
100h
location select
11
180h
not used
(2)
(2)
Data
Memory
7Fh
Bank 0
FFh
17Fh
Bank 1
1FFh
Bank 2
Bank 3
DS35008B-page 18
Preliminary
PIC16C62B/72A
3.0
I/O PORTS
FIGURE 3-1:
Data
Bus
BLOCK DIAGRAM OF
RA3:RA0 AND RA5 PINS
Q
VDD
WR
Port
CK
Data Latch
3.1
PORTA is a 6-bit wide bi-directional port. The corresponding data direction register is TRISA. Setting a
TRISA bit (=1) will make the corresponding PORTA pin
an input, i.e., put the corresponding output driver in a
hi-impedance mode. Clearing a TRISA bit (=0) will
make the corresponding PORTA pin an output, (i.e., put
the contents of the output latch on the selected pin).
WR
TRIS
I/O pin(1)
VSS
CK
Analog
input
mode
(72A
only)
TRIS Latch
TTL
input
buffer
RD TRIS
EN
RD PORT
FIGURE 3-2:
Data
Bus
WR
PORT
BLOCK DIAGRAM OF
RA4/T0CKI PIN
D
CK
I/O pin(1)
Data Latch
WR
TRIS
CK
VSS
Schmitt
Trigger
input
buffer
TRIS Latch
RD TRIS
Q
D
EN
EN
RD PORT
TMR0 clock input
Note 1: I/O pin has protection diodes to VSS only.
Preliminary
DS35008B-page 19
PIC16C62B/72A
TABLE 3-1
PORTA FUNCTIONS
Name
Bit#
Buffer
Function
RA0/AN0
bit0
TTL
RA1/AN1
bit1
TTL
RA2/AN2
bit2
TTL
RA3/AN3/VREF
bit3
TTL
RA4/T0CKI
bit4
ST
RA5/SS/AN4
bit5
TTL
Input/output or slave select input for synchronous serial port or analog input(1)
Legend: TTL = TTL input, ST = Schmitt Trigger input
Note 1: The PIC16C62B does not implement the A/D module.
TABLE 3-2
Address Name
05h
PORTA
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
POR,
BOR
Value on all
other resets
RA5
RA4
RA3
RA2
RA1
RA0
--0x 0000
--0u 0000
RA5
RA4
RA3
RA2
RA1
RA0
--xx xxxx
--uu uuuu
--11 1111
--11 1111
---- -000
---- -000
05h
PORTA
(for PIC16C62B only)
85h
TRISA
9Fh
ADCON1(1)
PCFG2
PCFG1
PCFG0
Legend: x = unknown, u = unchanged, - = unimplemented locations read as 0. Shaded cells are not used by PORTA.
Note 1: The PIC16C62B does not implement the A/D module. Maintain this register clear.
DS35008B-page 20
Preliminary
PIC16C62B/72A
3.2
PORTB is an 8-bit wide bi-directional port. The corresponding data direction register is TRISB. Setting a
TRISB bit (=1) will make the corresponding PORTB pin
an input, (i.e., put the corresponding output driver in a
hi-impedance mode). Clearing a TRISB bit (=0) will
make the corresponding PORTB pin an output, (i.e.,
put the contents of the output latch on the selected pin).
FIGURE 3-3:
BLOCK DIAGRAM OF
RB3:RB0 PINS
VDD
RBPU(2)
Data Bus
WR Port
weak
P pull-up
Data Latch
D
Q
I/O
pin(1)
CK
TRIS Latch
D
Q
WR TRIS
b)
TTL
Input
Buffer
CK
a)
FIGURE 3-4:
BLOCK DIAGRAM OF
RB7:RB4 PINS
VDD
RD TRIS
Q
RD Port
RBPU(2)
EN
Data Bus
WR Port
RB0/INT
Schmitt Trigger
Buffer
Data Latch
D
Q
I/O
pin(1)
CK
TRIS Latch
D
Q
RD Port
weak
P pull-up
WR TRIS
TTL
Input
Buffer
CK
RD TRIS
Q
Latch
D
EN
RD Port
ST
Buffer
Q1
Set RBIF
From other
RB7:RB4 pins
D
RD Port
EN
Q3
Preliminary
DS35008B-page 21
PIC16C62B/72A
TABLE 3-3
PORTB FUNCTIONS
Name
Bit#
Buffer
Function
RB0/INT
bit0
TTL/ST(1)
Note 1: This buffer is a Schmitt Trigger input when configured as the external interrupt.
2: This buffer is a Schmitt Trigger input when used in serial programming mode.
TABLE 3-4
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on:
POR,
BOR
Value on all
other resets
06h
PORTB
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0
xxxx xxxx
uuuu uuuu
86h
TRISB
1111 1111
1111 1111
81h
OPTION_REG
1111 1111
1111 1111
INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
DS35008B-page 22
Preliminary
PIC16C62B/72A
3.3
PORTC is an 8-bit wide bi-directional port. The corresponding data direction register is TRISC. Setting a
TRISC bit (=1) will make the corresponding PORTC pin
an input, (i.e., put the corresponding output driver in a
hi-impedance mode). Clearing a TRISC bit (=0) will
make the corresponding PORTC pin an output, (i.e.,
put the contents of the output latch on the selected pin).
PORTC is multiplexed with several peripheral functions
(Table 3-5). PORTC pins have Schmitt Trigger input
buffers.
When enabling peripheral functions, care should be
taken in defining TRIS bits for each PORTC pin. Some
peripherals override the TRIS bit to make a pin an output, while other peripherals override the TRIS bit to
make a pin an input. Since the TRIS bit override maybe
in effect while the peripheral is enabled, read-modifywrite instructions (BSF, BCF, XORWF) with TRISC as
destination should be avoided. The user should refer to
the corresponding peripheral section for the correct
TRIS bit settings.
FIGURE 3-5:
PORT/PERIPHERAL Select(2)
Peripheral Data Out
Data Bus
WR
PORT
VDD
0
Q
1
CK
Data Latch
WR
TRIS
D
CK
I/O
pin(1)
Q
Q
TRIS Latch
VSS
Schmitt
Trigger
RD TRIS
Peripheral
OE(3)
RD
PORT
Peripheral input
D
EN
Preliminary
DS35008B-page 23
PIC16C62B/72A
TABLE 3-5
PORTC FUNCTIONS
Name
Bit#
RC0/T1OSO/T1CKI
bit0
Buffer
Function
Type
ST
TRISC
Override
Yes
RC1/T1OSI
bit1
ST
Yes
RC2/CCP1
bit2
ST
No
RC3/SCK/SCL
bit3
ST
RC3 can also be the synchronous serial clock for both SPI and I2C
modes.
No
RC4/SDI/SDA
bit4
ST
RC4 can also be the SPI Data In (SPI mode) or data I/O (I2C mode).
No
RC5/SDO
bit5
ST
No
RC6
bit6
ST
No
RC7
bit7
ST
No
TABLE 3-6
Address Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on:
POR,
BOR
Value on all
other resets
07h
PORTC
RC7
RC6
RC5
RC4
RC3
RC2
RC1
RC0
xxxx xxxx
uuuu uuuu
87h
TRISC
1111 1111
1111 1111
DS35008B-page 24
Preliminary
PIC16C62B/72A
4.0
TIMER0 MODULE
4.2
4.1
Timer0 Operation
Setting bit PSA will assign the prescaler to the Watchdog Timer (WDT). When the prescaler is assigned to
the WDT, prescale values of 1:1, 1:2, ..., 1:128 are
selectable.
FIGURE 4-1:
Prescaler
PSout
1
1
Programmable
Prescaler
RA4/T0CKI
pin
8
Sync with
Internal
clocks
TMR0
PSout
(TCY delay)
T0SE
3
PS2, PS1, PS0
PSA
T0CS
Set interrupt
flag bit T0IF
on overflow
Preliminary
DS35008B-page 25
PIC16C62B/72A
4.2.1
4.3
The prescaler assignment is fully under software control, (i.e., it can be changed on-the-fly during program
execution).
Note:
The TMR0 interrupt is generated when the TMR0 register overflows from FFh to 00h. This overflow sets bit
T0IF (INTCON<2>). The interrupt can be masked by
clearing bit T0IE (INTCON<5>). Bit T0IF must be
cleared in software by the Timer0 module interrupt service routine before re-enabling this interrupt. The
TMR0 interrupt cannot awaken the processor from
SLEEP since the timer is shut off during SLEEP.
FIGURE 4-2:
Timer0 Interrupt
CLKOUT (= Fosc/4)
0
RA4/T0CKI
pin
M
U
X
1
M
U
X
SYNC
2
TCY
TMR0 reg
T0SE
T0CS
PSA
Prescaler
Watchdog
Timer
8-bit Prescaler
M
U
X
8
8 - to - 1MUX
PS2:PS0
PSA
1
MUX
PSA
WDT
Time-out
Note: T0CS, T0SE, PSA, PS2:PS0 are (OPTION_REG<5:0>).
TABLE 4-1
Address
Name
01h
TMR0
0Bh,8Bh
INTCON
81h
OPTION_REG
85h
TRISA
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
PEIE
RBPU INTEDG
T0IE
INTE
RBIE
T0IF
INTF
RBIF
T0CS
T0SE
PSA
PS2
PS1
PS0
Value on:
POR,
BOR
Value on all
other resets
xxxx xxxx
uuuu uuuu
0000 000x
0000 000u
1111 1111
1111 1111
--11 1111
--11 1111
Legend: x = unknown, u = unchanged, - = unimplemented locations read as '0'. Shaded cells are not used by Timer0.
DS35008B-page 26
Preliminary
PIC16C62B/72A
5.0
TIMER1 MODULE
5.1
16-bit timer/counter
Readable and writable
Internal or external clock select
Interrupt on overflow from FFFFh to 0000h
Reset from CCP module trigger
Timer1 Operation
U-0
R/W-0
R/W-0
R/W-0
R/W-0
T1SYNC
R/W-0
R/W-0
TMR1CS TMR1ON
bit7
bit0
R = Readable bit
W = Writable bit
U = Unimplemented bit,
read as 0
- n = Value at POR reset
bit 2:
bit 1:
bit 0:
Preliminary
DS35008B-page 27
PIC16C62B/72A
FIGURE 5-1:
TMR1
TMR1H
Synchronized
clock input
TMR1L
1
TMR1ON
on/off
T1SYNC
T1OSC
RC0/T1OSO/T1CKI
RC1/T1OSI
1
T1OSCEN FOSC/4
Enable
Internal
Oscillator(1) Clock
Prescaler
1, 2, 4, 8
Synchronize
det
0
2
T1CKPS1:T1CKPS0
TMR1CS
SLEEP input
Note 1: When the T1OSCEN bit is cleared, the inverter and feedback resistor are turned off. This eliminates power drain.
DS35008B-page 28
Preliminary
PIC16C62B/72A
5.2
5.3
Timer1 Oscillator
Timer1 Interrupt
5.4
TABLE 5-1
Note:
Osc Type
Freq
C1
C2
LP
32 kHz
100 kHz
200 kHz
33 pF
15 pF
15 pF
33 pF
15 pF
15 pF
Timer1 must be configured for either timer or synchronized counter mode to take advantage of this feature. If
Timer1 is running in asynchronous counter mode, this
reset operation may not work.
In the event that a write to Timer1 coincides with a special event trigger from CCP1, the write will take precedence.
Crystals Tested:
32.768 kHz Epson C-001R32.768K-A 20 PPM
100 kHz
Epson C-2 100.00 KC-P
20 PPM
200 kHz
STD XTL 200.000 kHz
20 PPM
Note 1: Higher capacitance increases the stability
of oscillator but also increases the start-up
time.
2: Since each resonator/crystal has its own
characteristics, the user should consult the
resonator/crystal manufacturer for appropriate values of external components.
TABLE 5-2
In this mode of operation, the CCPR1H:CCPR1L registers pair effectively becomes the period register for
Timer1.
Value on
all other
resets
Address Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0Bh,8Bh
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0Ch
PIR1
ADIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
8Ch
PIE1
ADIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
0Eh
TMR1L
Holding register for the Least Significant Byte of the 16-bit TMR1 register
0Fh
TMR1H
Holding register for the Most Significant Byte of the 16-bit TMR1 register
10h
T1CON
Legend:
x = unknown, u = unchanged, - = unimplemented read as '0'. Shaded cells are not used by the Timer1 module.
T1CKPS1 T1CKPS0 T1OSCEN T1SYNC TMR1CS TMR1ON --00 0000 --uu uuuu
Preliminary
DS35008B-page 29
PIC16C62B/72A
NOTES:
DS35008B-page 30
Preliminary
PIC16C62B/72A
6.0
TIMER2 MODULE
FIGURE 6-1:
Sets flag
bit TMR2IF
TMR2
output (1)
Reset
Postscaler
1:1 to 1:16
EQ
TMR2 reg
Comparator
Prescaler
1:1, 1:4, 1:16
FOSC/4
PR2 reg
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
T2CKPS1 T2CKPS0
bit7
bit0
bit 7:
bit 6-3:
bit 2:
bit 1-0:
Preliminary
R = Readable bit
W = Writable bit
U = Unimplemented bit,
read as 0
- n = Value at POR reset
DS35008B-page 31
PIC16C62B/72A
6.1
Timer2 Operation
6.2
Timer2 Interrupt
6.3
Output of TMR2
TABLE 6-1
Value on
all other
resets
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0Bh,8Bh
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0Ch
PIR1
ADIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
8Ch
PIE1
ADIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
11h
TMR2
12h
T2CON
92h
PR2
Legend:
x = unknown, u = unchanged, - = unimplemented read as '0'. Shaded cells are not used by the Timer2 module.
DS35008B-page 32
Preliminary
PIC16C62B/72A
7.0
CAPTURE/COMPARE/PWM
(CCP) MODULE
TABLE 7-1
Capture/Compare/PWM Register 1 (CCPR1) is comprised of two 8-bit registers: CCPR1L (low byte) and
CCPR1H (high byte). The CCP1CON register controls
the operation of CCP1. All are readable and writable.
TABLE 7-2
CCP Mode
Timer Resource
Capture
Compare
PWM
Timer1
Timer1
Timer2
Interaction
Capture
Capture
Capture
Compare
The compare should be configured for the special event trigger, which clears TMR1.
Compare
Compare
The compare(s) should be configured for the special event trigger, which clears TMR1.
PWM
PWM
The PWMs will have the same frequency and update rate (TMR2 interrupt).
PWM
Capture
None.
PWM
Compare
None.
bit7
U-0
R/W-0
R/W-0
R/W-0
CCP1X CCP1Y CCP1M3
R/W-0
CCP1M2
R/W-0
R/W-0
CCP1M1 CCP1M0
bit0
R = Readable bit
W = Writable bit
U = Unimplemented bit, read
as 0
- n =Value at POR reset
Preliminary
DS35008B-page 33
PIC16C62B/72A
7.1
Capture Mode
7.1.4
FIGURE 7-1:
Prescaler
1, 4, 16
RC2/CCP1
Pin
CCPR1H
and
edge detect
CCP PRESCALER
EXAMPLE 7-1:
CHANGING BETWEEN
CAPTURE PRESCALERS
CLRF
MOVLW
CCP1CON
NEW_CAPT_PS
MOVWF
CCP1CON
CCPR1L
Capture
Enable
TMR1H
TMR1L
CCP1CON<3:0>
Qs
7.1.1
In Capture mode, the RC2/CCP1 pin should be configured as an input by setting the TRISC<2> bit.
Note:
7.1.2
If the RC2/CCP1 is configured as an output, a write to the port can cause a capture
condition.
TIMER1 MODE SELECTION
SOFTWARE INTERRUPT
DS35008B-page 34
Preliminary
PIC16C62B/72A
7.2
7.2.1
Compare Mode
FIGURE 7-2:
COMPARE MODE
OPERATION BLOCK
DIAGRAM
Timer1 must be running in Timer mode or Synchronized Counter mode if the CCP module is using the
compare feature. In Asynchronous Counter mode, the
compare operation may not work.
7.2.4
Address
Note:
7.2.3
TABLE 7-3
The user must configure the RC2/CCP1 pin as an output by clearing the TRISC<2> bit.
7.2.2
Comparator
TMR1H
TMR1L
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
all other
resets
0Bh,8Bh
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
0Ch
PIR1
ADIF
SSPIF
CCP1IF
TMR2IF
8Ch
PIE1
ADIE
SSPIE
CCP1IE
TMR2IE
87h
TRISC
0Eh
TMR1L
Holding register for the Least Significant Byte of the 16-bit TMR1 register
0Fh
TMR1H
Holding register for the Most Significant Byte of the 16-bit TMR1register
10h
T1CON
15h
CCPR1L
16h
CCPR1H
17h
Legend:
CCP1CON
RBIF
Value on
POR,
BOR
T1CKPS1 T1CKPS0 T1OSCEN T1SYNC TMR1CS TMR1ON --00 0000 --uu uuuu
CCP1X
CCP1Y
CCP1M3
x = unknown, u = unchanged, - = unimplemented read as 0. Shaded cells are not used by Capture and Timer1.
Preliminary
DS35008B-page 35
PIC16C62B/72A
7.3
PWM Mode
7.3.1
FIGURE 7-3:
PWM PERIOD
The PWM period is specified by writing to the PR2 register. The PWM period can be calculated using the following formula:
PWM period = [(PR2) + 1] 4 TOSC
(TMR2 prescale value)
PWM frequency is defined as 1 / [PWM period].
When TMR2 is equal to PR2, the following three events
occur on the next increment cycle:
TMR2 is cleared
The CCP1 pin is set (exception: if PWM duty
cycle = 0%, the CCP1 pin will not be set)
The PWM duty cycle is latched from CCPR1L into
CCPR1H
Note:
CCP1CON<5:4>
CCPR1L
7.3.2
CCPR1H (Slave)
Comparator
Q
RC2/CCP1
TMR2
(Note 1)
S
Clear Timer,
CCP1 pin and
latch D.C.
PR2
PWM OUTPUT
FIGURE 7-4:
PWM ON-TIME
TRISC<2>
Comparator
Period
log (
Resolution =
On-Time
Fosc
Fpwm )
bits
log(2)
TMR2 = PR2
Note:
TMR2 = Duty Cycle
TMR2 = PR2
DS35008B-page 36
Preliminary
PIC16C62B/72A
7.3.3
TABLE 7-4
1.22 kHz 4.88 kHz 19.53 kHz 78.12 kHz 156.3 kHz 208.3 kHz
TABLE 7-5
16
0xFF
10
4
0xFF
10
1
0xFF
10
1
0x3F
8
1
0x1F
7
1
0x17
5.5
Value on
all other
resets
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0Bh,8Bh
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0Ch
PIR1
ADIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
8Ch
PIE1
ADIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
87h
TRISC
11h
TMR2
92h
PR2
12h
T2CON
15h
CCPR1L
16h
CCPR1H
17h
Legend:
CCP1CON
TOUTPS3 TOUTPS2 TOUTPS1 TOUTPS0 TMR2ON T2CKPS1 T2CKPS0 -000 0000 -000 0000
CCP1X
CCP1Y
x = unknown, u = unchanged, - = unimplemented read as '0'. Shaded cells are not used by PWM and Timer2.
Preliminary
DS35008B-page 37
PIC16C62B/72A
NOTES:
DS35008B-page 38
Preliminary
PIC16C62B/72A
8.0
8.1
8.2
ister, and then set bit SSPEN. This configures the SDI,
SDO, SCK and SS pins as serial port pins. For the pins
to behave as the serial port function, they must have
their data direction bits (in the TRISC register) appropriately programmed. That is:
SDI must have TRISC<4> set
SDO must have TRISC<5> cleared
SCK (master operation) must have TRISC<3>
cleared
SCK (Slave mode) must have TRISC<3> set
SS must have TRISA<5> set (if used)
Note:
Note:
SPI Mode
This section contains register definitions and operational characteristics of the SPI module.
FIGURE 8-1:
Write
SSPBUF reg
SSPSR reg
RC4/SDI/SDA
Shift
Clock
bit0
RC5/SDO
SS Control
Enable
RA5/SS/AN4
Edge
Select
2
Clock Select
SSPM3:SSPM0
4
Edge
Select
RC3/SCK/
SCL
TMR2 output
2
Prescaler TCY
4, 16, 64
TRISC<3>
Preliminary
DS35008B-page 39
PIC16C62B/72A
TABLE 8-1
Value on
all other
resets
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0Bh,8Bh
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0Ch
PIR1
ADIF
SSPIF
PIE1
ADIE
SSPIE
8Ch
13h
SSPBUF
14h
SSPCON WCOL
94h
SSPSTAT
85h
TRISA
87h
TRISC
SSPOV SSPEN
SMP
CKE
D/A
CKP
SSPM3
SSPM2
SSPM1
SSPM0
R/W
UA
BF
Legend: x = unknown, u = unchanged, - = unimplemented read as '0'. Shaded cells are not used by the SSP in SPI mode.
DS35008B-page 40
Preliminary
PIC16C62B/72A
8.3
SSP I 2C Operation
FIGURE 8-2:
SSPSR reg
MSb
LSb
Match detect
Addr Match
SSPADD reg
Start and
Stop bit detect
Set, Reset
S, P bits
(SSPSTAT reg)
a)
b)
SLAVE MODE
In slave mode, the SCL and SDA pins must be configured as inputs (TRISC<4:3> set). The SSP module will
override the input state with the output data when
required (slave-transmitter).
shift
clock
RC4/
SDI/
SDA
8.3.1
Write
SSPBUF reg
RC3/SCK/SCL
Internal
Data Bus
Read
The SSPCON register allows control of the I 2C operation. Four mode selection bits (SSPCON<3:0>) allow
one of the following I 2C modes to be selected:
Preliminary
DS35008B-page 41
PIC16C62B/72A
8.3.1.1
ADDRESSING
TABLE 8-2
3.
4.
5.
6.
7.
8.
9.
BF
SSPOV
SSPSR SSPBUF
Generate ACK
Pulse
Yes
Yes
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
Note: Shaded cells show the conditions where the user software did not properly clear the overflow condition.
DS35008B-page 42
Preliminary
PIC16C62B/72A
8.3.1.2
RECEPTION
FIGURE 8-3:
Receiving Address
Receiving Data
R/W=0
Receiving Data
ACK
ACK
ACK
A7 A6 A5 A4 A3 A2 A1
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1 D0
SDA
SCL
SSPIF (PIR1<3>)
BF (SSPSTAT<0>)
Cleared in software
Bus Master
terminates
transfer
SSPOV (SSPCON<6>)
Bit SSPOV is set because the SSPBUF register is still full.
ACK is not sent.
Preliminary
DS35008B-page 43
PIC16C62B/72A
8.3.1.3
TRANSMISSION
Receiving Address
SCL
A7
As a slave-transmitter, the ACK pulse from the masterreceiver is latched on the rising edge of the ninth SCL
input pulse. If the SDA line was high (not ACK), then the
data transfer is complete. When the ACK is latched by
the slave, the slave logic is reset (resets SSPSTAT register) and the slave then monitors for another occurrence of the START bit. If the SDA line was low (ACK),
the transmit data must be loaded into the SSPBUF register, which also loads the SSPSR register. Then pin
RC3/SCK/SCL should be enabled by setting bit CKP.
FIGURE 8-4:
SDA
A6
1
2
Data in
sampled
R/W = 1
A5
A4
A3
A2
A1
ACK
Transmitting Data
ACK
D7
1
SCL held low
while CPU
responds to SSPIF
D6
D5
D4
D3
D2
D1
D0
cleared in software
SSPIF (PIR1<3>)
BF (SSPSTAT<0>)
CKP (SSPCON<4>)
Set bit after writing to SSPBUF
(the SSPBUF must be written-to
before the CKP bit can be set)
DS35008B-page 44
Preliminary
PIC16C62B/72A
8.3.2
8.3.3
MASTER OPERATION
MULTI-MASTER OPERATION
Master operation is supported in firmware using interrupt generation on the detection of the START and
STOP conditions. The STOP (P) and START (S) bits
are cleared by a reset or when the SSP module is disabled. The STOP (P) and START (S) bits will toggle
based on the START and STOP conditions. Control of
the I 2C bus may be taken when the P bit is set, or the
bus is idle and both the S and P bits are clear.
In master operation, the SCL and SDA lines are manipulated in software by clearing the corresponding
TRISC<4:3> bit(s). The output level is always low, irrespective of the value(s) in PORTC<4:3>. So when
transmitting data, a 1 data bit must have the
TRISC<4> bit set (input) and a 0 data bit must have
the TRISC<4> bit cleared (output). The same scenario
is true for the SCL line with the TRISC<3> bit.
In multi-master operation, the SDA line must be monitored to see if the signal level is the expected output
level. This check only needs to be done when a high
level is output. If a high level is expected and a low level
is present, the device needs to release the SDA and
SCL lines (set TRISC<4:3>). There are two stages
where this arbitration can be lost, these are:
Address Transfer
Data Transfer
START condition
STOP condition
Byte transfer completed
TABLE 8-3
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
POR,
BOR
Value on
all other
resets
0Bh, 8Bh
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
0Ch
PIR1
ADIF
-0-- 0000
-0-- 0000
8Ch
PIE1
ADIE
-0-- 0000
-0-- 0000
13h
xxxx xxxx
uuuu uuuu
93h
0000 0000
0000 0000
14h
SSPCON
WCOL
SSPOV SSPEN
0000 0000
0000 0000
94h
SSPSTAT
SMP(1)
CKE(1)
0000 0000
0000 0000
87h
TRISC
1111 1111
1111 1111
D/A
CKP
P
R/W
UA
BF
Preliminary
DS35008B-page 45
PIC16C62B/72A
REGISTER 8-1:
R/W-0 R/W-0
SMP
CKE
R-0
R-0
R-0
R-0
R-0
R-0
D/A
R/W
UA
BF
bit7
bit0
R = Readable bit
W = Writable bit
U = Unimplemented bit, read
as 0
- n =Value at POR reset
bit 7:
bit 6:
bit 5:
bit 4:
P: Stop bit (I2C mode only. This bit is cleared when the SSP module is disabled, or when the Start bit is
detected last, SSPEN is cleared)
1 = Indicates that a stop bit has been detected last (this bit is '0' on RESET)
0 = Stop bit was not detected last
bit 3:
S: Start bit (I2C mode only. This bit is cleared when the SSP module is disabled, or when the Stop bit is
detected last, SSPEN is cleared)
1 = Indicates that a start bit has been detected last (this bit is '0' on RESET)
0 = Start bit was not detected last
bit 2:
bit 1:
bit 0:
DS35008B-page 46
Preliminary
PIC16C62B/72A
REGISTER 8-2:
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
WCOL
SSPOV
SSPEN
CKP
SSPM3
SSPM2
SSPM1
SSPM0
bit7
bit0
R = Readable bit
W = Writable bit
U = Unimplemented bit, read
as 0
- n =Value at POR reset
bit 7:
bit 6:
bit 5:
bit 4:
Preliminary
DS35008B-page 47
PIC16C62B/72A
NOTES:
DS35008B-page 48
Preliminary
PIC16C62B/72A
9.0
Note:
ANALOG-TO-DIGITAL
CONVERTER (A/D) MODULE
This section applies to the PIC16C72A
only.
R/W-0
CHS2
R/W-0
CHS1
R/W-0
CHS0
R/W-0
GO/DONE
U-0
R/W-0
ADON
bit0
R = Readable bit
W = Writable bit
U = Unimplemented bit,
read as 0
- n = Value at POR reset
bit 1:
bit 0:
Preliminary
DS35008B-page 49
PIC16C62B/72A
REGISTER 9-2:ADCON1 REGISTER (ADDRESS 9Fh)
U-0
bit7
U-0
U-0
U-0
U-0
R/W-0
PCFG2
R/W-0
PCFG1
R/W-0
PCFG0
bit0
R = Readable bit
W = Writable bit
U = Unimplemented bit,
read as 0
- n = Value at POR
reset
RA0
A
A
A
A
A
A
D
RA1
A
A
A
A
A
A
D
RA2
A
A
A
A
D
D
D
RA5
A
A
A
A
D
D
D
RA3
A
VREF
A
VREF
A
VREF
D
VREF
VDD
RA3
VDD
RA3
VDD
RA3
VDD
A = Analog input
D = Digital I/O
DS35008B-page 50
Preliminary
PIC16C62B/72A
When the A/D conversion is complete, the result is
loaded into the ADRES register, the GO/DONE bit,
ADCON0<2>, is cleared, and the A/D interrupt flag bit,
ADIF, is set. The block diagram of the A/D module is
shown in Figure 9-1.
1.
2.
3.
4.
5.
6.
7.
FIGURE 9-1:
100
RA5/AN4
VIN
011
(Input voltage)
RA3/AN3/VREF
010
RA2/AN2
A/D
Converter
001
RA1/AN1
000
VDD
000
010
100
11x
001
011
101
VREF
(Reference
voltage)
RA0/AN0
or
or
or
or
or
PCFG2:PCFG0
Preliminary
DS35008B-page 51
PIC16C62B/72A
9.1
When the conversion is started, the holding capacitor is disconnected from the
input pin.
In general;
= 10k
Assuming RS
Vdd
FIGURE 9-2:
Rs
ANx
CPIN
5 pF
VA
Sampling
Switch
VT = 0.6V
VT = 0.6V
RIC 1k
SS
RSS
CHOLD
= DAC capacitance
= 51.2 pF
I leakage
500 nA
VSS
Legend CPIN
= input capacitance
VT
= threshold voltage
I leakage = leakage current at the pin due to
various junctions
RIC
SS
CHOLD
= interconnect resistance
= sampling switch
= sample/hold capacitance (from DAC)
VDD
6V
5V
4V
3V
2V
5 6 7 8 9 10 11
RSS
(k)
EQUATION 9-1:
TACQ
ACQUISITION TIME
TAMP + TC + TCOFF
TAMP = 5S
TC = - (51.2pF)(1k + RSS + RS) In(1/511)
TCOFF = (Temp -25C)(0.05S/C)
DS35008B-page 52
Preliminary
PIC16C62B/72A
9.2
2TOSC
8TOSC
32TOSC
Internal RC oscillator
The ADCON1 and TRISA registers control the operation of the A/D port pins. The port pins that are desired
as analog inputs must have their corresponding TRIS
bits set (input). If the TRIS bit is cleared (output), the
digital output level (VOH or VOL) will be converted.
ADCS1:ADCS0
2TOSC
00
8TOSC
01
32TOSC
TABLE 9-1
9.3
10
Device Frequency
20 MHz
100
ns(2)
ns(2)
400
1.6 s
5 MHz
ns(2)
400
1.6 s
6.4 s
1.25 MHz
333.33 kHz
1.6 s
6 s
6.4 s
24 s(3)
25.6
s(3)
96 s(3)
2 - 6 s(1,4)
2 - 6 s(1,4)
2 - 6 s(1)
2 - 6 s(1,4)
Shaded cells are outside of recommended range.
The RC source has a typical TAD time of 4 s.
These values violate the minimum required TAD time.
For faster conversion times, the selection of another clock source is recommended.
When device frequency is greater than 1 MHz, the RC A/D conversion clock source is recommended for
sleep operation only.
5: For extended voltage devices (LC), please refer to Electrical Specifications section.
RC(5)
Legend:
Note 1:
2:
3:
4:
11
Preliminary
DS35008B-page 53
PIC16C62B/72A
9.4
Note:
9.5
A/D Conversions
TABLE 9-2
Address Name
0Bh,8Bh
INTCON
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
POR,
BOR
Value on all
other Resets
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
ADIF
SSPIF
CCP1IF
-0-- 0000
ADIE
SSPIE
CCP1IE
-0-- 0000
xxxx xxxx
uuuu uuuu
CHS2
CHS1
CHS0
GO/DONE
ADON
0000 00-0
0000 00-0
PCFG2
PCFG1
PCFG0
---- -000
---- -000
RA0
--0x 0000
--0u 0000
--11 1111
--11 1111
0Ch
PIR1
8Ch
PIE1
1Eh
ADRES
1Fh
9Fh
ADCON1
05h
PORTA
85h
TRISA
RA5
RA4
RA3
RA2
RA1
Legend: x = unknown, u = unchanged, - = unimplemented read as '0'. Shaded cells are not used for A/D conversion.
DS35008B-page 54
Preliminary
PIC16C62B/72A
10.0
10.1
Configuration Bits
CP0
CP1
CP0
CP1
CP0
BODEN
CP1
CP0
PWRTE
bit13
WDTE
FOSC1
FOSC0
bit0
bit 13-8
5-4:
bit 7:
Unimplemented: Read as 1
bit 6:
bit 3:
bit 2:
bit 1-0:
Register:
Address:
CONFIG
2007h
Note 1: Enabling Brown-out Reset automatically enables Power-up Timer (PWRT), regardless of the value of bit PWRTE.
All of the CP1:CP0 pairs must be given the same value to enable the code protection scheme listed.
Preliminary
DS35008B-page 55
PIC16C62B/72A
10.2
Oscillator Configurations
10.2.1
OSCILLATOR TYPES
TABLE 10-1
Ranges Tested:
The PIC16CXXX can be operated in four different oscillator modes. The user can program two configuration
bits (FOSC1 and FOSC0) to select one of these four
modes:
LP
XT
HS
RC
10.2.2
455 kHz
2.0 MHz
4.0 MHz
8.0 MHz
16.0 MHz
OSC2
To
internal
logic
Note1: See Table 10-1 and Table 10-2 for recommended values of C1 and C2.
2: A series resistor (RS) may be required for
AT strip cut crystals.
3: RF varies with the crystal chosen.
Clock from
ext. system
PIC16CXXX
Open
OSC2
Preliminary
0.3%
0.5%
0.5%
0.5%
0.5%
Osc Type
Crystal
Freq
Cap. Range
C1
Cap. Range
C2
LP
32 kHz
33 pF
33 pF
XT
HS
200 kHz
15 pF
15 pF
200 kHz
47-68 pF
47-68 pF
1 MHz
15 pF
15 pF
4 MHz
15 pF
15 pF
4 MHz
15 pF
15 pF
8 MHz
15-33 pF
15-33 pF
20 MHz
15-33 pF
15-33 pF
PIC16CXXX
C2(1)
Panasonic EFO-A455K04B
Murata Erie CSA2.00MG
Murata Erie CSA4.00MG
Murata Erie CSA8.00MT
Murata Erie CSA16.00MX
TABLE 10-2
SLEEP
RS(2)
OSC2
68 - 100 pF
15 - 68 pF
15 - 68 pF
10 - 68 pF
10 - 22 pF
OSC1
RF(3)
OSC1
68 - 100 pF
15 - 68 pF
15 - 68 pF
10 - 68 pF
10 - 22 pF
Resonators Used:
XTAL
Freq
455 kHz
2.0 MHz
4.0 MHz
8.0 MHz
16.0 MHz
DS35008B-page 56
Mode
XT
HS
CRYSTAL OSCILLATOR/CERAMIC
RESONATORS
C1(1)
CERAMIC RESONATORS
Crystals Used
32 kHz
Epson C-001R32.768K-A
20 PPM
200 kHz
20 PPM
1 MHz
ECS ECS-10-13-1
50 PPM
4 MHz
ECS ECS-40-20-1
50 PPM
8 MHz
30 PPM
20 MHz
30 PPM
Note 1:
PIC16C62B/72A
10.2.3
RC OSCILLATOR
10.3
Internal
clock
PIC16CXX
VSS
Fosc/4
Recommended values:
OSC2/CLKOUT
3 k Rext 100 k
Cext > 20pF
Reset
Preliminary
DS35008B-page 57
PIC16C62B/72A
FIGURE 10-5: SIMPLIFIED BLOCK DIAGRAM OF ON-CHIP RESET CIRCUIT
External
Reset
MCLR
WDT
Module
SLEEP
WDT
Time-out
Reset
VDD rise
detect
Power-on Reset
VDD
Brown-out
Reset
BODEN
OST/PWRT
OST
Chip_Reset
R
OSC1
(1)
On-chip
RC OSC
PWRT
10-bit Ripple counter
Enable PWRT
Enable OST
Note 1:
DS35008B-page 58
Preliminary
PIC16C62B/72A
10.4
10.5
10.6
R
R1
10.7
MCLR
C
PIC16CXX
Preliminary
DS35008B-page 59
PIC16C62B/72A
10.8
Time-out Sequence
10.9
Status Register
IRP
RP1
RP0
TO
PD
DC
POR
BOR
PCON Register
TABLE 10-3
Oscillator Configuration
Brown-out
Wake-up from
SLEEP
PWRTE = 0
PWRTE = 1
XT, HS, LP
72 ms + 1024TOSC
1024TOSC
72 ms + 1024TOSC
1024TOSC
RC
72 ms
72 ms
TABLE 10-4
POR
BOR
TO
PD
Power-on Reset
Brown-out Reset
WDT Reset
WDT Wake-up
TABLE 10-5
STATUS
Register
PCON
Register
Power-on Reset
000h
0001 1xxx
---- --0x
000h
000u uuuu
---- --uu
000h
0001 0uuu
---- --uu
WDT Reset
000h
0000 1uuu
---- --uu
PC + 1
uuu0 0uuu
---- --uu
000h
0001 1uuu
---- --u0
uuu1 0uuu
---- --uu
Condition
WDT Wake-up
Brown-out Reset
Interrupt wake-up from SLEEP
PC +
1(1)
When the wake-up is due to an interrupt and the GIE bit is set, the PC is loaded with the interrupt vector (0004h).
DS35008B-page 60
Preliminary
PIC16C62B/72A
TABLE 10-6
Register
Power-on Reset,
Brown-out Reset
MCLR Resets
WDT Reset
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
INDF
62B
72A
N/A
N/A
N/A
TMR0
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
PCL
62B
72A
0000h
0000h
PC + 1(2)
STATUS
62B
72A
0001 1xxx
000q quuu(3)
uuuq quuu(3)
FSR
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
PORTA(4)
62B
72A
--0x 0000
--0u 0000
--uu uuuu
PORTB(5)
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
PORTC(5)
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
PCLATH
62B
72A
---0 0000
---0 0000
---u uuuu
INTCON
62B
72A
0000 000x
0000 000u
uuuu uuuu(1)
62B
72A
---- 0000
---- 0000
---- uuuu(1)
62B
72A
-0-- 0000
-0-- 0000
-u-- uuuu(1)
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
PIR1
TMR1L
TMR1H
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
T1CON
62B
72A
--00 0000
--uu uuuu
--uu uuuu
TMR2
62B
72A
0000 0000
0000 0000
uuuu uuuu
T2CON
62B
72A
-000 0000
-000 0000
-uuu uuuu
SSPBUF
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
SSPCON
62B
72A
0000 0000
0000 0000
uuuu uuuu
CCPR1L
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
CCPR1H
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
CCP1CON
62B
72A
--00 0000
--00 0000
--uu uuuu
ADRES
62B
72A
xxxx xxxx
uuuu uuuu
uuuu uuuu
ADCON0
62B
72A
0000 00-0
0000 00-0
uuuu uu-u
OPTION_REG
62B
72A
1111 1111
1111 1111
uuuu uuuu
TRISA
62B
72A
--11 1111
--11 1111
--uu uuuu
TRISB
62B
72A
1111 1111
1111 1111
uuuu uuuu
TRISC
62B
72A
1111 1111
1111 1111
uuuu uuuu
62B
72A
---- 0000
---- 0000
---- uuuu
PIE1
62B
72A
-0-- 0000
-0-- 0000
-u-- uuuu
PCON
62B
72A
---- --0q
---- --uq
---- --uq
PR2
62B
72A
1111 1111
1111 1111
1111 1111
SSPADD
62B
72A
0000 0000
0000 0000
uuuu uuuu
SSPSTAT
62B
72A
0000 0000
0000 0000
uuuu uuuu
ADCON1
62B
72A
---- -000
---- -000
---- -uuu
Legend:
Note 1:
2:
3:
4:
5:
Preliminary
DS35008B-page 61
PIC16C62B/72A
10.10
Interrupts
The peripheral interrupt flags are contained in the special function registers PIR1 and PIR2. The corresponding interrupt enable bits are contained in special
function registers PIE1 and PIE2, and the peripheral
interrupt enable bit is contained in special function register INTCON.
The interrupt control register (INTCON) records individual interrupt requests in flag bits. It also has individual
and global interrupt enable bits.
Note:
Individual interrupt flag bits are set regardless of the status of their corresponding
mask bit or the GIE bit.
T0IF
T0IE
INTF
INTE
ADIF(1)
ADIE(1)
SSPIF
SSPIE
CCP1IF
CCP1IE
Interrupt to CPU
RBIF
RBIE
PEIE
GIE
TMR2IF
TMR2IE
TMR1IF
TMR1IE
DS35008B-page 62
Preliminary
PIC16C62B/72A
10.10.1 INT INTERRUPT
10.11
The external interrupt on RB0/INT pin is edge triggered: either rising, if bit INTEDG (OPTION_REG<6>)
is set, or falling, if the INTEDG bit is clear. When a valid
edge appears on the RB0/INT pin, flag bit INTF
(INTCON<1>) is set. This interrupt can be disabled by
clearing enable bit INTE (INTCON<4>). Flag bit INTF
must be cleared in software in the interrupt service routine before re-enabling this interrupt. The INT interrupt
can wake-up the processor from SLEEP, if bit INTE was
set prior to going into SLEEP. The status of global interrupt enable bit GIE decides whether or not the processor branches to the interrupt vector following wake-up.
See Section 10.13 for details on SLEEP mode.
W_TEMP
STATUS,W
STATUS
STATUS_TEMP
;Copy
;Swap
;bank
;Save
STATUS_TEMP,W
MOVWF
SWAPF
SWAPF
STATUS
W_TEMP,F
W_TEMP,W
Preliminary
DS35008B-page 63
PIC16C62B/72A
10.12
The Watchdog Timer is a free running on-chip RC oscillator which does not require any external components.
This RC oscillator is separate from the RC oscillator of
the OSC1/CLKIN pin. The WDT will run, even if the
clock on the OSC1/CLKIN and OSC2/CLKOUT pins of
the device has been stopped, for example, by execution
of a SLEEP instruction.
During normal operation, a WDT time-out generates a
device RESET (Watchdog Timer Reset). If the device is
in SLEEP mode, a WDT time-out causes the device to
wake-up and continue with normal operation (Watchdog Timer Wake-up). The TO bit in the STATUS register
will be cleared upon a Watchdog Timer time-out.
Note:
Note:
Postscaler
M
U
X
8
8 - to - 1 MUX
PS2:PS0
PSA
WDT
Enable Bit
1
MUX
PSA
WDT
Time-out
Name
2007h
Config. bits
81h
OPTION_REG
Bit 7
RBPU
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
BODEN
CP1
CP0
PWRTE
WDTE
FOSC1
FOSC0
INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
DS35008B-page 64
Preliminary
PIC16C62B/72A
10.13
4.
5.
6.
Other peripherals cannot generate interrupts since during SLEEP, no on-chip clocks are present.
When the SLEEP instruction is being executed, the next
instruction (PC + 1) is pre-fetched. For the device to
wake-up through an interrupt event, the corresponding
interrupt enable bit must be set (enabled). Wake-up is
Preliminary
DS35008B-page 65
PIC16C62B/72A
FIGURE 10-10: WAKE-UP FROM SLEEP THROUGH INTERRUPT
Q1 Q2 Q3 Q4
Q1 Q2 Q3 Q4
Q1
Q1 Q2 Q3 Q4
Q1 Q2 Q3 Q4
Q1 Q2 Q3 Q4
Q1 Q2 Q3
Q4
OSC1
TOST(2)
CLKOUT(4)
INT pin
INTF flag
(INTCON<1>)
Interrupt Latency
(Note 2)
GIE bit
(INTCON<7>)
Processor in
SLEEP
INSTRUCTION FLOW
PC
PC
Instruction
fetched
Inst(PC) = SLEEP
Instruction
executed
Inst(PC - 1)
Note 1:
2:
3:
4:
10.14
PC+1
PC+2
PC+2
Inst(PC + 1)
Inst(PC + 2)
SLEEP
Inst(PC + 1)
PC + 2
Dummy cycle
0004h
0005h
Inst(0004h)
Inst(0005h)
Dummy cycle
Inst(0004h)
10.15
ID Locations
10.16
PIC16CXXX microcontrollers can be serially programmed while in the end application circuit. This is
simply done with two lines for clock and data, and three
more lines for power, ground and the programming voltage. This allows customers to manufacture boards with
unprogrammed devices, and then program the microcontroller just before shipping the product. This also
allows the most recent firmware or a custom firmware
to be programmed.
For complete details of serial programming, please
refer to the In-Circuit Serial Programming (ICSP)
Guide, DS30277.
DS35008B-page 66
Preliminary
PIC16C62B/72A
11.0
TABLE 11-1
Description
Program Counter
PC
d = 0 for destination W
d = 1 for destination f
f = 7-bit file register address
OPCODE FIELD
DESCRIPTIONS
Field
OPCODE
0
k (literal)
TO
Time-out bit
PD
Power-down bit
Zero bit
DC
OPCODE
Carry bit
11
10
0
k (literal)
All instructions are executed within one single instruction cycle, unless a conditional test is true or the program counter is changed as a result of an instruction.
In this case, the execution takes two instruction cycles
with the second cycle executed as a NOP. One instruction cycle consists of four oscillator periods. Thus, for
an oscillator frequency of 4 MHz, the normal instruction
Preliminary
DS35008B-page 67
PIC16C62B/72A
TABLE 11-2
Mnemonic,
Operands
Description
Cycles
14-Bit Opcode
MSb
LSb
Status
Affected
Notes
f, d
f, d
f
f, d
f, d
f, d
f, d
f, d
f, d
f, d
f
f, d
f, d
f, d
f, d
f, d
Add W and f
AND W with f
Clear f
Clear W
Complement f
Decrement f
Decrement f, Skip if 0
Increment f
Increment f, Skip if 0
Inclusive OR W with f
Move f
Move W to f
No Operation
Rotate Left f through Carry
Rotate Right f through Carry
Subtract W from f
Swap nibbles in f
Exclusive OR W with f
1
1
1
1
1
1
1(2)
1
1(2)
1
1
1
1
1
1
1
1
1
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
0111
0101
0001
0001
1001
0011
1011
1010
1111
0100
1000
0000
0000
1101
1100
0010
1110
0110
dfff
dfff
lfff
0000
dfff
dfff
dfff
dfff
dfff
dfff
dfff
lfff
0xx0
dfff
dfff
dfff
dfff
dfff
ffff
ffff
ffff
0011
ffff
ffff
ffff
ffff
ffff
ffff
ffff
ffff
0000
ffff
ffff
ffff
ffff
ffff
C,DC,Z
Z
Z
Z
Z
Z
Z
Z
Z
C
C
C,DC,Z
Z
1,2
1,2
2
1,2
1,2
1,2,3
1,2
1,2,3
1,2
1,2
1,2
1,2
1,2
1,2
1,2
f, b
f, b
f, b
f, b
Bit Clear f
Bit Set f
Bit Test f, Skip if Clear
Bit Test f, Skip if Set
1
1
1 (2)
1 (2)
01
01
01
01
00bb
01bb
10bb
11bb
bfff
bfff
bfff
bfff
ffff
ffff
ffff
ffff
1
1
2
1
2
1
1
2
2
2
1
1
1
11
11
10
00
10
11
11
00
11
00
00
11
11
111x
1001
0kkk
0000
1kkk
1000
00xx
0000
01xx
0000
0000
110x
1010
kkkk
kkkk
kkkk
0110
kkkk
kkkk
kkkk
0000
kkkk
0000
0110
kkkk
kkkk
kkkk
kkkk
kkkk
0100
kkkk
kkkk
kkkk
1001
kkkk
1000
0011
kkkk
kkkk
1,2
1,2
3
3
k
k
k
k
k
k
k
k
k
C,DC,Z
Z
TO,PD
Z
TO,PD
C,DC,Z
Z
Note 1:
When an I/O register is modified as a function of itself ( e.g., MOVF PORTB, 1), the value used will be that value present
on the pins themselves. For example, if the data latch is 1 for a pin configured as input and is driven low by an external
device, the data will be written back with a 0.
2: If this instruction is executed on the TMR0 register (and, where applicable, d = 1), the prescaler will be cleared if assigned
to the Timer0 Module.
3: If Program Counter (PC) is modified or a conditional test is true, the instruction requires two cycles. The second cycle is
executed as a NOP.
DS35008B-page 68
Preliminary
PIC16C62B/72A
11.1
Instruction Descriptions
ADDLW
ANDWF
AND W with f
Syntax:
[label] ADDLW
Syntax:
[label] ANDWF
Operands:
0 k 255
Operands:
0 f 127
d [0,1]
Operation:
Status Affected:
Description:
Operation:
(W) + k (W)
Status Affected:
C, DC, Z
Description:
f,d
BCF
Bit Clear f
Syntax:
[label] BCF
0 f 127
d [0,1]
Operands:
0 f 127
0b7
Operation:
Operation:
0 (f<b>)
Status Affected:
C, DC, Z
Status Affected:
None
Description:
Description:
ANDLW
BSF
Bit Set f
Syntax:
[label] ANDLW
Syntax:
[label] BSF
Operands:
0 f 127
0b7
Operation:
1 (f<b>)
ADDWF
Add W and f
Syntax:
[label] ADDWF
Operands:
f,d
Operands:
0 k 255
Operation:
Status Affected:
Description:
f,b
f,b
Status Affected:
None
Description:
Preliminary
DS35008B-page 69
PIC16C62B/72A
BTFSS
CLRF
Clear f
Syntax:
Syntax:
[label] CLRF
Operands:
0 f 127
0b<7
Operands:
0 f 127
Operation:
Operation:
skip if (f<b>) = 1
00h (f)
1Z
Status Affected:
None
Status Affected:
Description:
Description:
BTFSC
CLRW
Clear W
Syntax:
Syntax:
[ label ] CLRW
Operands:
0 f 127
0b7
Operands:
None
Operation:
Operation:
skip if (f<b>) = 0
00h (W)
1Z
Status Affected:
None
Status Affected:
Description:
Description:
CALL
Call Subroutine
CLRWDT
Syntax:
[ label ] CALL k
Syntax:
[ label ] CLRWDT
Operands:
0 k 2047
Operands:
None
Operation:
(PC)+ 1 TOS,
k PC<10:0>,
(PCLATH<4:3>) PC<12:11>
Operation:
00h WDT
0 WDT prescaler,
1 TO
1 PD
Status Affected:
None
Description:
DS35008B-page 70
Status Affected:
TO, PD
Description:
CLRWDT instruction resets the Watchdog Timer. It also resets the prescaler
of the WDT. Status bits TO and PD
are set.
Preliminary
PIC16C62B/72A
COMF
Complement f
GOTO
Unconditional Branch
Syntax:
[ label ] COMF
Syntax:
[ label ]
Operands:
0 f 127
d [0,1]
Operands:
0 k 2047
Operation:
(f) (destination)
Operation:
k PC<10:0>
PCLATH<4:3> PC<12:11>
Status Affected:
Status Affected:
None
Description:
Description:
DECF
Decrement f
INCF
Increment f
Syntax:
Syntax:
[ label ]
Operands:
0 f 127
d [0,1]
Operands:
0 f 127
d [0,1]
Operation:
(f) - 1 (destination)
Operation:
(f) + 1 (destination)
Status Affected:
Status Affected:
Description:
Description:
DECFSZ
Decrement f, Skip if 0
INCFSZ
Increment f, Skip if 0
Syntax:
Syntax:
[ label ]
Operands:
0 f 127
d [0,1]
Operands:
0 f 127
d [0,1]
Operation:
(f) - 1 (destination);
skip if result = 0
Operation:
(f) + 1 (destination),
skip if result = 0
Status Affected:
None
Status Affected:
None
Description:
Description:
f,d
Preliminary
GOTO k
INCF f,d
INCFSZ f,d
DS35008B-page 71
PIC16C62B/72A
IORLW
MOVLW
Move Literal to W
Syntax:
[ label ]
Syntax:
[ label ]
Operands:
0 k 255
Operands:
0 k 255
Operation:
Operation:
k (W)
Status Affected:
Status Affected:
None
Description:
Description:
IORLW k
MOVLW k
IORWF
Inclusive OR W with f
MOVWF
Move W to f
Syntax:
[ label ]
Syntax:
[ label ]
Operands:
0 f 127
d [0,1]
Operands:
0 f 127
Operation:
(W) (f)
Operation:
Status Affected:
None
Status Affected:
Description:
Description:
Inclusive OR the W register with register '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'.
MOVF
Move f
NOP
No Operation
Syntax:
[ label ]
Syntax:
[ label ]
Operands:
0 f 127
d [0,1]
Operands:
None
Operation:
No operation
Operation:
(f) (destination)
Status Affected:
None
Status Affected:
Description:
No operation.
Description:
DS35008B-page 72
IORWF
f,d
MOVF f,d
Preliminary
MOVWF
NOP
PIC16C62B/72A
RETFIE
RLF
Syntax:
[ label ]
Syntax:
[ label ]
Operands:
None
Operands:
Operation:
TOS PC,
1 GIE
0 f 127
d [0,1]
Operation:
None
Status Affected:
Description:
Status Affected:
RETFIE
RLF
f,d
Register f
RETLW
RRF
Syntax:
[ label ]
Syntax:
[ label ]
Operands:
0 k 255
Operands:
Operation:
k (W);
TOS PC
0 f 127
d [0,1]
Operation:
Status Affected:
None
Status Affected:
Description:
Description:
RETLW k
RRF f,d
RETURN
SLEEP
Register f
Syntax:
[ label ]
Syntax:
[ label ]
Operands:
None
Operands:
None
Operation:
TOS PC
Operation:
Status Affected:
None
Description:
00h WDT,
0 WDT prescaler,
1 TO,
0 PD
Status Affected:
TO, PD
Description:
RETURN
Preliminary
SLEEP
DS35008B-page 73
PIC16C62B/72A
SUBLW
XORLW
Syntax:
[ label ]
Syntax:
[label]
Operands:
0 k 255
Operands:
0 k 255
Operation:
k - (W) (W)
Operation:
Status Affected:
Description:
The W register is subtracted (2s complement method) from the eight bit literal 'k'. The result is placed in the W
register.
Description:
SUBWF
Subtract W from f
XORWF
Exclusive OR W with f
Syntax:
[ label ]
Syntax:
[label]
Operands:
0 f 127
d [0,1]
Operands:
0 f 127
d [0,1]
Operation:
Operation:
Status
Affected:
C, DC, Z
Status Affected:
Description:
Description:
SUBLW k
SUBWF f,d
SWAPF
Swap Nibbles in f
Syntax:
Operands:
0 f 127
d [0,1]
Operation:
(f<3:0>) (destination<7:4>),
(f<7:4>) (destination<3:0>)
Status Affected:
None
Description:
The upper and lower nibbles of register 'f' are exchanged. If 'd' is 0, the
result is placed in W register. If 'd' is 1,
the result is placed in register 'f'.
DS35008B-page 74
Preliminary
XORLW k
XORWF
f,d
PIC16C62B/72A
12.0
DEVELOPMENT SUPPORT
12.1
12.2
MPASM Assembler
12.3
Preliminary
DS35008B-page 75
PIC16C62B/72A
12.4
MPLINK/MPLIB Linker/Librarian
12.5
12.6
DS35008B-page 76
12.7
PICMASTER/PICMASTER CE
12.8
ICEPIC
12.9
Microchips In-Circuit Debugger, MPLAB-ICD, is a powerful, low-cost run-time development tool. This tool is
based on the flash PIC16F877 and can be used to
develop for this and other PICmicro microcontrollers
from the PIC16CXXX family. MPLAB-ICD utilizes the
In-Circuit Debugging capability built into the
PIC16F87X. This feature, along with Microchips In-Circuit Serial Programming protocol, offers cost-effective
in-circuit flash programming and debugging from the
graphical user interface of the MPLAB Integrated
Development Environment. This enables a designer to
develop and debug source code by watching variables,
single-stepping and setting break points. Running at
full speed enables testing hardware in real-time. The
MPLAB-ICD is also a programmer for the flash
PIC16F87X family.
Preliminary
PIC16C62B/72A
12.10
The PRO MATE II Universal Programmer is a full-featured programmer capable of operating in stand-alone
mode as well as PC-hosted mode. PRO MATE II is CE
compliant.
The PRO MATE II has programmable VDD and VPP
supplies which allows it to verify programmed memory
at VDD min and VDD max for maximum reliability. It has
an LCD display for instructions and error messages,
keys to enter commands and a modular detachable
socket assembly to support various package types. In
stand-alone mode the PRO MATE II can read, verify or
program PICmicro devices. It can also set code-protect
bits in this mode.
12.11
The PICSTART programmer is an easy-to-use, lowcost prototype programmer. It connects to the PC via
one of the COM (RS-232) ports. MPLAB Integrated
Development Environment software makes using the
programmer simple and efficient.
PICSTART Plus supports all PICmicro devices with up
to 40 pins. Larger pin count devices such as the
PIC16C92X, and PIC17C76X may be supported with
an adapter socket. PICSTART Plus is CE compliant.
12.12
SIMICE Entry-Level
Hardware Simulator
12.13
12.14
12.15
Preliminary
DS35008B-page 77
PIC16C62B/72A
12.16
PICDEM-17
The PICDEM-17 is an evaluation board that demonstrates the capabilities of several Microchip microcontrollers,
including
PIC17C752,
PIC17C756,
PIC17C762, and PIC17C766. All necessary hardware
is included to run basic demo programs, which are supplied on a 3.5-inch disk. A programmed sample is
included, and the user may erase it and program it with
the other sample programs using the PRO MATE II or
PICSTART Plus device programmers and easily debug
and test the sample code. In addition, PICDEM-17 supports down-loading of programs to and executing out of
external FLASH memory on board. The PICDEM-17 is
also usable with the MPLAB-ICE or PICMASTER emulator, and all of the sample programs can be run and
modified using either emulator. Additionally, a generous prototype area is available for user hardware.
12.17
12.18
DS35008B-page 78
Preliminary
Software Tools
Emulators
Programmers Debugger
PIC16C5X
PIC14000
PIC12CXXX
PICSTARTPlus
Low-Cost Universal Dev. Kit
PRO MATE II
Universal Programmer
PIC16C8X
PIC16C7XX
PIC16C7X
PIC16F62X
PIC16CXXX
PIC16C6X
Preliminary
* Contact the Microchip Technology Inc. web site at www.microchip.com for information on how to use the MPLAB-ICD In-Circuit Debugger (DV164001) with PIC16C62, 63, 64, 65, 72, 73, 74, 76, 77
** Contact Microchip Technology Inc. for availability date.
Development tool is available on select devices.
PIC16F8XX
MCRFXXX
PIC16C9XX
PICDEM-17
PICDEM-14A
PIC17C4X
PICDEM-3
**
24CXX/
25CXX/
93CXX
PICDEM-2
**
PICDEM-1
PIC17C7XX
**
HCSXXX
SIMICE
ICEPIC Low-Cost
In-Circuit Emulator
PICMASTER/PICMASTER-CE
MPLAB-ICE
MPASM/MPLINK
PIC18CXX2
TABLE 12-1:
MPLAB Integrated
Development Environment
PIC16C62B/72A
MCP2510
DS35008B-page 79
PIC16C62B/72A
NOTES:
DS35008B-page 80
Preliminary
PIC16C62B/72A
13.0
ELECTRICAL CHARACTERISTICS
Preliminary
DS35008B-page 81
PIC16C62B/72A
FIGURE 13-1: PIC16C62B/72A-20 VOLTAGE-FREQUENCY GRAPH
6.0 V
5.5 V
Voltage
5.0 V
PIC16CXXX
PIC16CXXX-20
4.5 V
4.0 V
3.5 V
3.0 V
2.5 V
2.0 V
20 MHz
Frequency
Voltage
5.0 V
4.5 V
4.0 V
PIC16LCXXX-04
3.5 V
3.0 V
2.5 V
2.0 V
4 MHz
10 MHz
Frequency
FMAX = (12.0 MHz/V) (VDDAPPMIN - 2.5 V) + 4 MHz
Note: VDDAPPMIN is the minimum voltage of the PICmicro device in the application.
Fmax is no greater than 10 MHz.
DS35008B-page 82
Preliminary
PIC16C62B/72A
FIGURE 13-3: PIC16C62B/72A-04 VOLTAGE-FREQUENCY GRAPH
6.0 V
5.5 V
Voltage
5.0 V
PIC16CXXX-04
4.5 V
4.0 V
3.5 V
3.0 V
2.5 V
2.0 V
4 MHz
Frequency
Preliminary
DS35008B-page 83
PIC16C62B/72A
13.1
DC Characteristics:
DC CHARACTERISTICS
Param
No.
Sym
Characteristic
Typ
Max Units
4.0
4.5
5.5
5.5
5.5
V
V
V
Conditions
D001
D001A
VDD
Supply Voltage
VBOR*
D002*
VDR
1.5
D003
VPOR
VSS
D004*
SVDD
D004A*
0.05
TBD
D005
VBOR
Brown-out Reset
voltage trip point
3.65
4.35
D010
IDD
Supply Current
(Note 2, 5)
2.7
mA
10
20
mA
HS osc mode
FOSC = 20 MHz, VDD = 5.5V
D021
D021B
10.5
1.5
1.5
2.5
42
16
19
19
A
A
A
A
Module Differential
Current (Note 6)
D022*
IWDT Watchdog Timer
D022A* IBOR Brown-out Reset
6.0
TBD
20
200
A
A
D013
D020
IPD
Power-down Current
(Note 3, 5)
DS35008B-page 84
Preliminary
PIC16C62B/72A
13.2
DC Characteristics:
DC CHARACTERISTICS
Param
No.
Sym
Characteristic
Typ
Max Units
2.5
VBOR*
5.5
5.5
V
V
Conditions
LP, XT, RC osc modes (DC - 4 MHz)
BOR enabled (Note 7)
D001
VDD
Supply Voltage
D002*
VDR
1.5
D003
VPOR
VSS
D004*
SVDD
D004A*
0.05
TBD
D005
VBOR
Brown-out Reset
voltage trip point
3.65
4.35
D010
IDD
Supply Current
(Note 2, 5)
2.0
3.8
mA
22.5
48
LP OSC MODE
FOSC = 32 kHz, VDD = 3.0V, WDT disabled
7.5
0.9
0.9
30
5
5
A
A
A
6.0
TBD
20
200
A
A
D010A
D020
D021
D021A
IPD
Power-down Current
(Note 3, 5)
Module Differential
Current (Note 6)
D022*
IWDT Watchdog Timer
D022A* IBOR Brown-out Reset
Preliminary
DS35008B-page 85
PIC16C62B/72A
13.3
DC Characteristics:
DC CHARACTERISTICS
Param
No.
Sym
Characteristic
Min
Typ
Max
Units
Conditions
I/O ports
D030
D030A
VSS
Vss
0.15VDD
0.8V
V
V
D031
VSS
0.2VDD
D032
Vss
0.2VDD
D033
Vss
0.3VDD
Note1
2.0
VDD
0.25VD
+ 0.8V
Vdd
I/O ports
D040A
D041
0.8VDD
VDD
D042
MCLR
0.8VDD
VDD
D042A
0.7VDD
VDD
D043
0.9VDD
Vdd
I/O ports
D061
MCLR, RA4/T0CKI
D063
OSC1
50
250
400
0.6
Note1
IIL
D070
IPURB
D080
VOL
DS35008B-page 86
Preliminary
PIC16C62B/72A
DC CHARACTERISTICS
Param
No.
Sym
D083
Characteristic
OSC2/CLKOUT
(RC osc mode)
Typ
Max
Units
Conditions
0.6
0.6
0.6
VDD-0.7
VDD-0.7
VDD-0.7
VDD-0.7
8.5
RA4 pin
VOH
D092
D150*
VOD
D100
15
pF
D101
CIO
50
pF
D102
Cb
400
pF
Preliminary
DS35008B-page 87
PIC16C62B/72A
13.4
AC (Timing) Characteristics
13.4.1
The timing parameter symbols have been created following one of the following formats:
1. TppS2ppS
2. TppS
4. Ts
Time
osc
OSC1
T
F
Frequency
CCP1
ck
CLKOUT
rd
RD
cs
CS
rw
RD or WR
di
SDI
sc
SCK
do
SDO
ss
SS
dt
Data in
t0
T0CKI
io
I/O port
t1
T1CKI
mc
MCLR
wr
WR
Fall
Period
High
Rise
Invalid (Hi-impedance)
Valid
Low
Hi-impedance
AA
output access
High
High
BUF
Bus free
Low
Low
Hold
SU
Setup
DAT
STO
STOP condition
STA
START condition
I2C only
DS35008B-page 88
Preliminary
PIC16C62B/72A
13.4.2
TIMING CONDITIONS
TABLE 13-1:
AC CHARACTERISTICS
Load condition 1
VDD/2
RL
CL
Pin
VSS
CL
Pin
RL = 464
VSS
CL = 50 pF
15 pF
Preliminary
DS35008B-page 89
PIC16C62B/72A
13.4.3
Q1
Q2
Q3
Q4
Q1
OSC1
3
2
CLKOUT
TABLE 13-2:
Param
No.
1A
Sym
Fosc
Characteristic
External CLKIN Frequency
(Note 1)
Oscillator Frequency
(Note 1)
Tosc
Oscillator Period
(Note 1)
Min
Typ
Max
Units
Conditions
DC
MHz
DC
MHz
DC
20
MHz
DC
200
kHz
LP osc mode
DC
MHz
RC osc mode
0.1
MHz
XT osc mode
20
MHz
HS osc mode
200
kHz
250
ns
LP osc mode
250
ns
50
ns
LP osc mode
250
ns
RC osc mode
250
10,000
ns
XT osc mode
250
250
ns
50
250
ns
LP osc mode
TCY
200
DC
ns
TCY = 4/FOSC
3*
TosL,
TosH
100
ns
XT oscillator
4*
TosR,
TosF
2.5
LP oscillator
15
ns
HS oscillator
25
ns
XT oscillator
50
ns
LP oscillator
15
ns
HS oscillator
DS35008B-page 90
Preliminary
PIC16C62B/72A
FIGURE 13-6: CLKOUT AND I/O TIMING
Q1
Q4
Q2
Q3
OSC1
11
10
CLKOUT
13
19
14
12
18
16
I/O Pin
(input)
15
17
I/O Pin
(output)
new value
old value
20, 21
Note: Refer to Figure 13-4 for load conditions.
TABLE 13-3:
Param Sym
No.
Characteristic
Min
Typ
Max
Units Conditions
10*
75
200
ns
Note 1
11*
75
200
ns
Note 1
12*
TckR
35
100
ns
Note 1
13*
TckF
35
100
ns
Note 1
14*
TckL2ioV
0.5TCY + 20
ns
Note 1
15*
Tosc + 200
ns
Note 1
16*
TckH2ioI
Note 1
17*
18*
TosH2ioI
18A*
ns
50
150
ns
PIC16CXX
100
ns
PIC16LCXX
200
ns
19*
ns
20*
TioR
PIC16CXX
10
40
ns
PIC16LCXX
80
ns
TioF
PIC16CXX
10
40
ns
80
ns
22*
Tinp
TCY
ns
23*
Trbp
TCY
ns
20A*
21*
PIC16LCXX
21A*
Preliminary
DS35008B-page 91
PIC16C62B/72A
FIGURE 13-7: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND POWER-UP
TIMER TIMING
VDD
MCLR
30
Internal
POR
33
PWRT
Time-out
32
OSC
Time-out
Internal
RESET
Watchdog
Timer
RESET
31
34
34
I/O Pins
Note: Refer to Figure 13-4 for load conditions.
BVDD
VDD
TABLE 13-4:
Param
No.
35
Sym
Characteristic
Min
Typ
Max
Units
Conditions
30
TmcL
31*
Twdt
18
33
ms
32
Tost
1024
TOSC
33*
Tpwrt
28
72
132
ms
34
TIOZ
2.1
35
TBOR
100
DS35008B-page 92
Preliminary
PIC16C62B/72A
FIGURE 13-9: TIMER0 AND TIMER1 EXTERNAL CLOCK TIMINGS
T0CKI
41
40
42
T1OSO/T1CKI
46
45
47
48
TMR0 or
TMR1
Note: Refer to Figure 13-4 for load conditions.
TABLE 13-5:
Param
No.
40*
Sym
Tt0H
Characteristic
T0CKI High Pulse Width
Min
Typ
Max
Units
0.5TCY + 20
ns
10
ns
0.5TCY + 20
ns
10
ns
TCY + 40
ns
Greater of:
20 or TCY + 40
N
ns
N = prescale value
(2, 4,..., 256)
Must also meet
parameter 47
No Prescaler
With Prescaler
41*
Tt0L
No Prescaler
With Prescaler
42*
Tt0P
T0CKI Period
No Prescaler
With Prescaler
45*
46*
47*
Tt1H
Tt1L
Tt1P
0.5TCY + 20
ns
Synchronous,
Prescaler =
2,4,8
PIC16CXX
15
ns
PIC16LCXX
25
ns
Asynchronous
PIC16CXX
30
ns
PIC16LCXX
50
ns
0.5TCY + 20
ns
Synchronous, Prescaler = 1
Synchronous, Prescaler = 1
Synchronous,
Prescaler =
2,4,8
PIC16CXX
15
ns
PIC16LCXX
25
ns
Asynchronous
PIC16CXX
30
ns
PIC16LCXX
50
ns
ns
Synchronous
Asynchronous
48
PIC16CXX
GREATER OF:
30 OR TCY + 40
N
PIC16LCXX
GREATER OF:
50 OR TCY + 40
N
60
ns
PIC16LCXX
100
ns
DC
200
kHz
2Tosc
7Tosc
TCKEZtmr1
N = prescale value
(1, 2, 4, 8)
N = prescale value
(1, 2, 4, 8)
PIC16CXX
Ft1
Conditions
Preliminary
DS35008B-page 93
PIC16C62B/72A
FIGURE 13-10: CAPTURE/COMPARE/PWM TIMINGS
CCP1
(Capture Mode)
50
51
52
CCP1
(Compare or PWM Mode)
53
54
TABLE 13-6:
Param
No.
50*
51*
CAPTURE/COMPARE/PWM REQUIREMENTS
Sym
TccL
TccH
Characteristic
CCP1 input low
time
Min
No Prescaler
With Prescaler
0.5TCY + 20
ns
PIC16CXX
10
ns
PIC16LCXX
20
ns
0.5TCY + 20
ns
10
ns
No Prescaler
With Prescaler
PIC16CXX
PIC16LCXX
52*
TccP
53*
TccR
54*
TccF
20
ns
3TCY + 40
N
ns
PIC16CXX
10
25
ns
PIC16LCXX
25
45
ns
PIC16CXX
10
25
ns
PIC16LCXX
25
45
ns
Conditions
N = prescale
value (1,4, or 16)
DS35008B-page 94
Preliminary
PIC16C62B/72A
FIGURE 13-11: EXAMPLE SPI MASTER MODE TIMING (CKE = 0)
SS
70
SCK
(CKP = 0)
71
72
78
79
79
78
SCK
(CKP = 1)
80
BIT6 - - - - - -1
MSb
SDO
LSb
75, 76
SDI
MSb IN
BIT6 - - - -1
LSb IN
74
73
Note:
TABLE 13-7:
Param.
No.
Symbol
Characteristic
Min
70
TCY
71
TscH
71A
72
TscL
72A
ns
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
100
ns
73
TdiV2scH,
TdiV2scL
73A
TB2B
1.5TCY + 40
ns
74
TscH2diL,
TscL2diL
100
ns
75
TdoR
10
25
ns
20
45
ns
76
TdoF
10
25
ns
78
TscR
PIC16CXX
10
25
ns
PIC16LCXX
20
45
ns
PIC16LCXX
79
TscF
80
Conditions
10
25
ns
PIC16CXX
50
ns
PIC16LCXX
100
ns
Note 1
Note 1
Note 1
Data in Typ column is at 5V, 25C unless otherwise stated. These parameters are for design guidance only
and are not tested.
Note 1: Specification 73A is only required if specifications 71A and 72A are used.
Preliminary
DS35008B-page 95
PIC16C62B/72A
FIGURE 13-12: EXAMPLE SPI MASTER MODE TIMING (CKE = 1)
SS
81
SCK
(CKP = 0)
71
72
79
73
SCK
(CKP = 1)
80
78
MSb
SDO
LSb
BIT6 - - - - - -1
75, 76
SDI
MSb IN
BIT6 - - - -1
LSb IN
74
Note:
TABLE 13-8:
Param.
No.
71
Symbol
TscH
71A
72
TscL
72A
Characteristic
Min
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
100
ns
73
TdiV2scH,
TdiV2scL
73A
TB2B
1.5TCY + 40
ns
74
TscH2diL,
TscL2diL
100
ns
75
TdoR
10
25
ns
20
45
ns
76
TdoF
10
25
ns
78
TscR
10
25
ns
20
45
ns
10
25
ns
50
ns
100
ns
ns
79
TscF
80
81
PIC16CXX
PIC16LCXX
PIC16CXX
PIC16LCXX
TCY
Conditions
Note 1
Note 1
Note 1
Data in Typ column is at 5V, 25C unless otherwise stated. These parameters are for design guidance only
and are not tested.
Note 1: Specification 73A is only required if specifications 71A and 72A are used.
DS35008B-page 96
Preliminary
PIC16C62B/72A
FIGURE 13-13: EXAMPLE SPI SLAVE MODE TIMING (CKE = 0)
SS
70
SCK
(CKP = 0)
83
71
72
78
79
79
78
SCK
(CKP = 1)
80
MSb
SDO
LSb
BIT6 - - - - - -1
77
75, 76
SDI
MSb IN
BIT6 - - - -1
LSb IN
74
73
Note:
TABLE 13-9:
Param.
No.
Symbol
Characteristic
Min
70
TCY
71
TscH
71A
72
TscL
72A
ns
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
100
ns
73
TdiV2scH,
TdiV2scL
73A
TB2B
1.5TCY + 40
ns
74
TscH2diL,
TscL2diL
100
ns
75
TdoR
10
25
ns
20
45
ns
PIC16LCXX
76
TdoF
10
25
ns
77
TssH2doZ
10
50
ns
78
TscR
10
25
ns
20
45
ns
10
25
ns
50
ns
100
ns
ns
79
TscF
80
83
PIC16CXX
PIC16LCXX
1.5TCY + 40
Conditions
Note 1
Note 1
Note 1
Data in Typ column is at 5V, 25C unless otherwise stated. These parameters are for design guidance only
and are not tested.
Note 1: Specification 73A is only required if specifications 71A and 72A are used.
1998 Microchip Technology Inc.
Preliminary
DS35008B-page 97
PIC16C62B/72A
FIGURE 13-14: EXAMPLE SPI SLAVE MODE TIMING (CKE = 1)
82
SS
SCK
(CKP = 0)
70
83
71
72
SCK
(CKP = 1)
80
MSb
SDO
BIT6 - - - - - -1
LSb
75, 76
SDI
MSb IN
77
BIT6 - - - -1
LSb IN
74
NOTE: Refer to Figure 13-4 for load conditions.
Symbol
Characteristic
Min
TCY
70
TssL2scH,
TssL2scL
71
TscH
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
Note 1
Note 1
71A
72
TscL
72A
Conditions
ns
73A
TB2B
1.5TCY + 40
ns
74
TscH2diL,
TscL2diL
100
ns
75
TdoR
10
25
ns
20
45
ns
76
TdoF
10
25
ns
77
TssH2doZ
10
50
ns
78
TscR
10
25
ns
79
TscF
80
82
83
PIC16CXX
PIC16LCXX
PIC16CXX
20
45
ns
10
25
ns
PIC16CXX
50
ns
PIC16LCXX
100
ns
PIC16CXX
50
ns
PIC16LCXX
100
ns
1.5TCY + 40
ns
PIC16LCXX
Note 1
Data in Typ column is at 5V, 25C unless otherwise stated. These parameters are for design guidance only
and are not tested.
Note 1: Specification 73A is only required if specifications 71A and 72A are used.
DS35008B-page 98
Preliminary
PIC16C62B/72A
FIGURE 13-15: I2C BUS START/STOP BITS TIMING
SCL
91
93
90
92
SDA
STOP
Condition
START
Condition
Note:
Sym
90*
TSU:STA
91*
THD:STA
92*
TSU:STO
93
THD:STO
*
Characteristic
START condition
Min
Ty Max Unit
p
s
4700
Setup time
600
START condition
4000
Hold time
600
STOP condition
4700
Setup time
600
STOP condition
4000
Hold time
600
Conditions
ns
ns
ns
ns
Preliminary
DS35008B-page 99
PIC16C62B/72A
FIGURE 13-16: I2C BUS DATA TIMING
103
102
100
101
SCL
90
106
107
91
92
SDA
In
110
109
109
SDA
Out
Note:
Sym
THIGH
Characteristic
Clock high time
Min
Max
Units
4.0
0.6
1.5TCY
4.7
1.3
1.5TCY
SSP Module
101*
TLOW
SSP Module
102*
103*
90*
91*
106*
107*
92*
109*
110*
TR
TF
TSU:STA
THD:STA
THD:DAT
TSU:DAT
TSU:STO
TAA
TBUF
Cb
Conditions
1000
ns
20 + 0.1Cb
300
ns
300
ns
20 + 0.1Cb
300
ns
Cb is specified to be from
10-400 pF
START condition
setup time
4.7
0.6
4.0
0.6
ns
0.9
250
ns
100
ns
4.7
0.6
3500
ns
ns
4.7
1.3
400
pF
Cb is specified to be from
10-400 pF
Note 2
Note 1
Time the bus must be free
before a new transmission
can start
DS35008B-page 100
Preliminary
PIC16C62B/72A
TABLE 13-13: A/D CONVERTER CHARACTERISTICS:
PIC16C72A-04 (COMMERCIAL, INDUSTRIAL, EXTENDED)
PIC16C72A-20 (COMMERCIAL, INDUSTRIAL, EXTENDED)
PIC16LC72A-04 (COMMERCIAL, INDUSTRIAL)
Param Sym
No.
Characteristic
Min
Typ
Max
Units
Conditions
8-bits
bit
A01
NR
A02
<1
LSB
A03
EIL
<1
LSB
A04
EDL
<1
LSB
A05
EFS
<1
LSB
A06
<1
LSB
A10
guaranteed
(Note 3)
A20
A25
VAIN
A30
ZAIN
Recommended impedance of
analog voltage source
A40
IAD
A/D conversion
current (VDD)
A50
IREF
Resolution
Monotonicity
2.5V
VDD + 0.3
VSS - 0.3
VREF + 0.3
10.0
PIC16CXX
180
PIC16LCXX
90
10
1000
10
Preliminary
DS35008B-page 101
PIC16C62B/72A
FIGURE 13-17: A/D CONVERSION TIMING
BSF ADCON0, GO
134
1 TCY
(Tosc/2) (1)
131
Q4
130
132
A/D CLK
A/D DATA
0
NEW_DATA
OLD_DATA
ADRES
ADIF
GO
DONE
SAMPLING STOPPED
SAMPLE
Note 1: If the A/D clock source is selected as RC, a time of TCY is added before the A/D clock starts. This
allows the SLEEP instruction to be executed.
TAD
Characteristic
A/D clock period
Min
Typ
Max
Unit
s
PIC16CXX
1.6
PIC16LCXX
2.0
PIC16CXX
2.0
4.0
6.0
A/D RC Mode
PIC16LCXX
3.0
6.0
9.0
A/D RC Mode
11
11
TAD
Note 2
20
5*
TOSC/2
1.5
TAD
131
132
134
135
TGO
Conditions
DS35008B-page 102
Preliminary
PIC16C62B/72A
14.0
The graphs and tables provided in this section are for design guidance and are not tested.
In some graphs or tables, the data presented are outside specified operating range (i.e., outside specified VDD
range). This is for information only and devices are guaranteed to operate properly only within the specified range.
The data presented in this section is a statistical summary of data collected on units from different lots over a period
of time and matrix samples. Typical represents the mean of the distribution at 25C. Max or min represents
(mean + 3) or (mean - 3) respectively, where is standard deviation, over the whole temperature range.
Preliminary
DS35008B-page 103
PIC16C62B/72A
NOTES:
DS35008B-page 104
Preliminary
PIC16C62B/72A
15.0
PACKAGING INFORMATION
15.1
Example
MMMMMMMMMMMM
XXXXXXXXXXXXXXX
AABBCDE
PIC16C72A-04/SP
9917HAT
Example
XXXXXXXXXXX
XXXXXXXXXXX
XXXXXXXXXXX
AABBCDE
PIC16C72A/JW
9917CAT
Example
28-Lead SOIC
MMMMMMMMMMMMMMMM
XXXXXXXXXXXXXXXXXXXX
AABBCDE
28-Lead SSOP
PIC16C62B-20/SO
9910/SAA
Example
XXXXXXXXXXXX
XXXXXXXXXXXX
PIC16C62B
20I/SS025
AABBCDE
Legend: MM...M
XX...X
AA
BB
C
D
E
Note:
9917SBP
In the event the full Microchip part number cannot be marked on one line, it will
be carried over to the next line thus limiting the number of available characters
for customer specific information.
Standard OTP marking consists of Microchip part number, year code, week code, facility code, mask
rev#, and assembly code. For OTP marking beyond this, certain price adders apply. Please check with
your Microchip Sales Office. For QTP devices, any special marking adders are included in QTP price.
Preliminary
DS35008B-page 105
PIC16C62B/72A
15.2
2
n
A2
A
L
B1
A1
eB
B
Units
Dimension Limits
n
p
MIN
INCHES*
NOM
28
.100
.150
.130
MAX
MILLIMETERS
NOM
28
2.54
3.56
3.81
3.18
3.30
0.38
7.62
7.94
7.09
7.80
34.16
34.67
3.18
3.30
0.20
0.29
1.02
1.33
0.41
0.48
8.13
8.89
5
10
5
10
MIN
Number of Pins
Pitch
Top to Seating Plane
A
.140
.160
Molded Package Thickness
A2
.125
.135
Base to Seating Plane
A1
.015
Shoulder to Shoulder Width
E
.300
.313
.325
Molded Package Width
E1
.279
.307
.335
Overall Length
D
1.345
1.365
1.385
Tip to Seating Plane
L
.125
.130
.135
c
Lead Thickness
.008
.012
.015
Upper Lead Width
B1
.040
.053
.065
Lower Lead Width
B
.016
.019
.022
Overall Row Spacing
eB
.320
.350
.430
DS35008B-page 106
Preliminary
MAX
4.06
3.43
8.26
8.51
35.18
3.43
0.38
1.65
0.56
10.92
15
15
PIC16C62B/72A
15.3
28-Lead Ceramic Dual In-line with Window (JW) 300 mil (CERDIP)
E1
W2
2
n
1
W1
E
A2
A
c
Units
Dimension Limits
n
p
Number of Pins
Pitch
Top to Seating Plane
Ceramic Package Height
Standoff
Shoulder to Shoulder Width
Ceramic Pkg. Width
Overall Length
Tip to Seating Plane
Lead Thickness
Upper Lead Width
Lower Lead Width
Overall Row Spacing
Window Width
Window Length
*Controlling Parameter
JEDEC Equivalent: MO-058
Drawing No. C04-080
B1
B
A1
eB
A
A2
A1
E
E1
D
L
c
B1
B
eB
W1
W2
MIN
.170
.155
.015
.300
.285
1.430
.135
.008
.050
.016
.345
.130
.290
INCHES*
NOM
28
.100
.183
.160
.023
.313
.290
1.458
.140
.010
.058
.019
.385
.140
.300
Preliminary
MAX
.195
.165
.030
.325
.295
1.485
.145
.012
.065
.021
.425
.150
.310
p
MILLIMETERS
MIN
NOM
28
2.54
4.32
4.64
3.94
4.06
0.38
0.57
7.62
7.94
7.24
7.37
36.32
37.02
3.43
3.56
0.20
0.25
1.27
1.46
0.41
0.47
8.76
9.78
3.30
3.56
7.37
7.62
MAX
4.95
4.19
0.76
8.26
7.49
37.72
3.68
0.30
1.65
0.53
10.80
3.81
7.87
DS35008B-page 107
PIC16C62B/72A
15.4
E
E1
p
B
2
1
n
h
45
c
A2
L
Units
Dimension Limits
n
p
A1
MIN
INCHES*
NOM
28
.050
.099
.091
.008
.407
.295
.704
.020
.033
4
.011
.017
12
12
MAX
MILLIMETERS
NOM
28
1.27
2.36
2.50
2.24
2.31
0.10
0.20
10.01
10.34
7.32
7.49
17.65
17.87
0.25
0.50
0.41
0.84
0
4
0.23
0.28
0.36
0.42
0
12
0
12
MIN
Number of Pins
Pitch
Overall Height
A
.093
.104
Molded Package Thickness
A2
.088
.094
Standoff
A1
.004
.012
Overall Width
E
.394
.420
Molded Package Width
E1
.288
.299
Overall Length
D
.695
.712
Chamfer Distance
h
.010
.029
Foot Length
L
.016
.050
DS35008B-page 108
Preliminary
MAX
2.64
2.39
0.30
10.67
7.59
18.08
0.74
1.27
8
0.33
0.51
15
15
PIC16C62B/72A
15.5
28-Lead Plastic Shrink Small Outline (SS) 209 mil, 5.30 mm (SSOP)
E
E1
p
B
2
1
A
c
A2
A1
Units
Dimension Limits
n
p
MIN
INCHES
NOM
28
.026
.073
.068
.006
.309
.207
.402
.030
.007
4
.013
5
5
MAX
MILLIMETERS*
NOM
MAX
28
0.66
1.73
1.85
1.98
1.63
1.73
1.83
0.05
0.15
0.25
7.59
7.85
8.10
5.11
5.25
5.38
10.06
10.20
10.34
0.56
0.75
0.94
0.10
0.18
0.25
0.00
101.60
203.20
0.25
0.32
0.38
0
5
10
0
5
10
MIN
Number of Pins
Pitch
Overall Height
A
.068
.078
Molded Package Thickness
A2
.064
.072
Standoff
A1
.002
.010
Overall Width
E
.299
.319
Molded Package Width
E1
.201
.212
Overall Length
D
.396
.407
Foot Length
L
.022
.037
c
Lead Thickness
.004
.010
Foot Angle
0
8
Lead Width
B
.010
.015
Preliminary
DS35008B-page 109
PIC16C62B/72A
NOTES:
DS35008B-page 110
Preliminary
PIC16C62B/72A
APPENDIX A: REVISION HISTORY
Version
Date
7/98
Revision Description
This is a new data sheet. However, the devices described in this data sheet are the upgrades to
the devices found in the PIC16C6X Data Sheet, DS30234, and the PIC16C7X Data Sheet,
DS30390.
APPENDIX B: CONVERSION
CONSIDERATIONS
Considerations for converting from previous versions of
devices to the ones listed in this data sheet are listed in
Table B-1.
TABLE B-1:
CONVERSION CONSIDERATIONS
Difference
PIC16C62A/72
PIC16C62B/72A
Voltage Range
2.5V - 6.0V
2.5V - 5.5V
SSP module
CCP module
N/A
Timer1 module
N/A
Preliminary
DS35008B-page 111
PIC16C62B/72A
APPENDIX C: MIGRATION FROM
BASE-LINE TO
MID-RANGE DEVICES
This section discusses how to migrate from a baseline
device (i.e., PIC16C5X) to a mid-range device (i.e.,
PIC16CXXX).
The following are the list of modifications over the
PIC16C5X microcontroller family:
1.
DS35008B-page 112
3.
4.
5.
Preliminary
PIC16C62B/72A
INDEX
A
A/D ..................................................................................... 49
A/D Converter Enable (ADIE Bit) ............................... 14
A/D Converter Flag (ADIF Bit) ............................ 15, 51
A/D Converter Interrupt, Configuring ......................... 51
ADCON0 Register ................................................ 9, 49
ADCON1 Register ........................................10, 49, 50
ADRES Register .............................................9, 49, 51
Analog Port Pins .......................................................... 6
Analog Port Pins, Configuring ................................... 53
Block Diagram ........................................................... 51
Block Diagram, Analog Input Model .......................... 52
Channel Select (CHS2:CHS0 Bits) ............................ 49
Clock Select (ADCS1:ADCS0 Bits) ........................... 49
Configuring the Module ............................................. 51
Conversion Clock (TAD) ............................................. 53
Conversion Status (GO/DONE Bit) ..................... 49, 51
Conversions ............................................................... 54
Converter Characteristics ........................................ 101
Module On/Off (ADON Bit) ........................................ 49
Port Configuration Control (PCFG2:PCFG0 Bits) ...... 50
Sampling Requirements ............................................ 52
Special Event Trigger (CCP) .............................. 35, 54
Timing Diagram ....................................................... 102
Absolute Maximum Ratings ............................................... 81
ADCON0 Register ........................................................ 9, 49
ADCS1:ADCS0 Bits ................................................... 49
ADON Bit ................................................................... 49
CHS2:CHS0 Bits ....................................................... 49
GO/DONE Bit ..................................................... 49, 51
ADCON1 Register ................................................10, 49, 50
PCFG2:PCFG0 Bits ................................................... 50
ADRES Register .....................................................9, 49, 51
Architecture
PIC16C62B/PIC16C72A Block Diagram ..................... 5
Assembler
MPASM Assembler ................................................... 75
B
Banking, Data Memory ................................................. 8, 11
Brown-out Reset (BOR) .......................... 55, 57, 59, 60, 61
BOR Enable (BODEN Bit) ......................................... 55
BOR Status (BOR Bit) ............................................... 16
Timing Diagram ......................................................... 92
C
Capture (CCP Module) ...................................................... 34
Block Diagram ........................................................... 34
CCP Pin Configuration .............................................. 34
CCPR1H:CCPR1L Registers .................................... 34
Changing Between Capture Prescalers .................... 34
Software Interrupt ...................................................... 34
Timer1 Mode Selection .............................................. 34
Capture/Compare/PWM
Interaction of Two CCP Modules ............................... 33
Capture/Compare/PWM (CCP) ......................................... 33
CCP1CON Register .............................................. 9, 33
CCPR1H Register ................................................ 9, 33
CCPR1L Register ................................................. 9, 33
Enable (CCP1IE Bit) .................................................. 14
Flag (CCP1IF Bit) ...................................................... 15
RC2/CCP1 Pin ............................................................. 6
Timer Resources ....................................................... 33
Timing Diagram ......................................................... 94
D
Data Memory ....................................................................... 8
Bank Select (RP1:RP0 Bits) ..................................8, 11
General Purpose Registers ......................................... 8
Register File Map ........................................................ 8
Special Function Registers ......................................... 9
DC Characteristics ......................................................84, 86
Development Support ........................................................ 75
Direct Addressing .............................................................. 18
E
Electrical Characteristics ................................................... 81
Errata ................................................................................... 3
External Power-on Reset Circuit ....................................... 59
F
Firmware Instructions ........................................................ 67
I
I/O Ports ............................................................................ 19
I2C (SSP Module) .............................................................. 41
ACK Pulse .......................................41, 42, 43, 44, 45
Addressing ................................................................ 42
Block Diagram ........................................................... 41
Buffer Full Status (BF Bit) ......................................... 46
Clock Polarity Select (CKP Bit) ................................. 47
Data/Address (D/A Bit) .............................................. 46
Master Mode ............................................................. 45
Mode Select (SSPM3:SSPM0 Bits) .......................... 47
Multi-Master Mode .................................................... 45
Read/Write Bit Information (R/W Bit) .... 42, 43, 44, 46
Receive Overflow Indicator (SSPOV Bit) .................. 47
Reception .................................................................. 43
Reception Timing Diagram ........................................ 43
Slave Mode ............................................................... 41
Start (S Bit) ..........................................................45, 46
Stop (P Bit) ..........................................................45, 46
Synchronous Serial Port Enable (SSPEN Bit) .......... 47
Timing Diagram, Data ............................................. 100
Timing Diagram, Start/Stop Bits ................................ 99
Transmission ............................................................. 44
Update Address (UA Bit) ........................................... 46
ID Locations ................................................................55, 66
In-Circuit Serial Programming (ICSP) .........................55, 66
Indirect Addressing ............................................................ 18
FSR Register .................................................... 8, 9, 18
INDF Register ............................................................. 9
Instruction Format ............................................................. 67
Preliminary
DS35008B-page 113
PIC16C62B/72A
Instruction Set .................................................................... 67
ADDLW ...................................................................... 69
ADDWF ...................................................................... 69
ANDLW ...................................................................... 69
ANDWF ...................................................................... 69
BCF ............................................................................ 69
BSF ............................................................................ 69
BTFSC ....................................................................... 70
BTFSS ....................................................................... 70
CALL .......................................................................... 70
CLRF ......................................................................... 70
CLRW ......................................................................... 70
CLRWDT ................................................................... 70
COMF ........................................................................ 71
DECF ......................................................................... 71
DECFSZ .................................................................... 71
GOTO ........................................................................ 71
INCF .......................................................................... 71
INCFSZ ...................................................................... 71
IORLW ....................................................................... 72
IORWF ....................................................................... 72
MOVF ........................................................................ 72
MOVLW ..................................................................... 72
MOVWF ..................................................................... 72
NOP ........................................................................... 72
RETFIE ...................................................................... 73
RETLW ...................................................................... 73
RETURN .................................................................... 73
RLF ............................................................................ 73
RRF ........................................................................... 73
SLEEP ....................................................................... 73
SUBLW ...................................................................... 74
SUBWF ...................................................................... 74
SWAPF ...................................................................... 74
XORLW ...................................................................... 74
XORWF ..................................................................... 74
Summary Table ......................................................... 68
INTCON Register .......................................................... 9, 13
GIE Bit ....................................................................... 13
INTE Bit ..................................................................... 13
INTF Bit ...................................................................... 13
PEIE Bit ..................................................................... 13
RBIE Bit ..................................................................... 13
RBIF Bit .............................................................. 13, 21
T0IE Bit ...................................................................... 13
T0IF Bit ...................................................................... 13
Interrupt Sources ........................................................ 55, 62
A/D Conversion Complete ......................................... 51
Block Diagram ........................................................... 62
Capture Complete (CCP) ........................................... 34
Compare Complete (CCP) ......................................... 35
Interrupt on Change (RB7:RB4 ) ............................... 21
RB0/INT Pin, External ........................................... 6, 63
SSP Receive/Transmit Complete .............................. 39
TMR0 Overflow ................................................... 26, 63
TMR1 Overflow ................................................... 27, 29
TMR2 to PR2 Match .................................................. 32
TMR2 to PR2 Match (PWM) ............................... 31, 36
Interrupts, Context Saving During ...................................... 63
Interrupts, Enable Bits
A/D Converter Enable (ADIE Bit) ............................... 14
CCP1 Enable (CCP1IE Bit) ....................................... 14
Global Interrupt Enable (GIE Bit) ........................ 13, 62
Interrupt on Change (RB7:RB4)
Enable (RBIE Bit) ................................................ 13, 63
Peripheral Interrupt Enable (PEIE Bit) ....................... 13
DS35008B-page 114
K
KeeLoq Evaluation and Programming Tools .................. 78
M
Master Clear (MCLR) .......................................................... 6
MCLR Reset, Normal Operation .................. 57, 60, 61
MCLR Reset, SLEEP ................................... 57, 60, 61
Memory Organization
Data Memory ............................................................... 8
Program Memory ......................................................... 7
MPLAB Integrated Development Environment Software .. 75
O
OPCODE Field Descriptions ............................................. 67
OPTION_REG Register ..............................................10, 12
INTEDG Bit ................................................................ 12
PS2:PS0 Bits .......................................................12, 25
PSA Bit ................................................................12, 25
RBPU Bit ................................................................... 12
T0CS Bit ..............................................................12, 25
T0SE Bit ..............................................................12, 25
OSC1/CLKIN Pin ................................................................. 6
OSC2/CLKOUT Pin .............................................................. 6
Oscillator Configuration ...............................................55, 56
HS .......................................................................56, 60
LP ........................................................................56, 60
RC .................................................................. 6, 57, 60
Selection (FOSC1:FOSC0 Bits).................................. 55
XT ........................................................................56, 60
Oscillator, Timer1 ........................................................27, 29
Oscillator, WDT ................................................................. 64
P
Packaging ........................................................................ 105
Paging, Program Memory .............................................7, 17
PCON Register ............................................................16, 60
BOR Bit ..................................................................... 16
POR Bit ..................................................................... 16
PICDEM-1 Low-Cost PICmicro Demo Board .................... 77
PICDEM-2 Low-Cost PIC16CXX Demo Board ................. 77
PICDEM-3 Low-Cost PIC16CXXX Demo Board ............... 77
PICSTART Plus Entry Level Development System ........ 77
PIE1 Register ..............................................................10, 14
ADIE Bit ..................................................................... 14
CCP1IE Bit ................................................................ 14
SSPIE Bit ................................................................... 14
TMR1IE Bit ................................................................ 14
TMR2IE Bit ................................................................ 14
Pinout Descriptions
PIC16C62B/PIC16C72A ............................................. 6
Preliminary
PIC16C62B/72A
PIR1 Register ............................................................... 9, 15
ADIF Bit ..................................................................... 15
CCP1IF Bit ................................................................. 15
SSPIF Bit ................................................................... 15
TMR1IF Bit ................................................................ 15
TMR2IF Bit ................................................................ 15
Pointer, FSR ...................................................................... 18
PORTA ................................................................................ 6
Analog Port Pins .......................................................... 6
PORTA Register ................................................... 9, 19
RA3:RA0 and RA5 Port Pins ..................................... 19
RA4/T0CKI Pin ..................................................... 6, 19
RA5/SS/AN4 Pin ................................................... 6, 39
TRISA Register ................................................... 10, 19
PORTB ................................................................................ 6
PORTB Register ................................................... 9, 21
Pull-up Enable (RBPU Bit) ......................................... 12
RB0/INT Edge Select (INTEDG Bit) .......................... 12
RB0/INT Pin, External .......................................... 6, 63
RB3:RB0 Port Pins .................................................... 21
RB7:RB4 Interrupt on Change ................................... 63
RB7:RB4 Interrupt on Change
Enable (RBIE Bit) ............................................... 13, 63
RB7:RB4 Interrupt on Change
Flag (RBIF Bit) ..............................................13, 21, 63
RB7:RB4 Port Pins .................................................... 21
TRISB Register ................................................... 10, 21
PORTC ................................................................................ 6
Block Diagram ........................................................... 23
PORTC Register ................................................... 9, 23
RC0/T1OSO/T1CKI Pin ............................................... 6
RC1/T1OSI Pin ............................................................ 6
RC2/CCP1 Pin ............................................................. 6
RC3/SCK/SCL Pin ................................................ 6, 39
RC4/SDI/SDA Pin ................................................. 6, 39
RC5/SDO Pin ....................................................... 6, 39
RC6 Pin ....................................................................... 6
RC7 Pin ....................................................................... 6
TRISC Register .................................................. 10, 23
Postscaler, Timer2
Select (TOUTPS3:TOUTPS0 Bits) ............................ 31
Postscaler, WDT ................................................................ 25
Assignment (PSA Bit) ......................................... 12, 25
Block Diagram ........................................................... 26
Rate Select (PS2:PS0 Bits) ................................ 12, 25
Switching Between Timer0 and WDT ........................ 26
Power-on Reset (POR) ........................... 55, 57, 59, 60, 61
Oscillator Start-up Timer (OST) .......................... 55, 59
POR Status (POR Bit) ............................................... 16
Power Control (PCON) Register ................................ 60
Power-down (PD Bit) .......................................... 11, 57
Power-on Reset Circuit, External .............................. 59
Power-up Timer (PWRT) .................................... 55, 59
PWRT Enable (PWRTE Bit) ...................................... 55
Time-out (TO Bit) ................................................ 11, 57
Time-out Sequence ................................................... 60
Timing Diagram ......................................................... 92
Prescaler, Capture ............................................................. 34
Prescaler, Timer0 .............................................................. 25
Assignment (PSA Bit) ......................................... 12, 25
Block Diagram ........................................................... 26
Rate Select (PS2:PS0 Bits) ................................ 12, 25
Switching Between Timer0 and WDT ........................ 26
Prescaler, Timer1 .............................................................. 28
Select (T1CKPS1:T1CKPS0 Bits)............................... 27
Q
Q-Clock ............................................................................. 36
R
Register File ........................................................................ 8
Register File Map ................................................................ 8
Reset ...........................................................................55, 57
Block Diagram ........................................................... 58
Reset Conditions for All Registers ............................ 61
Reset Conditions for PCON Register ........................ 60
Reset Conditions for Program Counter ..................... 60
Reset Conditions for STATUS Register .................... 60
Timing Diagram ......................................................... 92
Revision History .............................................................. 111
S
SEEVAL Evaluation and Programming System ............. 78
SLEEP .................................................................. 55, 57, 65
Software Simulator (MPLAB-SIM) ..................................... 76
Special Features of the CPU ............................................. 55
Special Function Registers .................................................. 9
Speed, Operating ................................................................ 1
SPI (SSP Module)
Block Diagram ........................................................... 39
Buffer Full Status (BF Bit) ......................................... 46
Clock Edge Select (CKE Bit) ..................................... 46
Clock Polarity Select (CKP Bit) ................................. 47
Data Input Sample Phase (SMP Bit) ......................... 46
Mode Select (SSPM3:SSPM0 Bits) .......................... 47
Receive Overflow Indicator (SSPOV Bit) .................. 47
Serial Clock (RC3/SCK/SCL) .................................... 39
Serial Data In (RC4/SDI/SDA) .................................. 39
Serial Data Out (RC5/SDO) ...................................... 39
Slave Select (RA5/SS/AN4) ...................................... 39
Synchronous Serial Port Enable (SSPEN Bit) .......... 47
Preliminary
DS35008B-page 115
PIC16C62B/72A
SSP .................................................................................... 39
Enable (SSPIE Bit) .................................................... 14
Flag (SSPIF Bit) ......................................................... 15
RA5/SS/AN4 Pin .......................................................... 6
RC3/SCK/SCL Pin ....................................................... 6
RC4/SDI/SDA Pin ........................................................ 6
RC5/SDO Pin ............................................................... 6
SSPADD Register ...................................................... 10
SSPBUF Register ........................................................ 9
SSPCON Register ................................................ 9, 47
SSPSTAT Register ............................................. 10, 46
TMR2 Output for Clock Shift ...................................... 32
Write Collision Detect (WCOL Bit) ............................. 47
SSPCON Register ............................................................. 47
CKP Bit ...................................................................... 47
SSPEN Bit ................................................................. 47
SSPM3:SSPM0 Bits .................................................. 47
SSPOV Bit ................................................................. 47
WCOL Bit ................................................................... 47
SSPSTAT Register ............................................................ 46
BF Bit ......................................................................... 46
CKE Bit ...................................................................... 46
D/A Bit ........................................................................ 46
P bit ..................................................................... 45, 46
R/W Bit ................................................... 42, 43, 44, 46
S Bit .................................................................... 45, 46
SMP Bit ...................................................................... 46
UA Bit ......................................................................... 46
Stack .................................................................................. 17
STATUS Register ...................................................9, 11, 63
C Bit ........................................................................... 11
DC Bit ........................................................................ 11
IRP Bit ........................................................................ 11
PD Bit .................................................................. 11, 57
RP1:RP0 Bits ............................................................. 11
TO Bit .................................................................. 11, 57
Z Bit ........................................................................... 11
T
T1CON Register ........................................................... 9, 27
T1CKPS1:T1CKPS0 Bits ........................................... 27
T1OSCEN Bit ............................................................. 27
T1SYNC Bit ............................................................... 27
TMR1CS Bit ............................................................... 27
TMR1ON Bit .............................................................. 27
T2CON Register ........................................................... 9, 31
T2CKPS1:T2CKPS0 Bits ........................................... 31
TMR2ON Bit .............................................................. 31
TOUTPS3:TOUTPS0 Bits .......................................... 31
Timer0 ................................................................................ 25
Block Diagram ........................................................... 25
Clock Source Edge Select (T0SE Bit) ................ 12, 25
Clock Source Select (T0CS Bit) .......................... 12, 25
Overflow Enable (T0IE Bit) ........................................ 13
Overflow Flag (T0IF Bit) ...................................... 13, 63
Overflow Interrupt ............................................... 26, 63
RA4/T0CKI Pin, External Clock ................................... 6
Timing Diagram ......................................................... 93
TMR0 Register ............................................................. 9
DS35008B-page 116
Timer1 ............................................................................... 27
Block Diagram ........................................................... 28
Capacitor Selection ................................................... 29
Clock Source Select (TMR1CS Bit) ........................... 27
External Clock Input Sync (T1SYNC Bit) .................. 27
Module On/Off (TMR1ON Bit) ................................... 27
Oscillator .............................................................27, 29
Oscillator Enable (T1OSCEN Bit) .............................. 27
Overflow Enable (TMR1IE Bit) .................................. 14
Overflow Flag (TMR1IF Bit) ....................................... 15
Overflow Interrupt ................................................27, 29
RC0/T1OSO/T1CKI Pin ............................................... 6
RC1/T1OSI .................................................................. 6
Special Event Trigger (CCP) ...............................29, 35
T1CON Register ....................................................9, 27
Timing Diagram ......................................................... 93
TMR1H Register .......................................................... 9
TMR1L Register .......................................................... 9
Timer2
Block Diagram ........................................................... 32
PR2 Register ................................................ 10, 31, 36
SSP Clock Shift ......................................................... 32
T2CON Register ....................................................9, 31
TMR2 Register ......................................................9, 31
TMR2 to PR2 Match Enable (TMR2IE Bit) ................ 14
TMR2 to PR2 Match Flag (TMR2IF Bit) .................... 15
TMR2 to PR2 Match Interrupt ...................... 31, 32, 36
Timing Diagrams
I2C Reception (7-bit Address) ................................... 43
Wake-up from SLEEP via Interrupt ........................... 66
Timing Diagrams and Specifications ................................. 90
A/D Conversion ....................................................... 102
Brown-out Reset (BOR) ............................................ 92
Capture/Compare/PWM (CCP) ................................. 94
CLKOUT and I/O ....................................................... 91
External Clock ........................................................... 90
I2C Bus Data ........................................................... 100
I2C Bus Start/Stop Bits .............................................. 99
Oscillator Start-up Timer (OST) ................................. 92
Power-up Timer (PWRT) ........................................... 92
Reset ........................................................................... 2
Timer0 and Timer1 .................................................... 93
Watchdog Timer (WDT) ............................................ 92
W
W Register ......................................................................... 63
Wake-up from SLEEP .................................................55, 65
Interrupts .............................................................60, 61
MCLR Reset .............................................................. 61
Timing Diagram ......................................................... 66
WDT Reset ................................................................ 61
Watchdog Timer (WDT) ..............................................55, 64
Block Diagram ........................................................... 64
Enable (WDTE Bit) ..............................................55, 64
Programming Considerations .................................... 64
RC Oscillator ............................................................. 64
Timing Diagram ......................................................... 92
WDT Reset, Normal Operation .................... 57, 60, 61
WDT Reset, SLEEP ..................................... 57, 60, 61
WWW, On-Line Support ...................................................... 3
Preliminary
PIC16C62B/72A
ON-LINE SUPPORT
Preliminary
DS35008B-page 117
PIC16C62B/72A
READER RESPONSE
It is our intention to provide you with the best documentation possible to ensure successful use of your Microchip product. If you wish to provide your comments on organization, clarity, subject matter, and ways in which our documentation
can better serve you, please FAX your comments to the Technical Publications Manager at (480) 786-7578.
Please list the following information, and use this outline to provide us with your comments about this Data Sheet.
To:
RE:
Reader Response
From: Name
Company
Address
City / State / ZIP / Country
Telephone: (_______) _________ - _________
Application (optional):
Would you like a reply?
Device: PIC16C62B/72A
N
Literature Number: DS35008B
Questions:
1. What are the best features of this document?
2. How does this document meet your hardware and software development needs?
3. Do you find the organization of this data sheet easy to follow? If not, why?
4. What additions to the data sheet do you think would enhance the structure and subject?
5. What deletions from the data sheet could be made without affecting the overall usefulness?
8. How would you improve our software, systems, and silicon products?
DS35008B-page 118
Preliminary
PIC16C62B/72A
PIC16C62B/72A PRODUCT IDENTIFICATION SYSTEM
To order or obtain information, e.g., on pricing or delivery refer to the factory or the listed sales office.
Examples
Package:
JW
SO
SP
P
SS
=
=
=
=
=
Temperature
Range:
I
E
= 0C to +70C
= -40C to +85C
= -40C to +125C
Frequency
Range:
04
10
20
= 4 MHz
= 10 MHz
= 20 MHz
Device
PIC16C62B:
PIC16C62BT:
PIC16LC62B:
PIC16LC62BT:
Windowed CERDIP
SOIC
Skinny plastic dip
PDIP
SSOP
a)
PIC16C72A-04/P 301
Commercial Temp.,
PDIP Package, 4 MHz,
normal VDD limits, QTP
pattern #301
b)
* JW Devices are UV erasable and can be programmed to any device configuration. JW Devices meet the electrical requirement of
each oscillator type (including LC devices).
Please specify which device, revision of silicon and Data Sheet (include Literature #) you are using.
New Customer Notification System
Register on our web site (www.microchip.com/cn) to receive the most current information on our products.
Preliminary
DS35008B-page 119
Note the following details of the code protection feature on PICmicro MCUs.
The PICmicro family meets the specifications contained in the Microchip Data Sheet.
Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today,
when used in the intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet.
The person doing so may be engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of
our product.
If you have any further questions about this matter, please contact the local sales office nearest to you.
Trademarks
The Microchip name and logo, the Microchip logo, FilterLab,
KEELOQ, microID, MPLAB, PIC, PICmicro, PICMASTER,
PICSTART, PRO MATE, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
dsPIC, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB,
In-Circuit Serial Programming, ICSP, ICEPIC, microPort,
Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM,
MXDEV, PICC, PICDEM, PICDEM.net, rfPIC, Select Mode
and Total Endurance are trademarks of Microchip Technology
Incorporated in the U.S.A.
Serialized Quick Turn Programming (SQTP) is a service mark
of Microchip Technology Incorporated in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
2002, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
M
WORLDWIDE SALES AND SERVICE
AMERICAS
ASIA/PACIFIC
Japan
Corporate Office
Australia
Rocky Mountain
China - Beijing
Atlanta
500 Sugar Mill Road, Suite 200B
Atlanta, GA 30350
Tel: 770-640-0034 Fax: 770-640-0307
Boston
2 Lan Drive, Suite 120
Westford, MA 01886
Tel: 978-692-3848 Fax: 978-692-3821
Chicago
333 Pierce Road, Suite 180
Itasca, IL 60143
Tel: 630-285-0071 Fax: 630-285-0075
Dallas
4570 Westgrove Drive, Suite 160
Addison, TX 75001
Tel: 972-818-7423 Fax: 972-818-2924
Detroit
Tri-Atria Office Building
32255 Northwestern Highway, Suite 190
Farmington Hills, MI 48334
Tel: 248-538-2250 Fax: 248-538-2260
Kokomo
2767 S. Albright Road
Kokomo, Indiana 46902
Tel: 765-864-8360 Fax: 765-864-8387
Los Angeles
18201 Von Karman, Suite 1090
Irvine, CA 92612
Tel: 949-263-1888 Fax: 949-263-1338
China - Chengdu
Microchip Technology Consulting (Shanghai)
Co., Ltd., Chengdu Liaison Office
Rm. 2401, 24th Floor,
Ming Xing Financial Tower
No. 88 TIDU Street
Chengdu 610016, China
Tel: 86-28-6766200 Fax: 86-28-6766599
China - Fuzhou
Microchip Technology Consulting (Shanghai)
Co., Ltd., Fuzhou Liaison Office
Unit 28F, World Trade Plaza
No. 71 Wusi Road
Fuzhou 350001, China
Tel: 86-591-7503506 Fax: 86-591-7503521
China - Shanghai
Microchip Technology Consulting (Shanghai)
Co., Ltd.
Room 701, Bldg. B
Far East International Plaza
No. 317 Xian Xia Road
Shanghai, 200051
Tel: 86-21-6275-5700 Fax: 86-21-6275-5060
China - Shenzhen
San Jose
Hong Kong
New York
Toronto
6285 Northam Drive, Suite 108
Mississauga, Ontario L4V 1X5, Canada
Tel: 905-673-0699 Fax: 905-673-6509
India
Microchip Technology Inc.
India Liaison Office
Divyasree Chambers
1 Floor, Wing A (A3/A4)
No. 11, OShaugnessey Road
Bangalore, 560 025, India
Tel: 91-80-2290061 Fax: 91-80-2290062
Korea
Microchip Technology Korea
168-1, Youngbo Bldg. 3 Floor
Samsung-Dong, Kangnam-Ku
Seoul, Korea 135-882
Tel: 82-2-554-7200 Fax: 82-2-558-5934
Singapore
Microchip Technology Singapore Pte Ltd.
200 Middle Road
#07-02 Prime Centre
Singapore, 188980
Tel: 65-334-8870 Fax: 65-334-8850
Taiwan
Microchip Technology Taiwan
11F-3, No. 207
Tung Hua North Road
Taipei, 105, Taiwan
Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
EUROPE
Denmark
Microchip Technology Nordic ApS
Regus Business Centre
Lautrup hoj 1-3
Ballerup DK-2750 Denmark
Tel: 45 4420 9895 Fax: 45 4420 9910
France
Microchip Technology SARL
Parc dActivite du Moulin de Massy
43 Rue du Saule Trapu
Batiment A - ler Etage
91300 Massy, France
Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79
Germany
Microchip Technology GmbH
Gustav-Heinemann Ring 125
D-81739 Munich, Germany
Tel: 49-89-627-144 0 Fax: 49-89-627-144-44
Italy
Microchip Technology SRL
Centro Direzionale Colleoni
Palazzo Taurus 1 V. Le Colleoni 1
20041 Agrate Brianza
Milan, Italy
Tel: 39-039-65791-1 Fax: 39-039-6899883
United Kingdom
Arizona Microchip Technology Ltd.
505 Eskdale Road
Winnersh Triangle
Wokingham
Berkshire, England RG41 5TU
Tel: 44 118 921 5869 Fax: 44-118 921-5820
01/18/02