PIC16C63A/65B/73B/74B: 8-Bit CMOS Microcontrollers With A/D Converter
PIC16C63A/65B/73B/74B: 8-Bit CMOS Microcontrollers With A/D Converter
PIC16C73B
PIC16C65B
PIC16C74B
I/O
Pins
A/D
Chan.
PSP
22
33
22
33
5
8
No
Yes
No
Yes
Pin Diagram:
PDIP, Windowed CERDIP
MCLR/VPP
RA0/AN0
RA1/AN1
RA2/AN2
RA3/AN3/VREF
RA4/T0CKI
RA5/SS/AN4
RE0/RD/AN5
RE1/WR/AN6
RE2/CS/AN7
VDD
VSS
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
RD0/PSP0
RD1/PSP1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0/INT
VDD
VSS
RD7/PSP7
RD6/PSP6
RD5/PSP5
RD4/PSP4
RC7/RX/DT
RC6/TX/CK
RC5/SDO
RC4/SDI/SDA
RD3/PSP3
RD2/PSP2
Interrupts
PIC16C63A
PIC16C65B
PIC16C73B
PIC16C74B
PIC16C65B
PIC16C74B
10
11
11
12
DS30605C-page 1
PIC16C63A/65B/73B/74B
SDIP, SOIC, Windowed CERDIP
25
5
6
7
8
9
10
20
19
17
16
14
15
RA3/AN3/VREF
RA2/AN2
RA1/AN1
RA0/AN0
MCLR/VPP
NC
RB7
RB6
RB5
RB4
NC
18
13
MQFP
TQFP
RB3
RB2
RB1
RB0/INT
VDD
VSS
RD7/PSP7
RD6/PSP6
RD5/PSP5
RD4/PSP4
RC7/RX/DT
39
38
37
36
35
34
33
32
31
30
29
PIC16C65B
PIC16C74B
21
Key Features
PICmicro Mid-Range MCU Family
Reference Manual (DS33023)
1
2
3
4
5
6
7
8
9
10
11
PIC16C65B
PIC16C74B
33
32
31
30
29
28
27
26
25
24
23
NC
RC0/T1OSO/T1CKI
OSC2/CLKOUT
OSC1/CLKIN
VSS
VDD
RE2/CS/AN7
RE1/WR/AN6
RE0/RD/AN5
RA5/SS/AN4
RA4/T0CKI
NC
NC
RB4
RB5
RB6
RB7
MCLR/VPP
RA0/AN0
RA1/AN1
RA2/AN2
RA3/AN3/VREF
RC7/RX/DT
RD4/PSP4
RD5/PSP5
RD6/PSP6
RD7/PSP7
VSS
VDD
RB0/INT
RB1
RB2
RB3
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
RD0/PSP0
RD1/PSP1
RD2/PSP2
RD3/PSP3
RC4/SDI/SDA
RC5/SDO
RC6/TX/CK
NC
7
8
9
10
11
12
13
14
15
16
17
22
12
18
19
20
21
22
23
24
25
26
27
28
RA4/T0CKI
RA5/SS/AN4
RE0/RD/AN5
RE1/WR/AN6
RE2/CS/AN7
VDD
VSS
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CKI
NC
23
11
6
5
4
3
2
1
44
43
42
41
40
PLCC
24
RC6/TX/CK
RC5/SDO
RC4/SDI/SDA
RD3/PSP3
RD2/PSP2
RD1/PSP1
RD0/PSP0
RC3/SCK/SCL
RC2/CCP1
RC1/T1OSI/CCP2
NC
26
44
43
42
41
40
39
38
37
36
35
34
27
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0/INT
VDD
VSS
RC7/RX/DT
RC6/TX/CK
RC5/SDO
RC4/SDI/SDA
28
PIC16C63A
PIC16C73B
12
13
14
15
16
17
18
19
20
21
22
MCLR/VPP
RA0/AN0
RA1/AN1
RA2/AN2
RA3/AN3/VREF
RA4/T0CKI
RA5/SS/AN4
VSS
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
PIC16C63A
PIC16C65B
PIC16C73B
PIC16C74B
4K
4K
4K
4K
192
192
192
192
Pins
28
40
28
40
Yes
Yes
Capture/Compare/PWM Modules
Timer Modules
A/D Channels
8
2
Serial Communication
SPI/I C, USART
SPI/I C, USART
SPI/I C, USART
Yes
Yes
Yes
SPI/I C, USART
Yes
Brown-out Reset
Yes
Yes
Yes
Yes
Interrupt Sources
10
11
11
12
Packages
40-pin PDIP;
44-pin PLCC,
MQFP, TQFP,
Windowed CERDIP
40-pin PDIP;
44-pin PLCC,
MQFP, TQFP,
Windowed CERDIP
DS30605C-page 2
PIC16C63A/65B/73B/74B
Table of Contents
1.0 General Description...................................................................................................................................................................... 5
2.0 PIC16C63A/65B/73B/74B Device Varieties ................................................................................................................................. 7
3.0 Architectural Overview ................................................................................................................................................................. 9
4.0 Memory Organization ................................................................................................................................................................. 15
5.0 I/O Ports ..................................................................................................................................................................................... 29
6.0 Timer0 Module ........................................................................................................................................................................... 39
7.0 Timer1 Module ........................................................................................................................................................................... 43
8.0 Timer2 Module ........................................................................................................................................................................... 47
9.0 Capture/Compare/PWM Modules .............................................................................................................................................. 49
10.0 Synchronous Serial Port (SSP) Module ..................................................................................................................................... 55
11.0 Addressable Universal Synchronous Asynchronous Receiver Transmitter (USART)................................................................ 65
12.0 Analog-to-Digital Converter (A/D) Module ................................................................................................................................. 79
13.0 Special Features of the CPU...................................................................................................................................................... 85
14.0 Instruction Set Summary ............................................................................................................................................................ 99
15.0 Development Support............................................................................................................................................................... 107
16.0 Electrical Characteristics .......................................................................................................................................................... 113
17.0 DC and AC Characteristics Graphs and Tables....................................................................................................................... 139
18.0 Packaging Information.............................................................................................................................................................. 153
Appendix A: Revision History ........................................................................................................................................................ 165
Appendix B: Device Differences..................................................................................................................................................... 165
Appendix C: Device Migrations - PIC16C63/65A/73A/74A PIC16C63A/65B/73B/74B ............................................................. 166
Appendix D: Migration from Baseline to Mid-Range Devices......................................................................................................... 168
On-Line Support................................................................................................................................................................................. 175
Reader Response .............................................................................................................................................................................. 176
Product Identification System ............................................................................................................................................................ 177
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. 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) 792-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.
DS30605C-page 3
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 4
PIC16C63A/65B/73B/74B
1.0
GENERAL DESCRIPTION
1.1
Users familiar with the PIC16C5X microcontroller family will realize that this is an enhanced version of the
PIC16C5X architecture. Please refer to Appendix A for
a detailed list of enhancements. Code written for the
PIC16C5X can be easily ported to the PIC16CXX family of devices (Appendix B).
1.2
Development Support
DS30605C-page 5
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 6
PIC16C63A/65B/73B/74B
2.0
PIC16C63A/65B/73B/74B
DEVICE VARIETIES
2.
2.1
UV Erasable Devices
2.3
Quick-Turnaround-Production
(QTP) Devices
Microchip offers a QTP Programming Service for factory production orders. This service is made available
for users who choose not to program a medium to high
quantity of units and whose code patterns have stabilized. The devices are identical to the OTP devices but
with all EPROM locations and configuration options
already programmed by the factory. Certain code and
prototype verification procedures apply before production shipments are available. Please contact your local
Microchip Technology sales office for more details.
2.4
Serialized Quick-Turnaround
Production (SQTPSM) Devices
2.2
One-Time-Programmable (OTP)
Devices
DS30605C-page 7
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 8
PIC16C63A/65B/73B/74B
3.0
ARCHITECTURAL OVERVIEW
DS30605C-page 9
PIC16C63A/65B/73B/74B
FIGURE 3-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
Program
Memory
Program
Bus
RAM
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
PORTC
8
3
Power-up
Timer
Instruction
Decode &
Control
Timing
Generation
OSC1/CLKIN
OSC2/CLKOUT
Oscillator
Start-up Timer
Power-on
Reset
Watchdog
Timer
Brown-out
Reset
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
RC4/SDI/SDA
RC5/SDO
RC6/TX/CK
RC7/RX/DT
MUX
ALU
8
PORTD(3)
RD0/PSP0
RD1/PSP1
RD2/PSP2
RD3/PSP3
RD4/PSP4
RD5/PSP5
RD6/PSP6
RD7/PSP7
W reg
VDD, VSS
(3)
PORTE(3)
RE0/RD/AN5(2,3)
Timer0
Timer1
Timer2
A/D(2)
RE1/WR/AN6(2,3)
RE2/CS/AN7(2,3)
CCP1
CCP2
Synchronous
Serial Port
USART
DS30605C-page 10
PIC16C63A/65B/73B/74B
TABLE 3-1:
Pin Name
DIP
Pin#
SOIC
Pin#
I/O/P
Type
Buffer
Type
Description
OSC1/CLKIN
OSC2/CLKOUT
10
10
MCLR/VPP
I/P
ST
RA0/AN0(4)
I/O
TTL
RA1/AN1(4)
I/O
TTL
RA2/AN2(4)
I/O
TTL
RA3/AN3/VREF(4)
I/O
TTL
RA4/T0CKI
I/O
ST
RA5/SS/AN4(4)
I/O
TTL
RA5 can also be analog input 4(4) or the slave select for
the synchronous serial port.
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)
Interrupt-on-change pin.
Interrupt-on-change pin.
Interrupt-on-change pin. Serial programming clock.
Interrupt-on-change pin. Serial programming data.
PORTC is a bi-directional I/O port.
RC0/T1OSO/T1CKI
11
11
I/O
ST
RC1/T1OSI/CCP2
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/TX/CK
17
17
I/O
ST
RC7/RX/DT
18
18
I/O
ST
VSS
8, 19
8, 19
VDD
20
20
Legend: I = input
O = output
I/O = input/output
P = power
= Not used
TTL = TTL input
ST = Schmitt Trigger input
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.
3: This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise.
4: A/D module is not available in the PIC16C63A.
DS30605C-page 11
PIC16C63A/65B/73B/74B
TABLE 3-2:
DIP
Pin#
PLCC
Pin#
OSC1/CLKIN
13
14
30
OSC2/CLKOUT
14
15
31
MCLR/VPP
18
I/P
ST
Pin Name
Buffer
Type
Description
RA0/AN0
19
I/O
TTL
RA1/AN1(5)
20
I/O
TTL
(5)
RA2/AN2
21
I/O
TTL
RA3/AN3/VREF(5)
22
I/O
TTL
RA4/T0CKI
23
I/O
ST
RA5/SS/AN4(5)
24
I/O
TTL
RA5 can also be analog input 4(5) or the slave select for
the synchronous serial port.
PORTB is a bi-directional I/O port. PORTB can be software
programmed for internal weak pull-up on all inputs.
I/O
TTL/ST(1)
37
I/O
TTL
38
10
I/O
TTL
RB0/INT
33
36
RB1
34
RB2
35
RB3
36
39
11
I/O
TTL
RB4
37
41
14
I/O
TTL
Interrupt-on-change pin.
RB5
38
42
15
I/O
TTL
RB6
39
43
16
I/O
TTL/ST(2)
Interrupt-on-change pin.
RB7
40
44
17
I/O
TTL/ST(2)
Legend: I = input
O = output
I/O = input/output
P = power
= Not used
TTL = TTL input
ST = Schmitt Trigger input
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.
3: This buffer is a Schmitt Trigger input when configured as general purpose I/O and a TTL input when used in the Parallel
Slave Port mode (for interfacing to a microprocessor bus).
4: This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise.
5: A/D is not available on the PIC16C65B.
DS30605C-page 12
PIC16C63A/65B/73B/74B
TABLE 3-2:
Pin Name
DIP
Pin#
PLCC
Pin#
RC0/T1OSO/T1CKI
15
16
32
I/O
ST
RC1/T1OSI/CCP2
16
18
35
I/O
ST
RC2/CCP1
17
19
36
I/O
ST
RC3/SCK/SCL
18
20
37
I/O
ST
RC4/SDI/SDA
23
25
42
I/O
ST
RC5/SDO
24
26
43
I/O
ST
RC6/TX/CK
25
27
44
I/O
ST
RC7/RX/DT
26
29
I/O
ST
Buffer
Type
Description
PORTC is a bi-directional I/O port.
19
21
38
I/O
ST/TTL(3)
RD1/PSP1
20
22
39
I/O
ST/TTL(3)
RD2/PSP2
21
23
40
I/O
ST/TTL(3)
RD3/PSP3
22
24
41
I/O
ST/TTL(3)
RD4/PSP4
27
30
I/O
ST/TTL(3)
RD5/PSP5
28
31
I/O
ST/TTL(3)
RD6/PSP6
29
32
I/O
ST/TTL(3)
RD7/PSP7
30
33
I/O
ST/TTL(3)
(3)
RE0 can also be read control for the parallel slave port,
or analog input 5(5).
25
I/O
ST/TTL
RE1/WR/AN6(5)
10
26
I/O
ST/TTL(3)
RE1 can also be write control for the parallel slave port,
or analog input 6(5).
RE2/CS/AN7(5)
10
11
27
I/O
ST/TTL(3)
RE0/RD/AN5
VSS
12,31
13,34
6,29
VDD
11,32
12,35
7,28
NC
1,17,28,
40
12,13,
33,34
Legend: I = input
O = output
I/O = input/output
P = power
= Not used
TTL = TTL input
ST = Schmitt Trigger input
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.
3: This buffer is a Schmitt Trigger input when configured as general purpose I/O and a TTL input when used in the Parallel
Slave Port mode (for interfacing to a microprocessor bus).
4: This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise.
5: A/D is not available on the PIC16C65B.
DS30605C-page 13
PIC16C63A/65B/73B/74B
3.1
Clocking Scheme/Instruction
Cycle
3.2
Instruction Flow/Pipelining
FIGURE 3-2:
CLOCK/INSTRUCTION CYCLE
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
OSC1
Q1
Internal
phase
clock
Q2
Q3
Q4
PC
OSC2/CLKOUT
(RC mode)
EXAMPLE 3-1:
PC
PC+1
TCY1
Fetch 1
Execute 1
2. MOVWF PORTB
3. CALL
SUB_1
4. BSF
Note:
1. MOVLW 55h
PC+2
Fetch 2
TCY2
TCY3
TCY4
TCY5
Execute 2
Fetch 3
Execute 3
Fetch 4
Flush
Fetch SUB_1 Execute SUB_1
All instructions are single cycle, except for any program branches. These take two cycles, since the fetch instruction is
flushed from the pipeline, while the new instruction is being fetched and then executed.
DS30605C-page 14
PIC16C63A/65B/73B/74B
4.0
MEMORY ORGANIZATION
4.2
4.1
FIGURE 4-1:
PIC16C63A/65B/73B/74B
PROGRAM MEMORY MAP
AND STACK
PC<12:0>
CALL,RETURN
RETFIE,RETLW
RP1:RP0 (STATUS<6:5>)
= 00 Bank0
= 01 Bank1
= 10 Bank2
= 11 Bank3
Each bank extends up to 7Fh (128 bytes). The lower
locations of each bank are reserved for the SFRs.
Above the SFRs are GPRs, implemented as static
RAM.
All implemented banks contain SFRs. Frequently used
SFRs from one bank may be mirrored in another bank
for code reduction and quicker access.
Note:
13
4.2.1
Stack Level 1
The register file can be accessed either directly, or indirectly, through the File Select Register (FSR)
(Section 4.5).
Stack Level 8
RESET Vector
User Memory
Space
0000h
Interrupt Vector
0004h
0005h
On-chip Program
Memory (Page 0)
07FFh
On-chip Program
Memory (Page 1)
0800h
0FFFh
1000h
1FFFh
DS30605C-page 15
PIC16C63A/65B/73B/74B
FIGURE 4-2:
File
Address
00h
01h
02h
03h
04h
05h
06h
07h
08h
09h
0Ah
0Bh
0Ch
0Dh
0Eh
0Fh
10h
11h
12h
13h
14h
15h
16h
17h
18h
19h
1Ah
1Bh
1Ch
1Dh
1Eh
1Fh
20h
File
Address
INDF(1)
TMR0
PCL
STATUS
FSR
PORTA
PORTB
PORTC
PORTD(2)
PORTE(2)
PCLATH
INTCON
PIR1
PIR2
TMR1L
TMR1H
T1CON
TMR2
T2CON
SSPBUF
SSPCON
CCPR1L
CCPR1H
CCP1CON
RCSTA
TXREG
RCREG
CCPR2L
CCPR2H
CCP2CON
ADRES(3)
ADCON0(3)
INDF(1)
OPTION_REG
PCL
STATUS
FSR
TRISA
TRISB
TRISC
TRISD(2)
TRISE(2)
PCLATH
INTCON
PIE1
PIE2
PCON
PR2
SSPADD
SSPSTAT
TXSTA
SPBRG
ADCON1(3)
General
Purpose
Register
General
Purpose
Register
Bank 0
80h
81h
82h
83h
84h
85h
86h
87h
88h
89h
8Ah
8Bh
8Ch
8Dh
8Eh
8Fh
90h
91h
92h
93h
94h
95h
96h
97h
98h
99h
9Ah
9Bh
9Ch
9Dh
9Eh
9Fh
A0h
4.2.2
Bank 1
FFh
7Fh
DS30605C-page 16
PIC16C63A/65B/73B/74B
TABLE 4-1:
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(3)
Bank 0
00h
INDF(4)
01h
02h
Addressing this location uses contents of FSR to address data memory (not a physical register)
TMR0
PCL(4)
03h
STATUS
04h
(4)
FSR(4)
05h
(2)
RP1
RP0
TO
PD
DC
PORTA
06h
IRP
(2)
PORTB
07h
PORTC
08h
PORTD(5)
09h
PORTE(5)
0Ah
PCLATH(1,4)
0Bh
INTCON(4)
0Ch
PIR1
0Dh
PIR2
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
RCSTA
19h
TXREG
1Ah
RCREG
1Bh
CCPR2L
1Ch
CCPR2H
1Dh
CCP2CON
1Eh
ADRES(6)
1Fh
ADCON0
RE2
RE1
RE0
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
PSPIF(5)
ADIF(6)
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
CCP2IF
T1CKPS1
T1CKPS0 T1OSCEN
T1SYNC
TMR1CS
TMR2ON
SSPOV
SSPEN
CKP
SSPM3
SSPM2
SSPM1
(6)
CCP1X
CCP1Y
CCP1M3
CCP1M2
CCP1M1
SPEN
RX9
SREN
CREN
FERR
OERR
CCP2X
CCP2Y
CCP2M3
CCP2M2
CCP2M1
SSPM0
ADCS0
CHS2
CHS1
CHS0
GO/DONE
ADON
DS30605C-page 17
PIC16C63A/65B/73B/74B
TABLE 4-1:
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(3)
Bank 1
80h
INDF(4)
81h
OPTION_REG
82h
PCL(4)
Addressing this location uses contents of FSR to address data memory (not a physical register)
RBPU
INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
IRP
(2)
(2)
RP1
RP0
TO
83h
STATUS
84h
FSR(4)
PD
DC
85h
TRISA
86h
TRISB
87h
TRISC
88h
TRISD(5)
89h
TRISE(5)
IBF
OBF
IBOV
8Ah
PCLATH(1,4)
8Bh
INTCON(4)
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
8Ch
PIE1
PSPIE(5)
ADIE(6)
RCIE
TXIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
8Dh
PIE2
CCP2IE
8Eh
PCON
POR
BOR
PSPMODE
8Fh
Unimplemented
90h
Unimplemented
91h
Unimplemented
92h
PR2
93h
SSPADD
94h
SSPSTAT
D/A
R/W
UA
BF
95h
Unimplemented
96h
Unimplemented
Unimplemented
97h
98h
TXSTA
99h
CSRC
SPBRG
TX9
TXEN
SYNC
BRGH
TRMT
TX9D
9Ah
Unimplemented
9Bh
Unimplemented
9Ch
Unimplemented
9Dh
Unimplemented
9Eh
Unimplemented
9Fh
ADCON1
(6)
PCFG2
PCFG1
PCFG0
DS30605C-page 18
PIC16C63A/65B/73B/74B
4.2.2.1
STATUS Register
REGISTER 4-1:
R/W-0
RP1(1)
R/W-0
RP0
R-1
TO
R-1
PD
R/W-x
Z
R/W-x
DC
R/W-x
C(2)
bit 0
bit 7
bit 6-5
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
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 19
PIC16C63A/65B/73B/74B
4.2.2.2
OPTION Register
Note:
REGISTER 4-2:
R/W-1
INTEDG
R/W-1
T0CS
R/W-1
T0SE
R/W-1
PSA
R/W-1
PS2
bit 7
bit 5
bit 4
bit 3
bit 2-0
R/W-1
PS0
bit 0
bit 6
R/W-1
PS1
TMR0 Rate
000
001
010
011
100
101
110
111
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
Legend:
R = Readable bit
DS30605C-page 20
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
PIC16C63A/65B/73B/74B
4.2.2.3
INTCON Register
Note:
The INTCON register is a readable and writable register, which contains various enable and flag bits for the
TMR0 register overflow, RB Port change and external
RB0/INT pin interrupts.
REGISTER 4-3:
R/W-0
PEIE
R/W-0
T0IE
R/W-0
INTE
R/W-0
RBIE
R/W-0
T0IF
R/W-0
INTF
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
R/W-x
RBIF
bit 0
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 21
PIC16C63A/65B/73B/74B
4.2.2.4
PIE1 Register
Note:
REGISTER 4-4:
R/W-0
ADIE(2)
R/W-0
RCIE
R/W-0
TXIE
R/W-0
SSPIE
bit 7
bit 4
bit 3
bit 2
bit 1
bit 0
R/W-0
TMR1IE
bit 0
bit 5
R/W-0
TMR2IE
bit 6
R/W-0
CCP1IE
DS30605C-page 22
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
PIC16C63A/65B/73B/74B
4.2.2.5
PIR1 Register
Note:
REGISTER 4-5:
R/W-0
ADIF(2)
R-0
RCIF
R-0
TXIF
R/W-0
SSPIF
R/W-0
CCP1IF
R/W-0
TMR2IF
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
R/W-0
TMR1IF
bit 0
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 23
PIC16C63A/65B/73B/74B
4.2.2.6
PIE2 Register
REGISTER 4-6:
bit 7
U-0
U-0
bit 7-1
U-0
U-0
U-0
R/W-0
CCP2IE
bit 0
bit 0
U-0
-n = Value at POR
4.2.2.7
W = Writable bit
1 = Bit is set
0 = Bit is cleared
PIR2 Register
Note:
REGISTER 4-7:
x = Bit is unknown
bit 7
U-0
U-0
U-0
U-0
U-0
U-0
bit 7-1
bit 0
R/W-0
CCP2IF
bit 0
DS30605C-page 24
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
PIC16C63A/65B/73B/74B
4.2.2.8
PCON Register
Note:
REGISTER 4-8:
bit 7
U-0
U-0
U-0
U-0
U-0
R/W-0
POR
R/W-q
BOR
bit 0
bit 7-2
bit 1
bit 0
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 25
PIC16C63A/65B/73B/74B
4.3
FIGURE 4-3:
LOADING OF PC IN
DIFFERENT SITUATIONS
PCH
PCL
12
PC
8
PCLATH<4:0>
Instruction with
PCL as
Destination
ALU
PCLATH
PCH
12
11 10
PCL
8
PC
GOTO,CALL
PCLATH<4:3>
11
Opcode <10:0>
PCLATH
4.3.1
COMPUTED GOTO
4.3.2
4.4
PIC16CXX devices are capable of addressing a continuous 8K word block of program memory. The CALL and
GOTO instructions provide only 11 bits of address to
allow branching within any 2K program memory page.
When executing a CALL or GOTO instruction, the upper
2 bits of the address are provided by PCLATH<4:3>.
When doing a CALL or GOTO instruction, the user must
ensure that the page select bits are programmed, so
that the desired program memory page is addressed. If
a return from a CALL instruction (or interrupt) is executed, the entire 13-bit PC is popped from the stack.
Therefore, manipulation of the PCLATH<4:3> bits are
not required for the return instructions (which POPs the
address from the stack).
Note 1: The contents of PCLATH are unchanged
after a return or RETFIE instruction is
executed. The user must set up PCLATH
for any subsequent CALLs or GOTOs
2: PCLATH<4> is not used in these
PICmicro devices. The use of
PCLATH<4> as a general purpose read/
write bit is not recommended, since this
may affect upward compatibility with
future products.
Example 4-1 shows the calling of a subroutine in
page 1 of the program memory. This example assumes
that PCLATH is saved and restored by the Interrupt
Service Routine (if interrupts are used).
EXAMPLE 4-1:
STACK
DS30605C-page 26
ORG
0x500
BSF
PCLATH,3
CALL SUB1_P1
:
:
ORG
0x900
SUB1_P1
:
:
:
RETURN
CALL OF A SUBROUTINE
IN PAGE 1 FROM PAGE 0
;Select page 1 (800h-FFFh)
;Call subroutine in
;page 1 (800h-FFFh)
;page 1 (800h-FFFh)
;called subroutine
;page 1 (800h-FFFh)
;return to Call subroutine
;in page 0 (000h-7FFh)
PIC16C63A/65B/73B/74B
4.5
EXAMPLE 4-2:
movlw
movwf
clrf
incf
btfss
goto
NEXT
Indirect addressing is possible by using the INDF register. Any instruction using the INDF register actually
accesses the register pointed to by the File Select Register, FSR. Reading the INDF register itself indirectly
(FSR = 0) will read 00h. Writing to the INDF register
indirectly results in a no-operation (although status bits
may be affected). An effective 9-bit address is obtained
by concatenating the 8-bit FSR register and the IRP bit
(STATUS<7>), as shown in Figure 4-4.
INDIRECT ADDRESSING
0x20
FSR
INDF
FSR,F
FSR,4
NEXT
;initialize pointer
;to RAM
;clear INDF register
;inc pointer
;all done?
;no clear next
CONTINUE
:
Note:
;yes continue
FIGURE 4-4:
DIRECT/INDIRECT ADDRESSING
Direct Addressing
RP1:RP0
Indirect Addressing
from opcode
IRP
0
bank select
FSR register
0
bank select
location select
00
00h
01
80h
10
100h
location select
11
180h
not used
Data
Memory
7Fh
Bank 0
FFh
Bank 1
17Fh
Bank 2
1FFh
Bank 3
DS30605C-page 27
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 28
PIC16C63A/65B/73B/74B
5.0
I/O PORTS
FIGURE 5-1:
5.1
Data
Bus
BLOCK DIAGRAM OF
RA3:RA0 AND RA5 PINS
Q
VDD
WR
Port
CK
Data Latch
D
WR
TRIS
VSS
Analog
Input
mode
CK
TRIS Latch
Setting a TRISA register bit puts the corresponding output driver in a hi-impedance mode. Clearing a bit in the
TRISA register puts the contents of the output latch on
the selected pin(s).
I/O pin(1)
TTL
Input
Buffer
RD TRIS
EN
RD Port
To A/D Converter
Note:
EXAMPLE 5-1:
BCF
CLRF
STATUS, RP0
PORTA
BSF
MOVLW
MOVWF
MOVLW
STATUS, RP0
0x06
ADCON1
0xCF
MOVWF
TRISA
FIGURE 5-2:
Data
Bus
WR
Port
CK
WR
TRIS
Initialize PORTA by
clearing output
data latches
Select Bank 1
Configure all pins
as digital inputs
Value used to
initialize data
direction
Set RA<3:0> as inputs
RA<5:4> as outputs
TRISA<7:6> are always
read as 0.
Data Latch
INITIALIZING PORTA
(PIC16C73B/74B)
;
;
;
;
;
;
;
;
;
;
;
;
;
;
BLOCK DIAGRAM OF
RA4/T0CKI PIN
CK
VSS
Schmitt
Trigger
Input
Buffer
TRIS Latch
RD TRIS
Q
D
EN
EN
RD Port
TMR0 Clock Input
Note 1: I/O pins have protection diodes to VDD and VSS.
DS30605C-page 29
PIC16C63A/65B/73B/74B
TABLE 5-1:
PORTA FUNCTIONS
Name
Bit#
Buffer
Function
RA0/AN0(1)
bit0
TTL
RA1/AN1(1)
bit1
TTL
bit2
TTL
bit3
TTL
RA4/T0CKI
bit4
ST
RA5/SS/AN4(1)
bit5
TTL
Input/output or slave select input for synchronous serial port or analog input.
RA2/AN2(1)
RA3/AN3/VREF
(1)
TABLE 5-2:
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
RA5
RA4
RA3
RA2
RA1
RA0
--0x 0000
--0u 0000
--11 1111
--11 1111
---- -000
---- -000
05h
PORTA
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 A/D is not implemented on the PIC16C63A/65B. Pins will operate as digital I/O only. ADCON1 is not implemented;
maintain this register clear.
DS30605C-page 30
PIC16C63A/65B/73B/74B
5.2
PORTB is an 8-bit wide, bi-directional port. The corresponding data direction register is TRISB. Setting a bit
in the TRISB register puts the corresponding output
driver in a hi-impedance input mode. Clearing a bit in
the TRISB register puts the contents of the output latch
on the selected pin(s).
Each of the PORTB pins has a weak internal pull-up. A
single control bit can turn on all the pull-ups. This is performed by clearing bit RBPU (OPTION_REG<7>). The
weak pull-up is automatically turned off when the port
pin is configured as an output. The pull-ups are disabled on a Power-on Reset.
FIGURE 5-3:
BLOCK DIAGRAM OF
RB3:RB0 PINS
VDD
RBPU(2)
Weak
P Pull-up
Data Latch
Data Bus
WR Port
Q
I/O pin(1)
CK
WR TRIS
a)
b)
TRIS Latch
D
TTL
Input
Buffer
CK
FIGURE 5-4:
BLOCK DIAGRAM OF
RB7:RB4 PINS
VDD
RBPU(2)
Weak
P Pull-up
RD TRIS
Q
RD Port
Data Bus
EN
WR Port
I/O pin(1)
CK
TRIS Latch
D
Q
RB0/INT
Schmitt Trigger
Buffer
Note
Data Latch
D
Q
RD Port
WR TRIS
TTL
Input
Buffer
CK
Latch
D
EN
RD Port
Q1
Set RBIF
From other
RB7:RB4 pins
D
RD Port
EN
Q3
ST
Buffer
DS30605C-page 31
PIC16C63A/65B/73B/74B
TABLE 5-3:
PORTB FUNCTIONS
Name
Bit#
Buffer
RB0/INT
bit0
TTL/ST(1)
Function
RB1
bit1
TTL
RB2
bit2
TTL
RB3
bit3
TTL
RB4
bit4
TTL
RB5
bit5
TTL
RB6
bit6
TTL/ST(2)
RB7
bit7
TTL/ST(2)
TABLE 5-4:
Address
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
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0
xxxx xxxx
uuuu uuuu
1111 1111
1111 1111
1111 1111
1111 1111
06h
PORTB
86h
TRISB
81h
OPTION_REG
RBPU
INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
DS30605C-page 32
PIC16C63A/65B/73B/74B
5.3
FIGURE 5-5:
PORTC is an 8-bit bi-directional port. Each pin is individually configurable as an input or output through the
TRISC register. PORTC is multiplexed with several
peripheral functions (Table 5-5). PORTC pins have
Schmitt Trigger input buffers.
PORT/PERIPHERAL Select(2)
Peripheral Data Out
Data Bus
WR
Port
0
D
P
CK
Data Latch
D
WR
TRIS
CK
I/O pin(1)
Q
Q
TRIS Latch
VSS
Schmitt
Trigger
RD TRIS
Peripheral
OE(3)
Note
D
EN
RD
Port
Peripheral Input
TABLE 5-5:
VDD
PORTC FUNCTIONS
Name
Bit#
Buffer Type
Function
RC0/T1OSO/T1CKI
bit0
ST
RC1/T1OSI/CCP2
bit1
ST
RC2/CCP1
bit2
ST
RC3/SCK/SCL
bit3
ST
RC3 can also be the Synchronous Serial Clock for both SPI and I2C modes.
RC4/SDI/SDA
bit4
ST
RC4 can also be the SPI Data In (SPI mode) or Data I/O (I2C mode).
RC5/SDO
bit5
ST
RC6/TX/CK
bit6
ST
RC7/RX/DT
bit7
ST
TABLE 5-6:
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
Address
DS30605C-page 33
PIC16C63A/65B/73B/74B
5.4
FIGURE 5-6:
Note:
Data
Bus
I/O pin(1)
WR
Port
CK
PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is individually configured as an input or
output.
Data Latch
D
WR
TRIS
PORTD can be configured as an 8-bit wide microprocessor port (parallel slave port) by setting control bit
PSPMODE (TRISE<4>). In this mode, the input buffers
are TTL.
Schmitt
Trigger
Input
Buffer
CK
TRIS Latch
RD TRIS
Q
D
EN
EN
RD Port
TABLE 5-7:
Name
PORTD FUNCTIONS
Bit#
Buffer Type
Function
(1)
RD0/PSP0
bit0
ST/TTL
RD1/PSP1
bit1
ST/TTL(1)
bit2
ST/TTL
(1)
ST/TTL
(1)
(1)
RD2/PSP2
RD3/PSP3
bit3
RD4/PSP4
bit4
ST/TTL
RD5/PSP5
bit5
ST/TTL(1)
bit6
ST/TTL
(1)
ST/TTL
(1)
RD6/PSP6
RD7/PSP7
bit7
TABLE 5-8:
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
08h
PORTD
RD7
RD6
RD5
RD4
RD3
RD2
RD1
RD0
xxxx xxxx
uuuu uuuu
88h
TRISD
1111 1111
1111 1111
89h
TRISE
0000 -111
0000 -111
Address
OBF
IBOV
PSPMODE
Legend: x = unknown, u = unchanged, - = unimplemented, read as '0'. Shaded cells are not used by PORTD.
DS30605C-page 34
PIC16C63A/65B/73B/74B
5.5
FIGURE 5-7:
Data
Bus
WR
Port
I/O pin(1)
CK
Data Latch
D
WR
TRIS
Schmitt
Trigger
Input
Buffer
CK
TRIS Latch
I/O PORTE becomes control inputs for the microprocessor port when bit PSPMODE (TRISE<4>) is set. In
this mode, the user must make sure that the
TRISE<2:0> bits are set (pins are configured as digital
inputs) and that register ADCON1 is configured for digital I/O. In this mode, the input buffers are TTL.
Register 5-1 shows the TRISE register, which also controls the parallel slave port operation.
RD TRIS
Q
D
EN
EN
RD Port
On a Power-on Reset, these pins are configured as analog inputs and read as 0s.
TABLE 5-9:
PORTE FUNCTIONS
Name
Bit#
Buffer Type
RE0/RD/AN5
bit0
ST/TTL(1)
Function
Input/output port pin or read control input in Parallel Slave Port mode or analog
input:
RD
1 = Idle
0 = Read operation. Contents of PORTD register is output to PORTD
I/O pins (if chip selected).
RE1/WR/AN6
bit1
ST/TTL(1)
Input/output port pin or write control input in Parallel Slave Port mode or analog
input:
WR
1 = Idle
0 = Write operation. Value of PORTD I/O pins is latched into PORTD
register (if chip selected).
RE2/CS/AN7
bit2
ST/TTL(1)
Input/output port pin or chip select control input in Parallel Slave Port mode or
analog input:
CS
1 = Device is not selected
0 = Device is selected
DS30605C-page 35
PIC16C63A/65B/73B/74B
REGISTER 5-1:
R-0
R/W-0
R/W-0
U-0
R/W-1
R/W-1
R/W-1
IBF
OBF
IBOV
PSPMODE
TRISE2
TRISE1
TRISE0
bit 7
bit 0
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
Address
-n = Value at POR
TABLE 5-10:
W = Writable bit
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
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
RE2
RE1
RE0
---- -xxx
---- -uuu
09h
PORTE
89h
TRISE
IBF
OBF
IBOV
PSPMODE
0000 -111
0000 -111
9Fh
ADCON1
PCFG2
---- -000
---- -000
PCFG1
PCFG0
Legend: x = unknown, u = unchanged, - = unimplemented, read as '0'. Shaded cells are not used by PORTE.
DS30605C-page 36
PIC16C63A/65B/73B/74B
5.6
Note:
When not in PSP mode, the IBF and OBF bits are held
clear. However, if flag bit IBOV was previously set, it
must be cleared in firmware.
An interrupt is generated and latched into flag bit
PSPIF when a read or write operation is completed.
PSPIF must be cleared by the user in firmware and the
interrupt can be disabled by clearing the interrupt
enable bit PSPIE (PIE1<7>).
FIGURE 5-8:
Data Bus
WR
Port
RDx
pin
CK
TTL
Q
RD
Port
D
EN
EN
Read
TTL
RD
Chip Select
TTL
CS
TTL
WR
Write
DS30605C-page 37
PIC16C63A/65B/73B/74B
FIGURE 5-9:
Q2
Q3
Q4
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
CS
WR
RD
PORTD<7:0>
IBF
OBF
PSPIF
FIGURE 5-10:
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
CS
WR
RD
PORTD<7:0>
IBF
OBF
PSPIF
TABLE 5-11:
Address
Name
08h
PORTD
09h
PORTE
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
xxxx xxxx
uuuu uuuu
RE2
RE1
RE0
---- -xxx
---- -uuu
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
89h
TRISE
IBF
OBF
IBOV
PSPMODE
0000 -111
0000 -111
0Ch
PIR1
PSPIF
ADIF
RCIF
TXIF
SSPIF
CCP1IF
TMR1IF
0000 0000
0000 0000
8Ch
PIE1
PSPIE
ADIE
RCIE
TXIE
SSPIE
0000 0000
0000 0000
9Fh
ADCON1
PCFG2
---- -000
---- -000
TMR2IF
PCFG1
PCFG0
Legend: x = unknown, u = unchanged, - = unimplemented, read as '0'. Shaded cells are not used by the Parallel Slave Port.
DS30605C-page 38
PIC16C63A/65B/73B/74B
6.0
TIMER0 MODULE
8-bit timer/counter
Readable and writable
8-bit software programmable prescaler
Internal or external clock select
Interrupt on overflow from FFh to 00h
Edge select for external clock
6.1
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 6-1:
Timer0 Interrupt
CLKOUT (= FOSC/4)
0
RA4/T0CKI
pin
M
U
X
1
M
U
X
SYNC
2
Cycles
TMR0 reg
T0SE
T0CS
PSA
PRESCALER
Watchdog
Timer
M
U
X
8-bit Prescaler
8
8 - to - 1MUX
PS2:PS0
PSA
0
MUX
PSA
WDT
Time-out
Note: T0CS, T0SE, PSA, PS2:PS0 are (OPTION_REG<5:0>).
DS30605C-page 39
PIC16C63A/65B/73B/74B
6.2
module means that there is no prescaler for the Watchdog Timer, and vice-versa. This prescaler is not readable or writable (see Figure 6-1).
6.3
Prescaler
Note:
REGISTER 6-1:
OPTION_REG REGISTER
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
bit 7
bit 0
bit 7
RBPU
bit 6
INTEDG
bit 5
bit 4
bit 3
bit 2-0
TMR0 Rate
WDT Rate
000
001
010
011
100
101
110
111
1:2
1:4
1:8
1 : 16
1 : 32
1 : 64
1 : 128
1 : 256
1:1
1:2
1:4
1:8
1 : 16
1 : 32
1 : 64
1 : 128
Legend:
R = Readable bit
-n = Value at POR
Note:
W = Writable bit
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
To avoid an unintended device RESET, the instruction sequence shown in the PICmicro Mid-Range MCU
Family Reference Manual (DS33023, Section 11.6) must be executed when changing the prescaler assignment from Timer0 to the WDT. This sequence must be followed even if the WDT is disabled.
DS30605C-page 40
PIC16C63A/65B/73B/74B
TABLE 6-1:
Address
Bit 7
Bit 6
01h
TMR0
0Bh,8Bh
INTCON
81h
Bit 5
Bit 3
Bit 2
Bit 1
Bit 0
PEIE
Value on:
POR,
BOR
Value on
all other
RESETS
xxxx xxxx
Bit 4
uuuu uuuu
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
T0CS
T0SE
PSA
PS2
PS1
PS0
1111 1111
1111 1111
Legend: x = unknown, u = unchanged, - = unimplemented locations read as '0'. Shaded cells are not used by Timer0.
DS30605C-page 41
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 42
PIC16C63A/65B/73B/74B
7.0
TIMER1 MODULE
REGISTER 7-1:
U-0
R/W-0
R/W-0
T1CKPS1 T1CKPS0
R/W-0
T1OSCEN
R/W-0
R/W-0
R/W-0
bit 7
bit 0
bit 7-6
bit 5-4
bit 3
bit 2
bit 1
bit 0
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 43
PIC16C63A/65B/73B/74B
7.1
7.2
FIGURE 7-1:
Synchronized
Clock Input
TMR1
TMR1L
1
TMR1ON
On/Off
T1OSC
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2(2)
T1SYNC
(2)
1
T1OSCEN FOSC/4
Enable
Internal
Oscillator(1) Clock
Synchronize
Prescaler
1, 2, 4, 8
det
0
2
T1CKPS1:T1CKPS0
TMR1CS
SLEEP Input
Note 1: When the T1OSCEN bit is cleared, the inverter is turned off. This eliminates power drain.
2: For the PIC16C65B/73B/74B, the Schmitt Trigger is not implemented in External Clock mode.
DS30605C-page 44
PIC16C63A/65B/73B/74B
7.3
Timer1 Operation in
Asynchronous Counter Mode
7.3.1
7.4
Timer1 Oscillator
TABLE 7-1:
Osc Type
C1
C2
LP
32 kHz
33 pF
33 pF
100 kHz
15 pF
15 pF
200 kHz
15 pF
15 pF
These values are for design guidance only.
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.
7.5
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 or CCP2, the write will
take precedence.
7.6
In this mode of operation, the CCPRxH:CCPRxL register pair effectively becomes the period register for
Timer1.
7.7
Timer1 Prescaler
DS30605C-page 45
PIC16C63A/65B/73B/74B
TABLE 7-2:
Address
Name
Bit 7
0Bh,8Bh
INTCON
GIE
0Ch
PIR1
PSPIF(1)
8Ch
PIE1
PSPIE(1)
ADIE(2)
0Eh
TMR1L
0Fh
TMR1H
T1CON
INTF
RBIF
0000 000x
0000 000u
TMR2IF
TMR1IF
0000 0000
0000 0000
TMR1IE
0000 0000
0000 0000
xxxx xxxx
uuuu uuuu
xxxx xxxx
uuuu uuuu
--00 0000
--uu uuuu
Holding register for the Most Significant Byte of the 16-bit TMR1 register
10h
Value on
all other
RESETS
Bit 4
PEIE
T0IE
INTE
RBIE
T0IF
ADIF(2)
RCIF
TXIF
SSPIF
CCP1IF
RCIE
TXIE
SSPIE
CCP1IE
TMR2IE
T1CKPS1
T1CKPS0
T1OSCEN
Bit 2
Value on:
POR,
BOR
Bit 5
Bit 3
Bit 0
Holding register for the Least Significant Byte of the 16-bit TMR1 register
Bit 6
T1SYNC
Bit 1
TMR1CS
TMR1ON
Legend:
x = unknown, u = unchanged, - = unimplemented, read as 0. Shaded cells are not used by the Timer1 module.
Note 1: Bits PSPIE and PSPIF are reserved on the PIC16C63A/73B; always maintain these bits clear.
2: Bits ADIE and ADIF are reserved on the PIC16C63A/65B; always maintain these bits clear.
DS30605C-page 46
PIC16C63A/65B/73B/74B
8.0
TIMER2 MODULE
8.1
8.2
Output of TMR2
FIGURE 8-1:
Sets Flag
TMR2
bit TMR2IF Output(1)
RESET
Postscaler
1:1 to 1:16
EQ
TMR2 reg
Prescaler
1:1, 1:4, 1:16
2
Comparator
PR2 reg
FOSC/4
T2CKPS1:
T2CKPS0
T2OUTPS3:
T2OUTPS0
Note
REGISTER 8-1:
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
bit 7
bit 0
bit 7
bit 6-3
bit 2
bit 1-0
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 47
PIC16C63A/65B/73B/74B
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
(1)
(2)
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
RCIE
TXIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
0Ch
PIR1
PSPIF
ADIF
8Ch
PIE1
PSPIE(1)
ADIE(2)
11h
TMR2
12h
T2CON
92h
PR2
Legend: x = unknown, u = unchanged, - = unimplemented, read as 0. Shaded cells are not used by the Timer2 module.
Note 1: Bits PSPIE and PSPIF are reserved on the PIC16C63A/73B; always maintain these bits clear.
2: Bits ADIE and ADIF are reserved on the PIC16C63A/65B; always maintain these bits clear.
DS30605C-page 48
PIC16C63A/65B/73B/74B
9.0
CAPTURE/COMPARE/PWM
MODULES
CCP2 Module:
Capture/Compare/PWM Register2 (CCPR2) is comprised of two 8-bit registers: CCPR2L (low byte) and
CCPR2H (high byte). The CCP2CON register controls
the operation of CCP2. The special event trigger is
generated by a compare match and will reset Timer1
and start an A/D conversion (if the A/D module is
enabled).
Additional information on CCP modules is available in
the PICmicro Mid-Range MCU Family Reference
Manual (DS33023) and in Using the CCP Modules
(AN594).
TABLE 9-1:
CCP Mode
CCP1 Module:
Capture/Compare/PWM Register1 (CCPR1) is comprised of two 8-bit registers: CCPR1L (low byte) and
CCPR1H (high byte). The CCP1CON register controls
the operation of CCP1. The special event trigger is
generated by a compare match and will reset Timer1.
TABLE 9-2:
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.
DS30605C-page 49
PIC16C63A/65B/73B/74B
REGISTER 9-1:
U-0
R/W-0
R/W-0
R/W-0
CCPxX
CCPxY
CCPxM3
R/W-0
R/W-0
R/W-0
bit 7
bit 0
bit 7-6
bit 5-4
bit 3-0
DS30605C-page 50
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
PIC16C63A/65B/73B/74B
9.1
9.1.2
Capture Mode
Timer1 must be running in Timer mode or Synchronized Counter mode for the CCP module to use the
capture feature. In Asynchronous Counter mode, the
capture operation may not work.
9.1.3
9.1.1
In Capture mode, the RC2/CCP1 pin should be configured as an input by setting the TRISC<2> bit.
Note:
FIGURE 9-1:
CAPTURE MODE
OPERATION BLOCK
DIAGRAM
Prescaler
1, 4, 16
RC2/CCP1
pin
CCPR1H
and
Edge Detect
TMR1H
9.1.4
CCP PRESCALER
EXAMPLE 9-1:
CLRF
MOVLW
CCPR1L
MOVWF
Capture
Enable
SOFTWARE INTERRUPT
CHANGING BETWEEN
CAPTURE PRESCALERS
CCP1CON
; Turn CCP module off
NEW_CAPT_PS ; Load the W reg with
; the new prescaler
; move value and CCP ON
CCP1CON
; Load CCP1CON with this
; value
TMR1L
CCP1CON<3:0>
Qs
DS30605C-page 51
PIC16C63A/65B/73B/74B
9.2
9.2.4
Compare Mode
FIGURE 9-2:
COMPARE MODE
OPERATION BLOCK
DIAGRAM
9.3
In Pulse Width Modulation mode, the CCPx pin produces up to a 10-bit resolution PWM output. Since the
CCP1 pin is multiplexed with the PORTC data latch, the
TRISC<2> bit must be cleared to make the CCP1 pin
an output.
Note:
Comparator
TMR1H
TMR1L
9.2.1
FIGURE 9-3:
The user must configure the RC2/CCP1 pin as an output by clearing the TRISC<2> bit.
Note:
9.2.2
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.
9.2.3
CCP1CON<5:4>
CCPR1H (Slave)
Comparator
Q
RC2/CCP1
TMR2
(Note 1)
S
Comparator
PR2
Clear Timer,
CCP1 pin and
latch D.C.
DS30605C-page 52
PIC16C63A/65B/73B/74B
A PWM output (Figure 9-4) has a time-base (period)
and a time that the output stays high (duty cycle). The
frequency of the PWM is the inverse of the period
(1/period).
FIGURE 9-4:
PWM OUTPUT
Period
9.3.2
Duty Cycle
TMR2 = PR2 (Timer2 RESET)
TMR2 = Duty Cycle
TMR2 = PR2 (Timer2 RESET)
9.3.1
PWM PERIOD
When the CCPR1H and 2-bit latch match TMR2, concatenated with an internal 2-bit Q clock, or 2 bits of the
TMR2 prescaler, the CCP1 pin is cleared.
Maximum PWM resolution (bits) for a given PWM
frequency:
Resolution
Note:
9.3.3
log(2)
bits
TABLE 9-3:
FOSC
log FPWM
1.22 kHz 4.88 kHz 19.53 kHz 78.12 kHz 156.3 kHz 208.3 kHz
16
0xFF
10
4
0xFF
10
1
0xFF
10
1
0x3F
8
1
0x1F
7
1
0x17
5.5
DS30605C-page 53
PIC16C63A/65B/73B/74B
TABLE 9-4:
Address
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
Name
PEIE
PSPIF
(1)
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
(2)
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
0000 0000
0000 0000
0Ch
PIR1
0Dh
PIR2
CCP2IF
---- ---0
---- ---0
8Ch
PIE1
PSPIE(1)
ADIE(2)
RCIE
TXIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
0000 0000
0000 0000
8Dh
PIE2
CCP2IE
---- ---0
---- ---0
87h
TRISC
1111 1111
1111 1111
0Eh
TMR1L
Holding register for the Least Significant Byte of the 16-bit TMR1 register
xxxx xxxx
uuuu uuuu
0Fh
TMR1H
Holding register for the Most Significant Byte of the 16-bit TMR1 register
xxxx xxxx
uuuu uuuu
10h
T1CON
--00 0000
--uu uuuu
15h
CCPR1L
xxxx xxxx
uuuu uuuu
16h
CCPR1H
xxxx xxxx
uuuu uuuu
17h
CCP1CON
--00 0000
--00 0000
1Bh
CCPR2L
xxxx xxxx
uuuu uuuu
1Ch
CCPR2H
xxxx xxxx
uuuu uuuu
1Dh
CCP2CON
--00 0000
--00 0000
ADIF
T1CKPS1
CCP1X
CCP2X
T1CKPS0
CCP1Y
CCP2Y
T1OSCEN
CCP1M3
CCP2M3
T1SYNC
CCP1M2
CCP2M2
TMR1CS
CCP1M1
CCP2M1
TMR1ON
CCP1M0
CCP2M0
Legend: x = unknown, u = unchanged, - = unimplemented, read as 0. Shaded cells are not used by Capture and Timer1.
Note 1: The PSP is not implemented on the PIC16C63A/73B; always maintain these bits clear.
2: The A/D is not implemented on the PIC16C63A/65B; always maintain these bits clear.
TABLE 9-5:
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
PSPIF(1)
ADIF(2)
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
0000 0000
0000 0000
0Dh
PIR2
CCP2IF
---- ---0
---- ---0
RCIE
TXIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
0000 0000
0000 0000
CCP2IE
---- ---0
---- ---0
PIE1
8Dh
PIE2
87h
TRISC
1111 1111
1111 1111
11h
TMR2
0000 0000
0000 0000
92h
PR2
1111 1111
1111 1111
12h
T2CON
-000 0000
-000 0000
15h
CCPR1L
xxxx xxxx
uuuu uuuu
16h
CCPR1H
xxxx xxxx
uuuu uuuu
17h
CCP1CON
--00 0000
--00 0000
1Bh
CCPR2L
xxxx xxxx
uuuu uuuu
1Ch
CCPR2H
xxxx xxxx
uuuu uuuu
1Dh
CCP2CON
--00 0000
--00 0000
ADIE
(2)
8Ch
Legend:
Note 1:
2:
PSPIE
(1)
CCP1X
CCP2X
CCP1Y
CCP2Y
CCP1M3
CCP2M3
TMR2ON
CCP1M2
CCP2M2
T2CKPS1
CCP1M1
CCP2M1
T2CKPS0
CCP1M0
CCP2M0
x = unknown, u = unchanged, - = unimplemented, read as '0'. Shaded cells are not used by PWM and Timer2.
Bits PSPIE and PSPIF are reserved on the PIC16C63A/73B; always maintain these bits clear.
Bits ADIE and ADIF are reserved on the PIC16C63A/65B; always maintain these bits clear.
DS30605C-page 54
PIC16C63A/65B/73B/74B
10.0
10.1
FIGURE 10-1:
Internal
Data Bus
Read
Write
SSPBUF reg
SSPSR reg
RC4/SDI/SDA
An overview of I2C operations and additional information on the SSP module can be found in the PICmicro
Mid-Range
MCU
Family
Reference Manual
(DS33023).
Shift
Clock
bit0
RC5/SDO
SS Control
Enable
10.2
RA5/SS/AN4
Edge
Select
SPI Mode
2
Clock Select
This section contains register definitions and operational characteristics of the SPI module.
SSPM3:SSPM0
4
Edge
Select
RC3/SCK/
SCL
TMR2 Output
2
Prescaler TCY
4, 16, 64
TRISC<3>
DS30605C-page 55
PIC16C63A/65B/73B/74B
REGISTER 10-1:
R/W-0
R-0
R-0
R-0
R-0
R-0
R-0
SMP
CKE
D/A
R/W
UA
BF
bit 7
bit 0
bit 7
bit 6
CKE: SPI Clock Edge Select (see Figure 10-2, Figure 10-3, and Figure 10-4)
SPI mode:
CKP = 0:
1 = Data transmitted on rising edge of SCK (Microwire alternate)
0 = Data transmitted on falling edge of SCK
CKP = 1:
1 = Data transmitted on falling edge of SCK (Microwire default)
0 = Data transmitted on rising edge of SCK
I2 C mode:
This bit must be maintained clear
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
R/W: Read/Write bit information (I2C mode only). This bit holds the R/W bit information following the last address match. This bit is only valid from the address match to the next START bit,
STOP bit, or ACK bit.
1 = Read
0 = Write
bit 1
bit 0
-n = Value at POR
DS30605C-page 56
W = Writable bit
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
PIC16C63A/65B/73B/74B
REGISTER 10-2:
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
bit 7
bit 0
bit 7
bit 6
bit 5
SSPEN: Synchronous Serial Port Enable bit. When enabled, the SSP pins must be properly
configured as input or output.
In SPI mode:
1 = Enables serial port and configures SCK, SDO, and SDI as serial port pins
0 = Disables serial port and configures these pins as I/O port pins
In I2 C mode:
1 = Enables the serial port and configures the SDA and SCL pins as serial port pins
0 = Disables serial port and configures these pins as I/O port pins
bit 4
bit 3-0
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 57
PIC16C63A/65B/73B/74B
FIGURE 10-2:
SCK (CKP = 0,
CKE = 0)
SCK (CKP = 0,
CKE = 1)
SCK (CKP = 1,
CKE = 0)
SCK (CKP = 1,
CKE = 1)
bit7
SDO
bit6
bit5
bit4
bit3
bit2
bit1
bit0
SDI (SMP = 0)
bit7
bit0
SDI (SMP = 1)
bit7
bit0
SSPIF
FIGURE 10-3:
SS (optional)
SCK (CKP = 0)
SCK (CKP = 1)
SDO
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
SDI (SMP = 0)
bit7
bit0
SSPIF
DS30605C-page 58
PIC16C63A/65B/73B/74B
FIGURE 10-4:
SS
SCK (CKP = 0)
SCK (CKP = 1)
SDO
bit7
bit6
bit5
bit3
bit4
bit2
bit1
bit0
SDI (SMP = 0)
bit7
bit0
SSPIF
TABLE 10-1:
Address
0Bh,8Bh
0Ch
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
INTCON
GIE
PEIE
T0IF
INTF
RBIF
PIR1
PSPIF
(1)
(1)
ADIF
Value on:
POR,
BOR
Value on
all other
RESETS
T0IE
INTE
RBIE
(2)
RCIF
TXIF
SSPIF
(2)
RCIE
TXIE
SSPIE
8Ch
PIE1
87h
TRISC
13h
SSPBUF
14h
SSPCON WCOL
85h
TRISA
94h
SSPSTAT
PSPIE
ADIE
SSPOV SSPEN
SMP
CKE
CKP
SSPM3 SSPM2
SSPM1
SSPM0
UA
BF
R/W
Legend: x = unknown, u = unchanged, - = unimplemented, read as '0'. Shaded cells are not used by the SSP in SPI mode.
Note 1: Bits PSPIE and PSPIF are reserved on the PIC16C63A/73B; always maintain these bits clear.
2: Bits ADIE and ADIF are reserved on the PIC16C63A/65B; always maintain these bits clear.
DS30605C-page 59
PIC16C63A/65B/73B/74B
10.3
SSP I 2C Operation
FIGURE 10-5:
Write
SSPBUF reg
RC3/SCK/SCL
Shift
Clock
LSb
MSb
Match Detect
10.3.1
Addr Match
SSPADD reg
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).
START and
STOP bit Detect
Set, Reset
S, P bits
(SSPSTAT reg)
DS30605C-page 60
SLAVE MODE
SSPSR reg
RC4/SDI/
SDA
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:
b)
PIC16C63A/65B/73B/74B
10.3.1.1
Addressing
1.
TABLE 10-2:
0
1
1
0
Note:
3.
4.
5.
6.
7.
8.
9.
2.
SSPOV
SSPSR SSPBUF
Generate ACK
Pulse
0
Yes
Yes
Yes
0
No
No
Yes, SSPOV is set
1
No
No
Yes
1
No
No
Yes
Shaded cells show the conditions where the user software did not properly clear the overflow condition.
DS30605C-page 61
PIC16C63A/65B/73B/74B
10.3.1.2
Reception
a)
b)
FIGURE 10-6:
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
DS30605C-page 62
PIC16C63A/65B/73B/74B
10.3.1.3
Transmission
FIGURE 10-7:
Receiving Address
A7
SDA
SCL
A6
1
2
Data in
sampled
R/W = 1
A5
A4
A3
A2
A1
SSPIF (PIR1<3>)
ACK
Transmitting Data
ACK
D7
D6
D5
D4
D3
D2
D1
D0
1
SCL held low
while CPU
responds to SSPIF
Cleared in software
BF (SSPSTAT<0>)
SSPBUF is written in software
CKP (SSPCON<4>)
Set bit after writing to SSPBUF
(the SSPBUF must be written to
before the CKP bit can be set)
DS30605C-page 63
PIC16C63A/65B/73B/74B
10.3.2
MASTER MODE
10.3.3
In Master mode, the SCL and SDA lines are manipulated 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
Data transfer byte transmitted/received
TABLE 10-3:
MULTI-MASTER MODE
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
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
PIR1
PSPIF(1)
ADIF(2)
RCIF
TXIF
0000 0000
0000 0000
8Ch
PIE1
(1)
(2)
RCIE
TXIE
0000 0000
0000 0000
13h
SSPBUF
xxxx xxxx
uuuu uuuu
0000 0000
0000 0000
0000 0000
0000 0000
0000 0000
0000 0000
1111 1111
1111 1111
Address
0Bh, 8Bh
0Ch
PSPIE
ADIE
(I2C
93h
SSPADD
14h
SSPCON
WCOL
SSPOV SSPEN
94h
SSPSTAT
SMP(3)
CKE(3)
87h
TRISC
D/A
CKP
P
R/W
UA
BF
DS30605C-page 64
PIC16C63A/65B/73B/74B
11.0
ADDRESSABLE UNIVERSAL
SYNCHRONOUS
ASYNCHRONOUS RECEIVER
TRANSMITTER (USART)
as a half duplex synchronous system that can communicate with peripheral devices, such as A/D or D/A integrated circuits, Serial EEPROMs etc.
The USART can be configured in the following modes:
REGISTER 11-1:
R/W-0
R/W-0
R/W-0
U-0
R/W-0
R-1
R/W-0
CSRC
TX9
TXEN
SYNC
BRGH
TRMT
TX9D
bit 7
bit 0
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
Note:
Legend:
R = Readable bit
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 65
PIC16C63A/65B/73B/74B
REGISTER 11-2:
R/W-0
R/W-0
R/W-0
U-0
R-0
R-0
R-x
SPEN
RX9
SREN
CREN
FERR
OERR
RX9D
bit 7
bit 0
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
RX9D: 9th bit of Received Data. (Can be parity bit. Calculated by firmware.)
Legend:
R = Readable bit
DS30605C-page 66
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
PIC16C63A/65B/73B/74B
11.1
The BRG supports both the Asynchronous and Synchronous modes of the USART. It is a dedicated 8-bit
baud rate generator. The SPBRG register controls the
period of a free running 8-bit timer. In Asynchronous
mode, bit BRGH (TXSTA<2>) also controls the baud
rate. In Synchronous mode, bit BRGH is ignored.
Table 11-1 shows the formula for computation of the
baud rate for different USART modes, which only apply
in Master mode (internal clock).
11.1.1
Given the desired baud rate and Fosc, the nearest integer value for the SPBRG register can be calculated
using the formula in Table 11-1. From this, the error in
baud rate can be determined.
TABLE 11-1:
SAMPLING
SYNC
0
1
TABLE 11-2:
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
98h
TXSTA
CSRC
TX9
TXEN
SYNC
BRGH
TRMT
TX9D
0000 -010
0000 -010
18h
RCSTA
SPEN
RX9
SREN
CREN
FERR
OERR
RX9D
0000 -00x
0000 -00x
99h
SPBRG
0000 0000
0000 0000
Legend: x = unknown, - = unimplemented, read as '0'. Shaded cells are not used by the BRG.
DS30605C-page 67
PIC16C63A/65B/73B/74B
11.2
This interrupt can be enabled/disabled by setting/clearing the USART Transmit Enable bit TXIE (PIE1<4>).
The flag bit TXIF will be set, regardless of the state of
enable bit TXIE and cannot be cleared in software. It
will reset only when new data is loaded into the TXREG
register. While flag bit TXIF indicates the status of the
TXREG register, another bit TRMT (TXSTA<1>) shows
the status of the TSR register. Status bit TRMT is a read
only bit, which is set when the TSR register is empty. No
interrupt logic is tied to this bit, so the user has to poll this
bit in order to determine if the TSR register is empty.
In this mode, the USART uses standard nonreturn-to-zero (NRZ) format (one START bit, eight or
nine data bits, and one STOP bit). The most common
data format is 8 bits. An on-chip, dedicated, 8-bit baud
rate generator can be used to derive standard baud
rate frequencies from the oscillator. The USART transmits and receives the LSb first. The USARTs transmitter and receiver are functionally independent, but use
the same data format and baud rate. The baud rate
generator produces a clock, either x16 or x64 of the bit
shift rate, depending on bit BRGH (TXSTA<2>). Parity
is not supported by the hardware, but can be implemented in software (and stored as the ninth data bit).
Asynchronous mode is stopped during SLEEP.
11.2.1
USART ASYNCHRONOUS
TRANSMITTER
FIGURE 11-1:
TXREG register
TXIE
8
MSb
LSb
(8)
Pin Buffer
and Control
TSR register
RC6/TX/CK pin
Interrupt
TXEN
SPEN
SPBRG
Baud Rate Generator
TX9
TX9D
DS30605C-page 68
PIC16C63A/65B/73B/74B
Steps to follow when setting up an Asynchronous
Transmission:
4.
1.
5.
2.
3.
FIGURE 11-2:
6.
7.
Write to TXREG
Word 1
BRG output
(shift clock)
RC6/TX/CK (pin)
START Bit
Bit 0
Bit 1
Bit 7/8
STOP Bit
Word 1
TXIF bit
(Transmit buffer
reg. empty flag)
Word 1
Transmit Shift Reg
TRMT bit
(Transmit shift
reg. empty flag)
FIGURE 11-3:
Write to TXREG
Word 1
BRG output
(shift clock)
RC6/TX/CK (pin)
Word 2
START Bit
Bit 0
TXIF bit
(interrupt reg. flag)
TRMT bit
(Transmit shift
reg. empty flag)
Bit 1
Word 1
Bit 7/8
Word 1
Transmit Shift Reg.
STOP Bit
START Bit
Word 2
Bit 0
Word 2
Transmit Shift Reg.
TABLE 11-3:
Address
Name
0Bh,8Bh
INTCON
0Ch
PIR1
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
PSPIF(1)
ADIF(2)
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
SPEN
RX9
SREN
CREN
FERR
OERR
18h
RCSTA
19h
TXREG
8Ch
PIE1
98h
TXSTA
99h
Bit 0
Value on:
POR,
BOR
RBIF
0000 000x
0000 000u
0000 0000
RX9D
0000 -00x
0000 -00x
0000 0000
0000 0000
0000 0000
TX9
Value on
all other
RESETS
RCIE
TXIE
TXEN
SYNC
SSPIE CCP1IE
BRGH
TMR2IE
TRMT
TX9D
0000 -010
0000 -010
0000 0000
0000 0000
DS30605C-page 69
PIC16C63A/65B/73B/74B
11.2.2
USART ASYNCHRONOUS
RECEIVER
FIGURE 11-4:
FERR
OERR
CREN
FOSC
SPBRG
64
or
16
RSR Register
MSb
STOP (8)
LSb
0 START
RC7/RX/DT
Pin Buffer
and Control
Data
Recovery
RX9
RX9D
SPEN
RCREG Register
FIFO
8
Interrupt
RCIF
Data Bus
RCIE
DS30605C-page 70
PIC16C63A/65B/73B/74B
Steps to follow when setting up an Asynchronous
Reception:
1.
2.
3.
4.
5.
6.
FIGURE 11-5:
7.
8.
9.
ASYNCHRONOUS RECEPTION
START
bit
bit0
RX (pin)
bit1
bit7/8 STOP
bit
Rcv shift
reg
Rcv buffer reg
START
bit
bit0
bit7/8 STOP
bit
bit7/8
STOP
bit
Word 2
RCREG
Word 1
RCREG
Read Rcv
buffer reg
RCREG
START
bit
RCIF
(interrupt flag)
OERR bit
CREN
Note:
This timing diagram shows three words appearing on the RX input. The RCREG (receive buffer) is read after the
third word, causing the OERR (overrun) bit to be set. An overrun error indicates an error in users firmware.
TABLE 11-4:
Address
0Bh,8Bh
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
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
0000 0000
0000 0000
SREN
CREN
FERR
OERR
RX9D
0000 -00x
0000 -00x
0000 0000
0000 0000
TMR2IE
TMR1IE
0000 0000
0000 0000
TRMT
TX9D
0000 -010
0000 -010
0000 0000
0000 0000
0Ch
PIR1
18h
RCSTA
PSPIF
(1)
SPEN
(2)
ADIF
RX9
1Ah
8Ch
PIE1
98h
TXSTA
99h
SPBRG
PSPIE(1) ADIE(2)
CSRC
TX9
RCIE
TXIE
TXEN
SYNC
SSPIE CCP1IE
BRGH
DS30605C-page 71
PIC16C63A/65B/73B/74B
11.2.3
11.2.4
DS30605C-page 72
4.
5.
6.
7.
PIC16C63A/65B/73B/74B
TABLE 11-5:
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
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
0000 0000
0000 0000
SREN
CREN
FERR
OERR
RX9D
0000 -00x
0000 -00x
0000 0000
0000 0000
RCIE
TXIE
SSPIE
CCP1IE
0000 0000
0000 0000
TXEN
SYNC
BRGH
0000 -010
0000 -010
0000 0000
0000 0000
Address
0Bh,8Bh
(1)
(2)
0Ch
PIR1
18h
RCSTA
19h
TXREG
8Ch
PIE1
PSPIE(1) ADIE(2)
98h
TXSTA
99h
SPBRG
PSPIF
SPEN
CSRC
ADIF
RX9
TX9
TMR2IE TMR1IE
TRMT
TX9D
FIGURE 11-6:
SYNCHRONOUS TRANSMISSION
RC7/RX/DT
pin
bit 0
bit 1
Q3Q4 Q1Q2 Q3Q4 Q1Q2 Q3Q4 Q1Q2 Q3 Q4Q1 Q2Q3 Q4Q1 Q2Q3 Q4Q1 Q2Q3 Q4
bit 2
bit 7
bit 0
bit 1
bit 7
Word 2
Word 1
RC6/TX/CK
pin
Write to
TXREG reg
Write word1
Write word2
TXIF bit
(Interrupt Flag)
TRMT
TRMT bit
TXEN bit
Note: Sync Master mode; SPBRG = 0. Continuous transmission of two 8-bit words.
FIGURE 11-7:
RC7/RX/DT pin
bit0
bit1
bit2
bit6
bit7
RC6/TX/CK pin
Write to
TXREG reg
TXIF bit
TRMT bit
TXEN bit
DS30605C-page 73
PIC16C63A/65B/73B/74B
11.2.5
DS30605C-page 74
PIC16C63A/65B/73B/74B
TABLE 11-6:
Address
0Bh,8Bh
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
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
0000 0000
SREN
CREN
FERR
OERR
(1)
(2)
0Ch
PIR1
18h
RCSTA
1Ah
RCREG
8Ch
PIE1
PSPIE(1) ADIE(2)
98h
TXSTA
99h
SPBRG
PSPIF
SPEN
CSRC
ADIF
RX9
TX9
RX9D
TXIE
SSPIE
CCP1IE
TMR2IE
TXEN
SYNC
BRGH
TRMT
0000 -00x
0000 0000
RCIE
0000 -00x
0000 0000
0000 0000
TX9D
0000 -010
0000 0000
0000 -010
0000 0000
FIGURE 11-8:
RC7/RX/DT pin
bit0
bit1
bit2
bit3
bit4
bit5
bit6
bit7
RC6/TX/CK pin
Write to
bit SREN
SREN bit
CREN bit '0'
'0'
RCIF bit
(interrupt)
Read
RXREG
Note: Timing diagram demonstrates SYNC Master mode with bit SREN = '1' and bit BRG = '0'.
DS30605C-page 75
PIC16C63A/65B/73B/74B
11.3
11.3.1
e)
11.3.2
2.
3.
4.
5.
6.
2.
3.
4.
5.
6.
7.
Enable the synchronous slave serial port by setting bits SYNC and SPEN and clearing bit
CSRC.
Clear bits CREN and SREN.
If interrupts are desired, set interrupt enable bits
TXIE (PIE1<4>), PEIE (INTCON<6>), and GIE
(INTCON<7>), as required.
If 9-bit transmission is desired, set bit TX9.
Enable the transmission by setting enable bit
TXEN.
If 9-bit transmission is selected, the ninth bit
should be loaded in bit TX9D.
Start transmission by loading data to the TXREG
register.
DS30605C-page 76
7.
8.
PIC16C63A/65B/73B/74B
TABLE 11-7:
Address
0Bh,8Bh
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
0000 0000
0Ch
PIR1
RCSTA
8Ch
Value on
all other
RESETS
Bit 7
18h
19h
Value on:
POR,
BOR
Name
PSPIF
TXREG
(1)
SPEN
PSPIE
98h
TXSTA
99h
SPBRG
RX9
CCP1IF
TMR2IF
TMR1IF
FERR
OERR
RX9D
0000 -00x
0000 -00x
0000 0000
0000 0000
0000 0000
0000 -010
0000 -010
0000 0000
TXIF
SSPIF
0000 0000
RCIF
SREN CREN
0000 0000
0000 0000
PIE1
ADIF
(2)
CSRC
ADIE
(2)
TX9
RCIE
TXEN
TXIE
SYNC
SSPIE CCP1IE
BRGH
TMR2IE TMR1IE
TRMT
TX9D
TABLE 11-8:
Address
0Bh,8Bh
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
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
0000 0000
0000 0000
SREN
CREN
FERR
OERR
RX9D
0000 -00x
0000 -00x
0000 0000
0000 0000
RCIE
TXIE
SSPIE
CCP1IE
0000 0000
TXEN
SYNC
BRGH
0Ch
PIR1
18h
RCSTA
PSPIF
(1)
SPEN
ADIF
(2)
RX9
1Ah
RCREG
8Ch
PIE1
PSPIE(1) ADIE(2)
98h
TXSTA
99h
SPBRG
CSRC
TX9
TRMT
TX9D
0000 -010
0000 -010
0000 0000
0000 0000
DS30605C-page 77
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 78
PIC16C63A/65B/73B/74B
12.0
Note:
ANALOG-TO-DIGITAL
CONVERTER (A/D) MODULE
The PIC16C63A and PIC16C65B do not
include A/D modules. ADCON0, ADCON1
and ADRES registers are not implemented. ADIF and ADIE bits are reserved
and should be maintained clear.
REGISTER 12-1:
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
U-0
R/W-0
ADCS1
ADCS0
CHS2
CHS1
CHS0
GO/DONE
ADON
bit 7
bit 0
bit 7-6
bit 5-3
bit 2
bit 1
bit 0
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
DS30605C-page 79
PIC16C63A/65B/73B/74B
REGISTER 12-2:
U-0
U-0
U-0
U-0
R/W-0
R/W-0
R/W-0
PCFG2
PCFG1
PCFG0
bit 7
bit 0
bit 7-3
bit 2-0
PCFG2:PCFG0
RA0
RA1
RA2
RA5
RA3
000
001
010
011
100
101
11x
A
A
A
A
A
A
D
A
A
A
A
A
A
D
A
A
A
A
D
D
D
A
A
A
A
D
D
D
A
VREF
A
VREF
A
VREF
D
A = Analog input
A
A
D
D
D
D
D
A
A
D
D
D
D
D
VREF
VDD
RA3
VDD
RA3
VDD
RA3
VDD
D = Digital I/O
Note 1: RE0, RE1 and RE2 are implemented on the PIC16C74B only.
Legend:
R = Readable bit
DS30605C-page 80
W = Writable bit
-n = Value at POR
1 = Bit is set
0 = Bit is cleared
x = Bit is unknown
PIC16C63A/65B/73B/74B
The following steps should be followed for doing an A/D
conversion:
1.
2.
3.
4.
5.
FIGURE 12-1:
6.
7.
111
110
101
RE2/AN7(1)
RE1/AN6(1)
RE0/AN5(1)
100
RA5/AN4
VIN
011
(Input Voltage)
RA3/AN3/VREF
010
RA2/AN2
A/D
Converter
001
RA1/AN1
VREF
VDD
000 or
010 or
100 or
11x
(Reference
Voltage)
000
RA0/AN0
001 or
011 or
101
PCFG2:PCFG0
Note 1: Not available on PIC16C73B.
DS30605C-page 81
PIC16C63A/65B/73B/74B
12.1
FIGURE 12-2:
The maximum recommended impedance for analog sources is 10 k. After the analog input channel is
selected (changed), the acquisition time (TACQ) must
pass before the conversion can be started.
To calculate the minimum acquisition time,
Equation 12-1 may be used. This equation assumes
that 1/2 LSb error is used (512 steps for the A/D). The
1/2 LSb error is the maximum error allowed for the A/D
to meet its specified resolution.
For more information, see the PICmicro Mid-Range
MCU Family Reference Manual (DS33023). In general,
however, given a maximum source impedance of
10 k and a worst case temperature of 100C, TACQ
will be no more than 16 sec.
Rs
ANx
RIC 1k
CPIN
5 pF
VA
Sampling
Switch
VT = 0.6 V
VT = 0.6 V
SS
RSS
CHOLD
= DAC capacitance
= 51.2 pF
I leakage
500 nA
VSS
Legend:
CPIN
= input capacitance
VT
= threshold voltage
TACQ
= sampling switch
CHOLD
EQUATION 12-1:
= interconnect resistance
SS
6V
5V
VDD 4V
3V
2V
5 6 7 8 9 10 11
Sampling Switch
(k)
ACQUISITION TIME
TAMP + TC + TCOFF
TAMP = 5 S
TC = - (51.2 pF)(1 k + RSS + RS) In(1/511)
TCOFF = (Temp -25C)(0.05 S/C)
DS30605C-page 82
PIC16C63A/65B/73B/74B
12.2
2 TOSC
8 TOSC
32 TOSC
Internal RC oscillator (2 - 6 S)
12.3
12.5
12.4
Note:
A/D Conversions
The GO/DONE bit should NOT be set in
the same instruction that turns on the A/D.
12.6
Effects of a RESET
12.7
DS30605C-page 83
PIC16C63A/65B/73B/74B
TABLE 12-1:
Address
0Bh,8Bh
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
INTCON
GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x
0000 000u
0Ch
PIR1
PSPIF(1)
ADIF
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
0000 0000
0000 0000
8Ch
PIE1
PSPIE(1)
ADIE
RCIE
TXIE
SSPIE
CCP1IE
TMR2IE
TMR1IE
0000 0000
0000 0000
0Dh
PIR2
CCP1IF
---- ---0
---- ---0
8Dh
PIE2
CCP1IE
---- ---0
---- ---0
1Eh
ADRES
xxxx xxxx
uuuu uuuu
1Fh
ADCON0
ADCS1
ADCS0
CHS2
CHS1
CHS0
GO/DONE
ADON
0000 00-0
0000 00-0
9Fh
ADCON1
PCFG2
PCFG1
PCFG0
---- -000
---- -000
--0x 0000
--0u 0000
--11 1111
--11 1111
---- -xxx
---- -uuu
0000 -111
0000 -111
05h
PORTA
85h
TRISA
09h
PORTE
89h
TRISE
IBF
OBF
RA5
RA4
RA3
RA2
RA1
RA0
RE2
RE1
RE0
IBOV
PSPMODE
Legend: x = unknown, u = unchanged, - = unimplemented, read as 0. Shaded cells are not used for A/D conversion.
Note 1: Bits PSPIE and PSPIF are reserved on the PIC6C63A/73B; always maintain these bits clear.
DS30605C-page 84
PIC16C63A/65B/73B/74B
13.0
What sets a microcontroller apart from other processors are special circuits to deal with the needs of realtime applications. The PIC16CXX family has a host of
such features intended to maximize system reliability,
minimize cost through elimination of external components, provide power saving operating modes and offer
code protection. These are:
Oscillator selection
RESET
- Power-on Reset (POR)
- Power-up Timer (PWRT)
- Oscillator Start-up Timer (OST)
- Brown-out Reset (BOR)
Interrupts
Watchdog Timer (WDT)
SLEEP
Code protection
ID locations
In-Circuit Serial Programming (ICSP)
13.1
REGISTER 13-1:
CP1
Configuration Bits
CP0
CP1
CP0
CP1
CP0
BODEN
bit 13
CP1
CP0
bit 6
bit 3
bit 2
bit 1-0
DS30605C-page 85
PIC16C63A/65B/73B/74B
13.2
13.2.1
Oscillator Configurations
LP
XT
HS
RC
13.2.2
CRYSTAL/CERAMIC
RESONATOR OPERATION
(HS, XT OR LP
OSC CONFIGURATION)
OSCILLATOR TYPES
The PIC16CXX 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:
FIGURE 13-1:
CRYSTAL OSCILLATOR/CERAMIC
RESONATORS
DS30605C-page 86
OSC1
To internal
logic
C1
XTAL
RF
OSC2
SLEEP
PIC16CXX
RS
C2
(Note 1)
FIGURE 13-2:
Clock from
ext. system
PIC16CXX
Open
OSC2
PIC16C63A/65B/73B/74B
TABLE 13-1:
CERAMIC RESONATORS
Ranges Tested:
Mode
Freq
OSC1
OSC2
XT
455 kHz
2.0 MHz
4.0 MHz
68 - 100 pF
15 - 68 pF
15 - 68 pF
68 - 100 pF
15 - 68 pF
15 - 68 pF
HS
8.0 MHz
16.0 MHz
10 - 68 pF
10 - 22 pF
10 - 68 pF
10 - 22 pF
Note:
Resonators Used:
455 kHz
Panasonic EFO-A455K04B
0.3%
2.0 MHz
0.5%
4.0 MHz
0.5%
8.0 MHz
0.5%
16.0 MHz
0.5%
Note:
TABLE 13-2:
Osc Type
LP
Cap. Range
C1
Cap. Range
C2
32 kHz
15 pF
47-68 pF
47-68 pF
1 MHz
15 pF
15 pF
4 MHz
15 pF
15 pF
4 MHz
HS
33 pF
15 pF
200 kHz
XT
33 pF
200 kHz
15 pF
15 pF
8 MHz
Note:
15-33 pF
15-33 pF
15-33 pF
13.2.3
RC OSCILLATOR
15-33 pF
20 MHz
FIGURE 13-3:
RC OSCILLATOR MODE
V DD
REXT
Crystals Used:
32 kHz
Epson C-001R32.768K-A
200 kHz
Internal
Clock
OSC1
20 PPM
20 PPM
CEXT
1 MHz
ECS ECS-10-13-1
50 PPM
VSS
4 MHz
ECS ECS-40-20-1
50 PPM
8 MHz
30 PPM
20 MHz
30 PPM
PIC16CXX
FOSC/4
OSC2/CLKOUT
DS30605C-page 87
PIC16C63A/65B/73B/74B
13.3
RESET
Some registers are not affected in any RESET condition; their status is unknown on POR and unchanged in
any other RESET. Most other registers are reset to a
RESET state on POR, on the MCLR and WDT Reset,
FIGURE 13-4:
MCLR
SLEEP
WDT
Time-out
Reset
WDT
Module
VDD Rise
Detect
Power-on Reset
VDD
Brown-out
Reset
BODEN
OST/PWRT
OST
Chip Reset
OSC1
(Note 1)
PWRT
On-chip
10-bit Ripple Counter
RC OSC
Enable PWRT
Enable OST
Note 1: This is a separate oscillator from the RC oscillator of the CLKIN pin.
DS30605C-page 88
PIC16C63A/65B/73B/74B
13.4
13.4.1
RESETS
POWER-ON RESET (POR)
13.4.2
13.4.3
13.4.4
13.4.5
TIME-OUT SEQUENCE
13.4.6
POWER CONTROL/STATUS
REGISTER (PCON)
DS30605C-page 89
PIC16C63A/65B/73B/74B
TABLE 13-3:
Oscillator Configuration
Brown-out
1024TOSC
72 ms + 1024TOSC
1024TOSC
72 ms
PWRTE = 0
PWRTE = 1
XT, HS, LP
72 ms + 1024TOSC
RC
72 ms
TABLE 13-4:
POR
BOR
TO
PD
Power-on Reset
Brown-out Reset
WDT Reset
WDT Wake-up
TABLE 13-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
000x xuuu
---- --u0
uuu1 0uuu
---- --uu
Condition
WDT Wake-up
Brown-out Reset
Interrupt wake-up from SLEEP
PC +
1(1)
REGISTER 13-2:
IRP
RP1
REGISTER 13-3:
DS30605C-page 90
STATUS REGISTER
RP0
TO
PD
DC
POR
BOR
PCON REGISTER
PIC16C63A/65B/73B/74B
TABLE 13-6:
Register
Power-on Reset
Brown-out Reset
MCLR Resets
WDT Reset
63A
65B
73B
74B
xxxx xxxx
INDF
63A
65B
73B
74B
N/A
TMR0
63A
65B
73B
74B
xxxx xxxx
PCL
63A
65B
73B
74B
0000h
0000h
PC + 1(2)
STATUS
63A
65B
73B
74B
0001 1xxx
000q quuu(3)
uuuq quuu(3)
FSR
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
PORTA
63A
65B
73B
74B
--0x 0000
--0u 0000
--uu uuuu
PORTB
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
uuuu uuuu
N/A
uuuu uuuu
uuuu uuuu
N/A
uuuu uuuu
PORTC
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
PORTD
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
PORTE
63A
65B
73B
74B
---- -xxx
---- -uuu
---- -uuu
PCLATH
63A
65B
73B
74B
---0 0000
---0 0000
---u uuuu
INTCON
63A
65B
73B
74B
0000 000x
0000 000u
uuuu uuuu(1)
63A
65B
73B
74B
-0-- 0000
-0-- 0000
-u-- uuuu(1)
63A
65B
73B
74B
-000 0000
-000 0000
-uuu uuuu(1)
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu(1)
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu(1)
PIR2
63A
65B
73B
74B
---- ---0
---- ---0
---- ---u(1)
TMR1L
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
TMR1H
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
T1CON
63A
65B
73B
74B
--00 0000
--uu uuuu
--uu uuuu
TMR2
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu
T2CON
63A
65B
73B
74B
-000 0000
-000 0000
-uuu uuuu
SSPBUF
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
SSPCON
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu
CCPR1L
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
CCPR1H
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
CCP1CON
63A
65B
73B
74B
--00 0000
--00 0000
--uu uuuu
RCSTA
63A
65B
73B
74B
0000 -00x
0000 -00x
uuuu -uuu
TXREG
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu
RCREG
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu
CCPR2L
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
CCPR2H
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
CCP2CON
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu
ADRES
63A
65B
73B
74B
xxxx xxxx
uuuu uuuu
uuuu uuuu
PIR1
DS30605C-page 91
PIC16C63A/65B/73B/74B
TABLE 13-6:
Register
Power-on Reset
Brown-out Reset
MCLR Resets
WDT Reset
ADCON0
63A
65B
73B
74B
0000 00-0
0000 00-0
uuuu uu-u
OPTION_REG
63A
65B
73B
74B
1111 1111
1111 1111
uuuu uuuu
TRISA
63A
65B
73B
74B
--11 1111
--11 1111
--uu uuuu
TRISB
63A
65B
73B
74B
1111 1111
1111 1111
uuuu uuuu
TRISC
63A
65B
73B
74B
1111 1111
1111 1111
uuuu uuuu
TRISD
63A
65B
73B
74B
1111 1111
1111 1111
uuuu uuuu
TRISE
63A
65B
73B
74B
0000 -111
0000 -111
uuuu -uuu
63A
65B
73B
74B
--00 0000
--00 0000
--uu uuuu
63A
65B
73B
74B
0-00 0000
0-00 0000
u-uu uuuu
63A
65B
73B
74B
-000 0000
-000 0000
-uuu uuuu
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu
PIE2
63A
65B
73B
74B
---- ---0
---- ---0
---- ---u
PCON
63A
65B
73B
74B
---- --0q
---- --uu
---- --uu
PR2
63A
65B
73B
74B
1111 1111
1111 1111
1111 1111
SSPADD
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu
SSPSTAT
63A
65B
73B
74B
--00 0000
--00 0000
--uu uuuu
TXSTA
63A
65B
73B
74B
0000 -010
0000 -010
uuuu -uuu
SPBRG
63A
65B
73B
74B
0000 0000
0000 0000
uuuu uuuu
ADCON1
63A
65B
73B
74B
---- -000
---- -000
---- -uuu
PIE1
(3)
DS30605C-page 92
PIC16C63A/65B/73B/74B
13.5
Interrupts
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.
Note:
If an interrupt occurs while the Global Interrupt Enable (GIE) bit is being cleared, the
GIE bit may unintentionally be re-enabled
by the users Interrupt Service Routine (the
RETFIE instruction). The events that
would cause this to occur are:
INTCON, GIE
LOOP
;
;
;
;
;
;
;
;
Disable global
interrupt bit
Global interrupt
disabled?
NO, try again
Yes, continue
with program
flow
DS30605C-page 93
PIC16C63A/65B/73B/74B
FIGURE 13-5:
INTERRUPT LOGIC
PSPIF
PSPIE
ADIF
ADIE
T0IF
T0IE
RCIF
RCIE
INTF
INTE
TXIF
TXIE
SSPIF
SSPIE
Interrupt to CPU
RBIF
RBIE
PEIE
CCP1IF
CCP1IE
GIE
TMR2IF
TMR2IE
TMR1IF
TMR1IE
CCP2IF
CCP2IE
T0IF
INTF
RBIF
PSPIF
ADIF
RCIF
TXIF
SSPIF
CCP1IF
TMR2IF
TMR1IF
CCP2IF
PIC16C63A
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
PIC16C65B
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
PIC16C73B
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
PIC16C74B
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
13.5.1
INT INTERRUPT
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 wakeup. See Section 13.8 for details on SLEEP mode.
13.5.2
13.5.3
PORTB INTERRUPT-ON-CHANGE
TMR0 INTERRUPT
DS30605C-page 94
PIC16C63A/65B/73B/74B
13.6
EXAMPLE 13-1:
a)
b)
c)
d)
e)
f)
MOVWF
SWAPF
CLRF
MOVWF
MOVF
MOVWF
:
(ISR)
:
MOVF
MOVWF
SWAPF
W_TEMP
STATUS,W
STATUS
STATUS_TEMP
PCLATH, W
PCLATH_TEMP
MOVWF
SWAPF
SWAPF
STATUS
W_TEMP,F
W_TEMP,W
13.7
The example:
;Copy
;Swap
;bank
;Save
;Only
;Save
;Restore PCLATH
;Move W into PCLATH
;Swap STATUS_TEMP register into W
;(sets bank to original state)
;Move W into STATUS register
;Swap W_TEMP
;Swap W_TEMP into W
13.7.1
WDT PERIOD
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.
DS30605C-page 95
PIC16C63A/65B/73B/74B
13.7.2
WDT PROGRAMMING
CONSIDERATIONS
FIGURE 13-6:
Postscaler
M
U
X
8
8 - to - 1 MUX
PS2:PS0
PSA
WDT
Enable Bit
1
MUX
PSA
WDT
Time-out
Note: PSA and PS2:PS0 are bits in the OPTION register.
TABLE 13-7:
Address
2007h
Config. bits
81h
OPTION_REG
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
BODEN(1)
CP1
CP0
PWRTE(1)
WDTE
FOSC1
FOSC0
RBPU
INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
DS30605C-page 96
PIC16C63A/65B/73B/74B
13.8
13.8.1
Other peripherals cannot generate interrupts since during SLEEP, no on-chip Q 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
regardless of the state of the GIE bit. If the GIE bit is
clear (disabled), the device continues execution at the
instruction after the SLEEP instruction. If the GIE bit is
set (enabled), the device executes the instruction after
the SLEEP instruction and then branches to the interrupt address (0004h). In cases where the execution of
the instruction following SLEEP is not desirable, the
user should have a NOP after the SLEEP instruction.
13.8.2
DS30605C-page 97
PIC16C63A/65B/73B/74B
FIGURE 13-7:
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
GIE bit
(INTCON<7>)
(2)
Processor in
SLEEP
INSTRUCTION FLOW
PC
PC
Instruction
Fetched
Inst(PC) = SLEEP
Instruction
Executed
Inst(PC - 1)
Note
13.9
1:
2:
3:
4:
PC+1
PC+2
SLEEP
Inst(PC + 1)
0005h
Inst(0005h)
Dummy cycle
Inst(0004h)
Program Verification/Code
Protection
Microchip does not recommend code protecting windowed devices. Devices that
are code protected may be erased, but not
programmed again.
13.10 ID Locations
Four memory locations (2000h - 2003h) are designated
as ID locations where the user can store checksum or
other code identification numbers. These locations are
not accessible during normal execution, but are readable and writable during program/verify. It is recommended that only the four least significant bits of the ID
location are used.
13.11
Dummy cycle
0004h
Inst(0004h)
Inst(PC + 2)
If the code protection bit(s) have not been programmed, the on-chip program memory can be read
out for verification purposes.
Note:
PC + 2
PC+2
Inst(PC + 1)
PIC16CXX microcontrollers can be serially programmed while in the end application circuit. This is
simply done with two lines for clock and data, and three
other 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.
FIGURE 13-8:
External
Connector
Signals
TYPICAL IN-CIRCUIT
SERIAL PROGRAMMING
CONNECTION
To Normal
Connections
PIC16CXX
+5V
VDD
0V
VSS
VPP
MCLR/VPP
CLK
RB6
Data I/O
RB7
VDD
To Normal
Connections
DS30605C-page 98
PIC16C63A/65B/73B/74B
14.0
TABLE 14-1:
OPCODE FIELD
DESCRIPTIONS
Field
Description
FIGURE 14-1:
Top-of-Stack
Program Counter
WDT
d = 0 for destination W
d = 1 for destination f
f = 7-bit file register address
GIE
Watchdog Timer/Counter
TO
Time-out bit
PD
Power-down bit
dest
[ ]
Contents
Assigned to
<>
0
k (literal)
Options
( )
8
OPCODE
In the set of
13
11
OPCODE
10
0
k (literal)
DS30605C-page 99
PIC16C63A/65B/73B/74B
TABLE 14-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
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
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,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.
Note:
Additional information on the mid-range instruction set is available in the PICmicroTM Mid-Range MCU
Family Reference Manual (DS33023).
DS30605C-page 100
PIC16C63A/65B/73B/74B
14.1
Instruction Descriptions
ADDLW
ANDWF
AND W with f
Syntax:
[label] ADDLW
Syntax:
[label] ANDWF
Operands:
0 k 255
Operands:
Operation:
(W) + k (W)
0 f 127
d [0,1]
Status Affected:
C, DC, Z
Operation:
Status Affected:
Description:
ADDWF
Add W and f
BCF
Bit Clear f
Syntax:
[label] ADDWF
Syntax:
[label] BCF
Operands:
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 k 255
Operands:
Operation:
0 f 127
0b7
Status Affected:
Operation:
1 (f<b>)
Description:
Status Affected:
None
Description:
Description:
f,d
f,d
f,b
f,b
DS30605C-page 101
PIC16C63A/65B/73B/74B
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:
Status Affected:
None
00h WDT
0 WDT prescaler,
1 TO
1 PD
Description:
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.
DS30605C-page 102
PIC16C63A/65B/73B/74B
COMF
Complement f
Syntax:
[ label ] COMF
GOTO
Unconditional Branch
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
f,d
GOTO k
INCF f,d
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:
INCFSZ f,d
DS30605C-page 103
PIC16C63A/65B/73B/74B
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:
DS30605C-page 104
IORWF
f,d
MOVF f,d
MOVWF
NOP
PIC16C63A/65B/73B/74B
RETFIE
RLF
Syntax:
[ label ]
Syntax:
[ label ]
Operands:
None
Operands:
Operation:
TOS PC,
1 GIE
0 f 127
d [0,1]
Operation:
Status Affected:
None
Status Affected:
Description:
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
Syntax:
[ label ]
Syntax:
Register f
RETURN
[ label ] SLEEP
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:
DS30605C-page 105
PIC16C63A/65B/73B/74B
SUBLW
XORLW
Syntax:
[ label ] SUBLW k
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:
Syntax:
[label]
Operands:
0 f 127
d [0,1]
Operands:
0 f 127
d [0,1]
Operation:
Operation:
Status Affected:
Description:
Description:
SWAPF
0 f 127
d [0,1]
Operation:
(f<3:0>) (destination<7:4>),
(f<7:4>) (destination<3:0>)
Status Affected:
None
Description:
f,d
Operands:
XORWF
Swap Nibbles in f
Syntax:
XORLW k
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'.
DS30605C-page 106
PIC16C63A/65B/73B/74B
15.0
DEVELOPMENT SUPPORT
15.1
15.2
MPASM Assembler
15.3
DS30605C-page 107
PIC16C63A/65B/73B/74B
15.4
15.5
The MPLAB SIM software simulator allows code development in a PC-hosted environment by simulating the
PICmicro series microcontrollers on an instruction
level. On any given instruction, the data areas can be
examined or modified and stimuli can be applied from
a file, or user-defined key press, to any of the pins. The
execution can be performed in single step, execute
until break, or trace mode.
15.6
15.7
The MPLAB SIM simulator fully supports symbolic debugging using the MPLAB C17 and the MPLAB C18 C compilers and the MPASM assembler. The software simulator
offers the flexibility to develop and debug code outside of
the laboratory environment, making it an excellent multiproject software development tool.
DS30605C-page 108
PIC16C63A/65B/73B/74B
15.8
Microchips In-Circuit Debugger, MPLAB ICD, is a powerful, low cost, run-time development tool. This tool is
based on the FLASH PIC16F87X and can be used to
develop for this and other PICmicro microcontrollers
from the PIC16CXXX family. The MPLAB ICD utilizes
the in-circuit debugging capability built into the
PIC16F87X. This feature, along with Microchips
In-Circuit Serial ProgrammingTM protocol, offers costeffective in-circuit FLASH 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, singlestepping and setting break points. Running at full
speed enables testing hardware in real-time.
15.9
DS30605C-page 109
PIC16C63A/65B/73B/74B
15.13 PICDEM 3 Low Cost PIC16CXXX
Demonstration Board
The PICDEM 3 demonstration board is a simple demonstration board that supports the PIC16C923 and
PIC16C924 in the PLCC package. It will also support
future 44-pin PLCC microcontrollers with an LCD Module. All the necessary hardware and software is
included to run the basic demonstration programs. The
user can program the sample microcontrollers provided with the PICDEM 3 demonstration board on a
PRO MATE II device programmer, or a PICSTART Plus
development programmer with an adapter socket, and
easily test firmware. The MPLAB ICE in-circuit emulator may also be used with the PICDEM 3 demonstration
board to test firmware. A prototype area has been provided to the user for adding hardware and connecting it
to the microcontroller socket(s). Some of the features
include a RS-232 interface, push button switches, a
potentiometer for simulated analog input, a thermistor
and separate headers for connection to an external
LCD module and a keypad. Also provided on the
PICDEM 3 demonstration board is a LCD panel, with 4
commons and 12 segments, that is capable of displaying time, temperature and day of the week. The
PICDEM 3 demonstration board provides an additional
RS-232 interface and Windows software for showing
the demultiplexed LCD signals on a PC. A simple serial
interface allows the user to construct a hardware
demultiplexer for the LCD signals.
DS30605C-page 110
Software Tools
PIC17C7XX
PIC17C4X
PIC16C9XX
PIC16F8XX
PIC16C8X
PIC16C7XX
PIC16C7X
PIC16F62X
PIC16CXXX
PIC16C6X
PIC16C5X
PIC14000
PIC12CXXX
MCRFXXX
24CXX/
25CXX/
93CXX
MCP2510
* 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.
PICDEMTM 17 Demonstration
Board
PICDEMTM 3 Demonstration
Board
PICDEMTM 2 Demonstration
Board
HCSXXX
PICDEMTM 1 Demonstration
Board
**
PRO MATE II
Universal Device Programmer
**
**
MPASMTM Assembler/
MPLINKTM Object Linker
TABLE 15-1:
MPLAB Integrated
Development Environment
PIC16C63A/65B/73B/74B
DS30605C-page 111
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 112
PIC16C63A/65B/73B/74B
16.0
ELECTRICAL CHARACTERISTICS
DS30605C-page 113
PIC16C63A/65B/73B/74B
FIGURE 16-1:
PIC16CXXX-20
Voltage
4.5 V
4.0 V
3.5 V
3.0 V
2.5 V
2.0 V
20 MHz
Frequency
FIGURE 16-2:
Voltage
5.0 V
4.5 V
PIC16LCXXX-04
4.0 V
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 1: VDDAPPMIN is the minimum voltage of the PICmicro device in the application.
Note 2: FMAX has a maximum frequency of 10MHz.
DS30605C-page 114
PIC16C63A/65B/73B/74B
FIGURE 16-3:
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
DS30605C-page 115
PIC16C63A/65B/73B/74B
16.1
DC Characteristics
PIC16LC63A/65B/73B/74B-04
PIC16C63A/65B/73B/74B-04
PIC16C6A/65B/73B/74B-20
Param
No.
Sym
Min
Typ
Max
Units
PIC16LCXXX
2.5
VBOR*
5.5
5.5
V
V
PIC16CXXX
4.0
4.5
VBOR*
5.5
5.5
5.5
V
V
V
1.5
VSS
D004*
SVDD VDD Rise Rate to
ensure internal
D004A*
Power-on Reset signal
0.05
TBD
D005
3.65
4.35
VDD
Characteristic
Supply Voltage
D001
D001
D001A
D002*
VDR
D003
DS30605C-page 116
PIC16C63A/65B/73B/74B
PIC16LC63A/65B/73B/74B-04
PIC16C63A/65B/73B/74B-04
PIC16C6A/65B/73B/74B-20
Param
No.
Sym
PIC16CXXX
D013
IPD
Max
Units
Conditions
0.6
2.0
mA
22.5
48
2.7
mA
D010A
D010
Min
10
mA
D010
Typ
IDD
Characteristic
D020
D021
D021A
PIC16LCXXX
7.5
0.9
0.9
20
3
3
A
A
A
D020
D021
D021A
D021B
PIC16CXXX
10.5
1.5
1.5
2.5
42
16
19
19
A
A
A
A
DS30605C-page 117
PIC16C63A/65B/73B/74B
PIC16LC63A/65B/73B/74B-04
PIC16C63A/65B/73B/74B-04
PIC16C6A/65B/73B/74B-20
Param
No.
Sym
Characteristic
Typ
Max
Units
Conditions
6.0
20
100
150
Module Differential
Current (Note 6)
D022*
I/O ports
D030
D030A
VSS
VSS
0.15 VDD
0.8V
V
V
D031
with Schmitt
Trigger buffer
VSS
0.2 VDD
D032
MCLR, OSC1
(in RC mode)
Vss
0.2 VDD
D033
Vss
0.3 VDD
(Note 8)
DS30605C-page 118
PIC16C63A/65B/73B/74B
PIC16LC63A/65B/73B/74B-04
PIC16C63A/65B/73B/74B-04
PIC16C6A/65B/73B/74B-20
Param
No.
Sym
Characteristic
Typ
Max
Units
Conditions
2.0
VDD
0.25 VDD +
VDD
0.8 VDD
VDD
I/O ports
with TTL buffer
D040A
0.8V
D041
with Schmitt
Trigger buffer
D042
MCLR
0.8 VDD
VDD
D042A
0.7 VDD
VDD
D043
0.9 VDD
VDD
I/O ports
D061
MCLR, RA4/T0CKI
D063
OSC1
50
250
400
(Note 8)
Input Leakage
Current (Notes 9, 10)
D060
D070
IIL
DS30605C-page 119
PIC16C63A/65B/73B/74B
PIC16LC63A/65B/73B/74B-04
PIC16C63A/65B/73B/74B-04
PIC16C6A/65B/73B/74B-20
Param
No.
Sym
Characteristic
Typ
Max
Units
Conditions
0.6
0.6
0.6
0.6
VDD-0.7
VDD-0.7
VDD-0.7
VDD-0.7
8.5
RA4 pin
VOL
D083
I/O ports
OSC2/CLKOUT
(RC osc mode)
VOH
D092
D150*
OSC2/CLKOUT
(RC osc mode)
VOD
Open-Drain
High Voltage
DS30605C-page 120
PIC16C63A/65B/73B/74B
PIC16LC63A/65B/73B/74B-04
PIC16C63A/65B/73B/74B-04
PIC16C6A/65B/73B/74B-20
Param
No.
Sym
Characteristic
Typ
Max
Units
15
pF
Conditions
Capacitive Loading
Specs on
Output Pins
D100
D101
CIO
50
pF
D102
Cb
SCL, SDA
(in I2C mode)
400
pF
DS30605C-page 121
PIC16C63A/65B/73B/74B
16.2
16.2.1
AC (Timing) Characteristics
TIMING PARAMETER SYMBOLOGY
The timing parameter symbols have been created following one of the following formats:
1. TppS2ppS
3. TCC:ST
2. TppS
4. Ts
T
F
Frequency
Lowercase letters (pp) and their meanings:
pp
cc
CCP1
ck
CLKOUT
cs
CS
di
SDI
do
SDO
dt
Data in
io
I/O port
mc
MCLR
Uppercase letters and their meanings:
S
F
Fall
H
High
I
Invalid (Hi-impedance)
L
Low
I2C only
AA
BUF
output access
Bus free
DS30605C-page 122
Time
osc
rd
rw
sc
ss
t0
t1
wr
OSC1
RD
RD or WR
SCK
SS
T0CKI
T1CKI
WR
P
R
V
Z
Period
Rise
Valid
Hi-impedance
High
Low
High
Low
SU
Setup
STO
STOP condition
PIC16C63A/65B/73B/74B
16.2.2
TIMING CONDITIONS
TABLE 16-1:
AC CHARACTERISTICS
FIGURE 16-4:
Load condition 2
VDD/2
RL
CL
Pin
VSS
CL
Pin
RL = 464
CL = 50 pF
CL = 15 pF
VSS
DS30605C-page 123
PIC16C63A/65B/73B/74B
16.2.3
FIGURE 16-5:
Q4
Q2
Q3
Q4
Q1
OSC1
3
CLKOUT
TABLE 16-2:
Param
No.
Min
Typ
Max
Units
DC
MHz
DC
MHz
DC
1A
Sym
Conditions
20
MHz
DC
200
kHz
LP osc mode
DC
MHz
RC osc mode
0.1
MHz
XT osc mode
Oscillator Frequency
(Note 1)
20
MHz
HS osc mode
5
TOSC
200
kHz
250
ns
250
ns
50
LP osc mode
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
200
DC
ns
TCY = 4/FOSC
ns
XT oscillator
LP oscillator
15
ns
HS oscillator
25
ns
XT oscillator
50
ns
LP oscillator
15
ns
HS oscillator
Oscillator Period
(Note 1)
2
3*
4*
TCY
DS30605C-page 124
PIC16C63A/65B/73B/74B
FIGURE 16-6:
Q4
Q2
Q3
OSC1
11
10
CLKOUT
13
14
19
12
18
16
I/O Pin
(input)
15
17
I/O Pin
(output)
20, 21
Refer to Figure 16-4 for load conditions.
Note:
TABLE 16-3:
Param
No.
new value
old value
Sym
Characteristic
Min
Typ
Max
Units Conditions
10*
TosH2ckL
OSC1 to CLKOUT
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*
TioV2ckH
TOSC + 200
ns
(Note 1)
16*
TckH2ioI
ns
(Note 1)
17*
TosH2ioV
50
150
ns
100
ns
TosH2ioI
200
ns
TioV2osH
ns
TioR
PIC16CXX
10
40
ns
PIC16LCXX
80
ns
TioF
PIC16CXX
10
40
ns
PIC16LCXX
80
ns
18*
18A*
19*
20*
20A*
21*
21A*
22* Tinp
TCY
ns
23* Trbp
TCY
ns
DS30605C-page 125
PIC16C63A/65B/73B/74B
FIGURE 16-7:
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:
FIGURE 16-8:
BVDD
VDD
35
TABLE 16-4:
Param No.
Characteristic
Min
Typ
Max
Units
Conditions
30
31*
TWDT
18
33
ms
32
TOST
1024 TOSC
28
72
132
ms
33*
34
TIOZ
2.1
35
TBOR
100
DS30605C-page 126
PIC16C63A/65B/73B/74B
FIGURE 16-9:
T0CKI
41
40
42
T1OSO/T1CKI
46
45
47
48
TMR0 or
TMR1
Note:
TABLE 16-5:
Param
No.
Sym
40*
Tt0H
Min
No Prescaler
With Prescaler
41*
Tt0L
No Prescaler
With Prescaler
42*
Tt0P
T0CKI Period
No Prescaler
0.5TCY + 20
ns
10
ns
0.5TCY + 20
ns
10
ns
TCY + 40
Tt1H
ns
ns
N = prescale value
(2, 4,..., 256)
0.5TCY + 20
ns
15
ns
25
ns
30
ns
PIC16CXX
PIC16LCXX
Synchronous, Prescaler = 1
Synchronous,
PIC16CXX
Prescaler = 2,4,8 PIC16LCXX
Asynchronous
50
ns
0.5TCY + 20
ns
15
ns
25
ns
ns
T1CKI input
period
Synchronous
Asynchronous
30
50
Greater of:
30 or TCY + 40
N
ns
Greater of:
50 or TCY + 40
N
48
N = prescale value
(1, 2, 4, 8)
N = prescale value
(1, 2, 4, 8)
PIC16CXX
60
PIC16LCXX
Ft1
ns
PIC16CXX
PIC16LCXX
Tt1P
PIC16CXX
PIC16LCXX
47*
Asynchronous
Tt1L
Synchronous,
PIC16CXX
Prescaler = 2,4,8 PIC16LCXX
46*
Conditions
100
ns
DC
200
kHz
2TOSC
7TOSC
ns
DS30605C-page 127
PIC16C63A/65B/73B/74B
FIGURE 16-10:
50
51
52
CCPx
(Compare or PWM mode)
53
Note:
TABLE 16-6:
Param
Sym
No.
50*
Characteristic
Min
52*
53*
ns
10
ns
20
ns
ns
10
ns
20
ns
3TCY + 40
N
No Prescaler
0.5TCY + 20
PIC16LCXX
54*
0.5TCY + 20
No Prescaler
PIC16LCXX
51*
54
ns
10
25
ns
25
45
ns
10
25
ns
25
45
ns
N = prescale
value (1,4, or 16)
DS30605C-page 128
PIC16C63A/65B/73B/74B
FIGURE 16-11:
RE2/CS
RE0/RD
RE1/WR
65
RD7:RD0
62
64
63
Note:
TABLE 16-7:
Param No.
Characteristic
Min
Typ
Max
Units
62*
20
ns
63*
TwrH2dtI WR or CS to data in
invalid (hold time)
PIC16CXX
20
ns
PIC16LCXX
35
Conditions
ns
64
80
ns
65*
10
30
ns
DS30605C-page 129
PIC16C63A/65B/73B/74B
FIGURE 16-12:
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 16-8:
Param
No.
Symbol
Characteristic
Min
70
TssL2scH,
TssL2scL
TCY
ns
71
TscH
1.25TCY + 30
ns
Single Byte
40
ns
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
71A
72
TscL
72A
73
Continuous
TdiV2scH,
TdiV2scL
100
1.5TCY + 40
ns
74
TscH2diL,
TscL2diL
100
TdoR
10
25
ns
20
45
ns
76
TdoF
10
25
ns
78
TscR
PIC16CXX
10
25
ns
PIC16LCXX
20
45
ns
10
25
ns
50
(Note 1)
ns
75
(Note 1)
ns
TB2B
Conditions
ns
73A
PIC16LCXX
79
TscF
80
TscH2doV,
TscL2doV
PIC16CXX
(Note 1)
100
ns
PIC16LCXX
Data in Typ column is at 5 V, 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.
DS30605C-page 130
PIC16C63A/65B/73B/74B
FIGURE 16-13:
SS
81
SCK
(CKP = 0)
71
72
79
73
SCK
(CKP = 1)
80
78
MSb
SDO
BIT6 - - - - - -1
LSb
75, 76
SDI
MSb IN
BIT6 - - - -1
LSb IN
74
Note:
TABLE 16-9:
Param
No.
Symbol
71
71A
TscH
72
TscL
72A
73
Characteristic
Min
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
Continuous
1.25TCY + 30
ns
Single Byte
40
ns
Conditions
TdiV2scH,
TdiV2scL
100
1.5TCY + 40
ns
74
TscH2diL,
TscL2diL
100
ns
75
TdoR
10
25
ns
20
45
(Note 1)
ns
TB2B
(Note 1)
ns
73A
76
TdoF
TscR
PIC16LCXX
78
PIC16CXX
PIC16CXX
10
25
ns
10
25
ns
20
45
(Note 1)
ns
PIC16LCXX
79
TscF
10
25
ns
80
TscH2doV,
TscL2doV
50
ns
100
ns
ns
81
PIC16CXX
PIC16LCXX
TCY
Data in Typ column is at 5 V, 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.
DS30605C-page 131
PIC16C63A/65B/73B/74B
FIGURE 16-14:
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 16-10: EXAMPLE SPI MODE REQUIREMENTS (SLAVE MODE TIMING (CKE = 0)
Param
No.
70
71
71A
72
72A
73
73A
74
Symbol
Characteristic
Min
TssL2scH,
TssL2scL
TCY
ns
TscH
Continuous
Single Byte
SCK input low time
Continuous
(Slave mode)
Single Byte
Setup time of SDI data input to SCK edge
1.25TCY + 30
40
1.25TCY + 30
40
100
ns
ns
ns
ns
ns
1.5TCY + 40
ns
100
ns
10
20
10
25
45
25
50
ns
ns
ns
ns
10
20
10
25
45
25
50
100
ns
ns
ns
ns
ns
ns
TscL
TdiV2scH,
TdiV2scL
TB2B
75
TscH2diL,
TscL2diL
TdoR
76
77
TdoF
TssH2doZ
78
TscR
79
80
TscF
TscH2doV,
TscL2doV
83
TscH2ssH,
TscL2ssH
10
1.5TCY + 40
Conditions
(Note 1)
(Note 1)
(Note 1)
Data in Typ column is at 5 V, 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.
DS30605C-page 132
PIC16C63A/65B/73B/74B
FIGURE 16-15:
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:
Symbol
Characteristic
Min
TssL2scH,
TssL2scL
TCY
ns
TscH
TscL
1.25TCY + 30
40
1.25TCY + 30
40
ns
ns
ns
ns
TB2B
1.5TCY + 40
ns
74
TscH2diL,
TscL2diL
100
ns
75
TdoR
PIC16CXX
PIC16LCXX
10
20
25
45
ns
ns
10
25
ns
10
50
ns
10
20
25
45
ns
ns
70
71
71A
72
72A
73A
76
TdoF
77
TssH2doZ
78
TscR
79
TscF
80
TscH2doV,
TscL2doV
82
TssL2doV
83
TscH2ssH,
TscL2ssH
Continuous
Single Byte
Continuous
Single Byte
10
25
50
100
50
100
(Note 1)
(Note 1)
ns
ns
ns
ns
1.5TCY + 40
(Note 1)
ns
Conditions
ns
Data in Typ column is at 5 V, 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.
2000 Microchip Technology Inc.
DS30605C-page 133
PIC16C63A/65B/73B/74B
I2C BUS START/STOP BITS TIMING
FIGURE 16-16:
SCL
91
93
90
92
SDA
STOP
Condition
START
Condition
Note:
Sym
Characteristic
90*
Setup time
THD:STA START condition
4700
600
4000
600
4700
600
4000
600
ns
Hold time
400 kHz mode
* These parameters are characterized but not tested.
ns
Conditions
91*
Hold time
92*
93
ns
ns
FIGURE 16-17:
103
102
100
101
SCL
90
106
107
91
92
SDA
In
110
109
109
SDA
Out
Note:
DS30605C-page 134
PIC16C63A/65B/73B/74B
TABLE 16-13: I2C BUS DATA REQUIREMENTS
Param.
No.
Sym
100*
THIGH
Characteristic
Min
Max
Units
4.0
0.6
1.5TCY
4.7
1.3
1.5TCY
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
START condition
hold time
4.0
0.6
ns
0.9
250
ns
100
ns
STOP condition
setup time
4.7
0.6
3500
ns
ns
4.7
1.3
400
pF
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
Cb is specified to be from
10-400 pF
(Note 2)
(Note 1)
DS30605C-page 135
PIC16C63A/65B/73B/74B
FIGURE 16-18:
RC6/TX/CK
pin
121
121
RC7/RX/DT
pin
120
Note:
122
Sym
120*
TckH2dtV
121*
Tckrf
122*
Characteristic
SYNC XMIT (MASTER &
SLAVE)
Clock high to data out valid
Clock out rise time and fall
time (Master mode)
Tdtrf
Min
Typ
Max
PIC16CXX
80
ns
PIC16LCXX
100
ns
PIC16CXX
45
ns
PIC16LCXX
50
ns
45
ns
50
ns
Units Conditions
FIGURE 16-19:
RC6/TX/CK
pin
RC7/RX/DT
pin
125
126
Note:
Sym
125*
TdtV2ckL
126*
TckL2dtl
Characteristic
Min
Typ
Max
Units
15
ns
15
Conditions
ns
DS30605C-page 136
PIC16C63A/65B/73B/74B
TABLE 16-16: A/D CONVERTER CHARACTERISTICS:
PIC16C73B/74B-04 (COMMERCIAL, INDUSTRIAL, EXTENDED)
PIC16C73B/74B-20 (COMMERCIAL, INDUSTRIAL, EXTENDED)
PIC16LC73B/74B-04 (COMMERCIAL, INDUSTRIAL)
Param
Sym
No.
A02
NR
Resolution
Min
Typ
Max
Units
PIC16CXX
8 bits
bit
PIC16LCXX
A01
Characteristic
8 bits
bit
<1
LSb
A03
EIL
<1
LSb
A04
EDL
<1
LSb
A05
EFS
<1
LSb
A06
<1
LSb
guaranteed
2.5V
VDD + 0.3
VREF + 0.3
VSS - 0.3
Conditions
A10
Monotonicity (Note 3)
A20
A25
A30
10.0
A40
IAD
180
90
10
1000
10
A50
Average current
consumption when A/D
is on (Note 1)
During VAIN acquisition
Based on differential of
VHOLD to VAIN to charge
CHOLD, see Section 12.1
During A/D Conversion
cycle
DS30605C-page 137
PIC16C63A/65B/73B/74B
FIGURE 16-20:
BSF ADCON0, GO
134
1 TCY
(TOSC/2)(1)
131
Q4
130
A/D CLK
132
A/D DATA
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.
Max
Units
PIC16CXX
1.6
2.0
TOSC based,
2.5V VREF 5.5 V
2.0
4.0
6.0
A/D RC mode
PIC16LCXX
Typ
PIC16CXX
TAD
Min
PIC16LCXX
130
Characteristic
Conditions
3.0
6.0
9.0
A/D RC mode
131
11
11
TAD
132
5*
134
TOSC/2
135
1.5
TAD
DS30605C-page 138
PIC16C63A/65B/73B/74B
17.0
DC AND AC
CHARACTERISTICS GRAPHS
AND TABLES
The data presented in this section is a statistical summary of data collected on units from different lots over
a period of time.
Note:
DS30605C-page 139
PIC16C63A/65B/73B/74B
FIGURE 17-1:
IDD (mA)
4
5.5 V
5.0 V
4.5 V
4.0 V
2
3.5 V
3.0 V
1
2.5 V
0
4
10
12
14
16
18
20
FOSC (MHz)
FIGURE 17-2:
IDD (mA)
5.5 V
4
5.0 V
4.5 V
3
4.0 V
3.5 V
3.0 V
1
2.5 V
0
4
10
12
14
16
18
20
FOSC (MHz)
DS30605C-page 140
PIC16C63A/65B/73B/74B
FIGURE 17-3:
100
90
5.5 V
80
70
5.0 V
IDD (A)
60
4.5 V
50
4.0 V
40
3.5 V
30
3.0 V
20
2.5 V
10
0
30
40
50
60
70
80
90
100
FOSC (kHz)
FIGURE 17-4:
160
140
5.5 V
120
IDD (A)
100
5.0 V
80
4.5 V
60
4.0 V
3.5 V
40
3.0 V
2.5 V
20
0
30
40
50
60
70
80
90
100
FOSC (kHz)
DS30605C-page 141
PIC16C63A/65B/73B/74B
FIGURE 17-5:
1.4
1.2
5.5 V
1.0
IDD (mA)
5.0 V
0.8
4.5 V
0.6
4.0 V
3.5 V
0.4
3.0 V
2.5 V
0.2
0.0
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
FOSC (MHz)
FIGURE 17-6:
1.8
1.6
5.5 V
1.4
5.0 V
1.2
IDD (mA)
4.5 V
1.0
4.0 V
0.8
3.5 V
0.6
3.0 V
2.5 V
0.4
0.2
0.0
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
FOSC (MHz)
DS30605C-page 142
PIC16C63A/65B/73B/74B
FIGURE 17-7:
4.5
Not recommended for operation over 4 MHz
4.0
3.3 k
3.5
FOSC (MHz)
3.0
5.1 k
2.5
2.0
1.5
10 k
1.0
0.5
100 k
0.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
FIGURE 17-8:
2.5
2.0
FOSC (MHz)
3.3 k
1.5
5.1 k
1.0
10 k
0.5
100 k
0.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
DS30605C-page 143
PIC16C63A/65B/73B/74B
FIGURE 17-9:
1,000
900
800
700
FOSC (kHz)
3.3 k
600
500
5.1 k
400
300
10 k
200
100
100 k
0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
FIGURE 17-10:
2.0
1.8
1.6
1.4
Max (-40C)
VTH (V)
1.2
Typ (25C)
1.0
Min (125C)
0.8
0.6
0.4
0.2
0.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
DS30605C-page 144
PIC16C63A/65B/73B/74B
FIGURE 17-11:
VIL, VIH vs. VDD OVER TEMPERATURE SCHMITT TRIGGER INPUT (I2C)
Typical:
statistical mean @ 25C
Maximum: mean + 3 (-40C to 125C)
Minimum: mean 3 (-40C to 125C)
4.0
3.5
VIH Typ (25C)
VIN (V)
2.5
2.0
VIL Max (125C)
1.5
VIL Typ (25C)
1.0
0.5
0.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
FIGURE 17-12:
4.0
3.5
VIH Max (125C)
3.0
VIH Typ (25C)
2.5
VIN (V)
1.0
0.5
0.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
DS30605C-page 145
PIC16C63A/65B/73B/74B
FIGURE 17-13:
3.5
3.0
2.5
VOH (V)
Max (-40C)
2.0
Typical (25C)
1.5
1.0
Min (125C)
0.5
0.0
0
10
15
20
25
IOH (mA)
FIGURE 17-14:
5.5
5.0
4.5
Max (-40C)
4.0
Typical (25C)
VOH (V)
3.5
3.0
2.5
Min (125C)
2.0
1.5
1.0
0.5
0.0
0
10
15
20
25
IOH (mA)
DS30605C-page 146
PIC16C63A/65B/73B/74B
FIGURE 17-15:
2.4
2.2
2.0
1.8
1.6
Max (125C)
VOL (V)
1.4
1.2
1.0
Typ (25C)
0.8
0.6
0.4
Min (-40C)
0.2
0.0
0
10
12
14
16
18
20
22
24
26
IOL (-mA)
FIGURE 17-16:
2.0
1.8
1.6
1.4
VOL (V)
1.2
Max (125C)
1.0
0.8
Typ (25C)
0.6
0.4
Min (-40C)
0.2
0.0
0
10
12
14
16
18
20
22
24
26
IOL (-mA)
DS30605C-page 147
PIC16C63A/65B/73B/74B
FIGURE 17-17:
140
Max 85C
120
IPD (nA)
100
80
60
Typ 85C
40
20
Max 25C
Max -40C
0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
FIGURE 17-18:
1,400
1,200
Max (125C)
IPD (nA)
1,000
800
600
Typ (125C)
400
200
0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
DS30605C-page 148
PIC16C63A/65B/73B/74B
FIGURE 17-19:
200
180
160
140
IBOR (uA)
Max (125C)
120
100
Typ (25C)
Device
in
RESET
80
60
Indeterminant
State
Device
in
SLEEP
Max (125C)
Typ (25C)
40
20
0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
FIGURE 17-20:
120
100
Max (-10C to 70C)
ITIMER1 (uA)
80
60
Typical (25C)
40
20
0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
DS30605C-page 149
PIC16C63A/65B/73B/74B
FIGURE 17-21:
20
18
16
IWDT (A)
14
12
Max (-40C to 125C)
10
8
Typical (25C)
6
4
2
0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
FIGURE 17-22:
40
Maximum (125C)
35
30
25
20
Typical (25C)
15
10
Minimum (-40C)
0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
DS30605C-page 150
PIC16C63A/65B/73B/74B
FIGURE 17-23:
40
35
30
125C
25
85C
20
25C
15
-40C
10
0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
VDD (V)
DS30605C-page 151
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 152
PIC16C63A/65B/73B/74B
18.0
PACKAGING INFORMATION
18.1
Example
PIC16C73B-04/SP
0017HAT
Example
XXXXXXXXXXXXXX
XXXXXXXXXXXXXX
YYWWNNN
28-Lead SOIC
XXXXXXXXXXXX
XXXXXXXXXXXX
YYWWNNN
Legend:
PIC16C73B-20/SO
0017SAA
Example
28-Lead SSOP
0017CAT
Example
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX
YYWWNNN
Note:
PIC16C73B/JW
XX...X
YY
WW
NNN
PIC16C73B20I/SS025
0017SBP
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.
DS30605C-page 153
PIC16C63A/65B/73B/74B
Package Marking Information (Contd)
40-Lead PDIP
Example
XXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX
YYWWNNN
PIC16C74B-04/P
0017SAA
Example
XXXXXXXXXXX
XXXXXXXXXXX
XXXXXXXXXXX
YYWWNNN
44-Lead TQFP
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
YYWWNNN
44-Lead MQFP
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
YYWWNNN
44-Lead PLCC
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
YYWWNNN
DS30605C-page 154
PIC16C74B/JW
0017HAT
Example
PIC16C74B
-20/PT
0017HAT
Example
PIC16C74B
-20/PQ
0017SAT
Example
PIC16C74B
-20/L
0017SAT
PIC16C63A/65B/73B/74B
18.2
2
n
A2
A
L
B1
A1
eB
Units
Number of Pins
Pitch
Dimension Limits
n
p
INCHES*
MIN
NOM
MILLIMETERS
MAX
MIN
NOM
28
MAX
28
.100
2.54
.140
.150
.160
3.56
3.81
4.06
A2
.125
.130
.135
3.18
3.30
3.43
8.26
A1
.015
.300
.310
.325
7.62
7.87
E1
.275
.285
.295
6.99
7.24
7.49
Overall Length
1.345
1.365
1.385
34.16
34.67
35.18
L
c
.125
.130
.135
3.18
3.30
3.43
.008
.012
.015
0.20
0.29
0.38
B1
.040
.053
.065
1.02
1.33
1.65
Lead Thickness
Upper Lead Width
Lower Lead Width
Overall Row Spacing
Mold Draft Angle Top
Mold Draft Angle Bottom
0.38
.016
.019
.022
0.41
0.48
0.56
eB
.320
.350
.430
8.13
8.89
10.92
10
15
10
15
10
15
10
15
* Controlling Parameter
Significant Characteristic
Notes:
Dimension D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MO-095
Drawing No. C04-070
DS30605C-page 155
PIC16C63A/65B/73B/74B
18.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
Significant Characteristic
JEDEC Equivalent: MO-058
Drawing No. C04-080
DS30605C-page 156
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
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
PIC16C63A/65B/73B/74B
18.4
E
E1
p
B
2
1
n
h
45
c
A2
L
Units
Dimension Limits
n
p
Number of Pins
Pitch
Overall Height
Molded Package Thickness
Standoff
Overall Width
Molded Package Width
Overall Length
Chamfer Distance
Foot Length
Foot Angle Top
Lead Thickness
Lead Width
Mold Draft Angle Top
Mold Draft Angle Bottom
* Controlling Parameter
Significant Characteristic
A
A2
A1
E
E1
D
h
L
c
B
A1
MIN
.093
.088
.004
.394
.288
.695
.010
.016
0
.009
.014
0
0
INCHES*
NOM
28
.050
.099
.091
.008
.407
.295
.704
.020
.033
4
.011
.017
12
12
MAX
.104
.094
.012
.420
.299
.712
.029
.050
8
.013
.020
15
15
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
MAX
2.64
2.39
0.30
10.67
7.59
18.08
0.74
1.27
8
0.33
0.51
15
15
Notes:
Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MS-013
Drawing No. C04-052
DS30605C-page 157
PIC16C63A/65B/73B/74B
18.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
Number of Pins
Pitch
Overall Height
Molded Package Thickness
Standoff
Overall Width
Molded Package Width
Overall Length
Foot Length
Lead Thickness
Foot Angle
Lead Width
Mold Draft Angle Top
Mold Draft Angle Bottom
* Controlling Parameter
Significant Characteristic
A
A2
A1
E
E1
D
L
c
MIN
.068
.064
.002
.299
.201
.396
.022
.004
0
.010
0
0
INCHES
NOM
28
.026
.073
.068
.006
.309
.207
.402
.030
.007
4
.013
5
5
MAX
.078
.072
.010
.319
.212
.407
.037
.010
8
.015
10
10
MILLIMETERS*
NOM
MAX
28
0.65
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
Notes:
Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MS-150
Drawing No. C04-073
DS30605C-page 158
PIC16C63A/65B/73B/74B
18.6
E1
2
1
n
E
A2
B1
A1
eB
B
Units
Dimension Limits
n
p
MIN
INCHES*
NOM
40
.100
.175
.150
MAX
MILLIMETERS
NOM
40
2.54
4.06
4.45
3.56
3.81
0.38
15.11
15.24
13.46
13.84
51.94
52.26
3.05
3.30
0.20
0.29
0.76
1.27
0.36
0.46
15.75
16.51
5
10
5
10
MIN
Number of Pins
Pitch
Top to Seating Plane
A
.160
.190
Molded Package Thickness
A2
.140
.160
Base to Seating Plane
.015
A1
Shoulder to Shoulder Width
E
.595
.600
.625
Molded Package Width
E1
.530
.545
.560
Overall Length
D
2.045
2.058
2.065
Tip to Seating Plane
L
.120
.130
.135
c
Lead Thickness
.008
.012
.015
Upper Lead Width
B1
.030
.050
.070
Lower Lead Width
B
.014
.018
.022
Overall Row Spacing
eB
.620
.650
.680
MAX
4.83
4.06
15.88
14.22
52.45
3.43
0.38
1.78
0.56
17.27
15
15
DS30605C-page 159
PIC16C63A/65B/73B/74B
18.7
40-Lead Ceramic Dual In-line with Window (JW) 600 mil (CERDIP)
2
1
n
E
A2
L
c
B1
B
eB
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 Diameter
* Controlling Parameter
Significant Characteristic
JEDEC Equivalent: MO-103
Drawing No. C04-014
DS30605C-page 160
A
A2
A1
E
E1
D
L
c
B
B1
eB
W
MIN
.185
.155
.030
.595
.514
2.040
.135
.008
.050
.016
.610
.340
INCHES*
NOM
40
.100
.205
.160
.045
.600
.520
2.050
.140
.011
.053
.020
.660
.350
MAX
.225
.165
.060
.625
.526
2.060
.145
.014
.055
.023
.710
.360
p
MILLIMETERS
NOM
40
2.54
4.70
5.21
3.94
4.06
0.76
1.14
15.11
15.24
13.06
13.21
51.82
52.07
3.43
3.56
0.20
0.28
1.27
1.33
0.41
0.51
15.49
16.76
8.64
8.89
MIN
MAX
5.72
4.19
1.52
15.88
13.36
52.32
3.68
0.36
1.40
0.58
18.03
9.14
PIC16C63A/65B/73B/74B
18.8
44-Lead Plastic Thin Quad Flatpack (PT) 10x10x1 mm Body, 1.0/0.10 mm Lead Form
(TQFP)
E
E1
#leads=n1
p
D1
2
1
B
n
CH x 45
A
c
A1
A2
(F)
Units
Dimension Limits
n
p
Number of Pins
Pitch
Pins per Side
Overall Height
Molded Package Thickness
Standoff
Foot Length
Footprint (Reference)
Foot Angle
Overall Width
Overall Length
Molded Package Width
Molded Package Length
Lead Thickness
Lead Width
Pin 1 Corner Chamfer
Mold Draft Angle Top
Mold Draft Angle Bottom
* Controlling Parameter
Significant Characteristic
n1
A
A2
A1
L
(F)
E
D
E1
D1
c
B
CH
MIN
.039
.037
.002
.018
0
.463
.463
.390
.390
.004
.012
.025
5
5
INCHES
NOM
44
.031
11
.043
.039
.004
.024
.039
3.5
.472
.472
.394
.394
.006
.015
.035
10
10
MAX
.047
.041
.006
.030
7
.482
.482
.398
.398
.008
.017
.045
15
15
MILLIMETERS*
NOM
44
0.80
11
1.00
1.10
0.95
1.00
0.05
0.10
0.45
0.60
1.00
0
3.5
11.75
12.00
11.75
12.00
9.90
10.00
9.90
10.00
0.09
0.15
0.30
0.38
0.64
0.89
5
10
5
10
MIN
MAX
1.20
1.05
0.15
0.75
7
12.25
12.25
10.10
10.10
0.20
0.44
1.14
15
15
Notes:
Dimensions D1 and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MS-026
Drawing No. C04-076
DS30605C-page 161
PIC16C63A/65B/73B/74B
18.9
44-Lead Plastic Metric Quad Flatpack (PQ) 10x10x2 mm Body, 1.6/0.15 mm Lead
Form (MQFP)
E
E1
#leads=n1
p
D1 D
2
1
B
n
CH x 45
Units
Dimension Limits
n
p
Number of Pins
Pitch
Pins per Side
Overall Height
Molded Package Thickness
Standoff
Foot Length
Footprint (Reference)
Foot Angle
Overall Width
Overall Length
Molded Package Width
Molded Package Length
Lead Thickness
Lead Width
Pin 1 Corner Chamfer
Mold Draft Angle Top
Mold Draft Angle Bottom
* Controlling Parameter
Significant Characteristic
n1
A
A2
A1
L
(F)
E
D
E1
D1
c
B
CH
MIN
.079
.077
.002
.029
0
.510
.510
.390
.390
.005
.012
.025
5
5
A1
(F)
INCHES
NOM
44
.031
11
.086
.080
.006
.035
.063
3.5
.520
.520
.394
.394
.007
.015
.035
10
10
MAX
.093
.083
.010
.041
7
.530
.530
.398
.398
.009
.018
.045
15
15
A2
MILLIMETERS*
NOM
44
0.80
11
2.00
2.18
1.95
2.03
0.05
0.15
0.73
0.88
1.60
0
3.5
12.95
13.20
12.95
13.20
9.90
10.00
9.90
10.00
0.13
0.18
0.30
0.38
0.64
0.89
5
10
5
10
MIN
MAX
2.35
2.10
0.25
1.03
7
13.45
13.45
10.10
10.10
0.23
0.45
1.14
15
15
Notes:
Dimensions D1 and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MS-022
Drawing No. C04-071
DS30605C-page 162
PIC16C63A/65B/73B/74B
18.10 44-Lead Plastic Leaded Chip Carrier (L) Square (PLCC)
E
E1
#leads=n1
D1 D
n 1 2
CH2 x 45
CH1 x 45
A3
A2
35
A
B1
B
E2
Units
Dimension Limits
n
p
A1
p
D2
INCHES*
NOM
44
.050
11
.165
.173
.145
.153
.028
.020
.024
.029
.040
.045
.000
.005
.685
.690
.685
.690
.650
.653
.650
.653
.590
.620
.590
.620
.008
.011
.026
.029
.013
.020
0
5
0
5
MIN
MAX
MILLIMETERS
NOM
44
1.27
11
4.19
4.39
3.68
3.87
0.71
0.51
0.61
0.74
1.02
1.14
0.00
0.13
17.40
17.53
17.40
17.53
16.51
16.59
16.51
16.59
14.99
15.75
14.99
15.75
0.20
0.27
0.66
0.74
0.33
0.51
0
5
0
5
MIN
Number of Pins
Pitch
Pins per Side
n1
Overall Height
A
.180
.160
Molded Package Thickness
A2
.035
Standoff
A1
A3
Side 1 Chamfer Height
.034
Corner Chamfer 1
CH1
.050
Corner Chamfer (others)
CH2
.010
Overall Width
E
.695
Overall Length
D
.695
Molded Package Width
E1
.656
Molded Package Length
D1
.656
Footprint Width
E2
.630
Footprint Length
.630
D2
c
Lead Thickness
.013
Upper Lead Width
B1
.032
Lower Lead Width
B
.021
MAX
4.57
4.06
0.89
0.86
1.27
0.25
17.65
17.65
16.66
16.66
16.00
16.00
0.33
0.81
0.53
10
10
DS30605C-page 163
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 164
PIC16C63A/65B/73B/74B
APPENDIX A:
REVISION HISTORY
Version
Date
Revision Description
7/98
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.
1/99
12/00
APPENDIX B:
DEVICE DIFFERENCES
The differences between the devices in this data sheet are listed in Table B-1.
TABLE B-1:
DEVICE DIFFERENCES
Difference
PIC16C63A
PIC16C65B
PIC16C73B
PIC16C74B
A/D
no
no
5 channels, 8 bits
8 channels, 8 bits
no
yes
no
yes
Packages
DS30605C-page 165
PIC16C63A/65B/73B/74B
APPENDIX C:
This document is intended to describe the functional differences and the electrical specification differences that are
present when migrating from one device to the next. Table C-1 shows functional differences, while Table C-2 shows
electrical and timing differences.
Note:
Even though compatible devices are specified to be tested to the same electrical specification, the device
characteristics may be different from each other (due to process differences). For systems that were
designed to the device specifications, these process differences should not cause any issues in the application. For systems that did not tightly meet the electrical specifications, the process differences may cause
the device to behave differently in the application.
Note:
While there are no functional or electrical changes to the device oscillator specifications, the user should
verify that the device oscillator starts and performs as expected. Adjusting the loading capacitor values
and/or the oscillator mode may be required.
TABLE C-1:
No.
Module
CCP
FUNCTIONAL DIFFERENCES
Differences from PIC16C63/65A/73A/74A
Supports all four SPI modes. (Now uses SSP vs. BSSP module.)
See SSP module in the PICmicro Mid-Range MCU Family Reference Manual (DS33023).
I2C no longer generates ACK pulses when module is enabled.
2
3
Timers
4
5
SSP
8
9
A/D
DS30605C-page 166
PIC16C63A/65B/73B/74B
TABLE C-2:
Param
No.
SPECIFICATION DIFFERENCES
PIC16C63/65A/73A/74A
Symbol
PIC16C63A/65B/73B/74B
Characteristic
Unit
Min
Typ
Max
Min
Typ
Max
4.0
6.0
4.0
VBOR(1)
5.5
5.5
V
V
3.7
4.0
4.3
14.0
3.65
-
4.35
8.5
V
V
Reference voltage
Conversion time (Note 2)
(not including S/H time)
3.0
2.5
11
(Note 4)
Core
D001
D001A
VDD
D005
D150*
BVDD
VOD
A/D Converter
A20
VREF
131
TCNV
SSP in SPI mode
71
TscH
71A
72
TscL
72A
73
TdiV2scH
TdiV2scL
TB 2 B
73A
(Note 5)
74
TscH2diL
TscL2diL
75
TdoR
78
TscR
80
TscH2doV
TscL2doV
Supply Voltage
rise time
PIC16LCXX
SCK output rise
PIC16CXX
time (Master
PIC16LCXX
mode)
SDO data output PIC16CXX
VDD + 0.3
9.5
(Note 3)
VDD + 0.3 V
11
TAD
(Note 4)
1.25TCY + 30
40
ns
ns
1.25TCY + 30
40
ns
ns
100
ns
1.5TCY + 40
ns
100
ns
10
25
10
25
10
20
10
20
25
45
25
45
ns
ns
ns
ns
50
50
100
ns
ns
50
1.5TCY + 40
ns
TscH2ssH
TscL2ssH
Data in Typ column is at 5V, 25C unless otherwise stated. These parameters are for design guidance only and are not
tested.
83
Note 1:
2:
3:
4:
5:
When BOR is enabled, the device will operate until VDD drops below VBOR.
ADRES register may be read on the following TCY cycle.
This is the time that the actual conversion requires.
This is the time from when the GO/DONE bit is set, to when the conversion result appears in ADRES.
Specification 73A is only required if specifications 71A and 72A are used.
DS30605C-page 167
PIC16C63A/65B/73B/74B
APPENDIX D:
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
DS30605C-page 168
3.
4.
5.
PIC16C63A/65B/73B/74B
INDEX
A
A/D
ADCON0 Register....................................................... 79
ADCON1 Register....................................................... 80
Analog Input Model Block Diagram............................. 82
Analog-to-Digital Converter......................................... 79
Block Diagram............................................................. 81
Configuring Analog Port Pins...................................... 83
Configuring the Interrupt ............................................. 81
Configuring the Module............................................... 81
Conversion Clock........................................................ 83
Conversions ................................................................ 83
Converter Characteristics ......................................... 137
Effects of a RESET ..................................................... 83
Faster Conversion - Lower Resolution Trade-off ........ 83
Internal Sampling Switch (Rss) Impedance ................ 82
Operation During SLEEP ............................................ 83
Sampling Requirements.............................................. 82
Source Impedance...................................................... 82
Timing Diagram......................................................... 138
Using the CCP Trigger ................................................ 83
Absolute Maximum Ratings .............................................. 113
ACK............................................................................... 60, 62
ADRES Register ........................................................... 17, 79
Application Notes
AN552 (Implementing Wake-up on Key Strokes
Using PIC16CXXX)..................................................... 31
AN556 (Table Reading Using PIC16CXX) .................. 26
AN578 (Use of the SSP Module in the I2C
Multi-Master Environment).......................................... 55
AN607, (Power-up Trouble Shooting) ......................... 89
Architecture
Overview ....................................................................... 9
Assembler
MPASM Assembler ................................................. 107
B
Baud Rate Formula ............................................................. 67
BF ................................................................................. 56, 60
Block Diagrams
A/D .............................................................................. 81
Analog Input Model ..................................................... 82
Capture ....................................................................... 51
Compare ..................................................................... 52
I2C Mode..................................................................... 60
On-Chip Reset Circuit ................................................. 88
PIC16C74 ................................................................... 10
PIC16C74A ................................................................. 10
PIC16C77 ................................................................... 10
PORTC ....................................................................... 33
PORTD (In I/O Port Mode).......................................... 34
PORTD and PORTE as a Parallel Slave Port............. 37
PORTE (In I/O Port Mode).......................................... 35
PWM ........................................................................... 52
RA4/T0CKI Pin............................................................ 29
RB3:RB0 Port Pins ..................................................... 31
RB7:RB4 Port Pins ..................................................... 31
SSP in I2C Mode......................................................... 60
SSP in SPI Mode ........................................................ 55
Timer0/WDT Prescaler................................................ 39
Timer2 ......................................................................... 47
USART Receive.......................................................... 70
USART Transmit ......................................................... 68
Watchdog Timer .......................................................... 96
C
C bit .................................................................................... 19
Capture/Compare/PWM
Capture
Block Diagram .................................................... 51
CCP1CON Register............................................ 50
CCP1IF............................................................... 51
Mode .................................................................. 51
Prescaler ............................................................ 51
CCP Timer Resources................................................ 49
Compare
Block Diagram .................................................... 52
Mode .................................................................. 52
Software Interrupt Mode ..................................... 52
Special Event Trigger ......................................... 52
Special Trigger Output of CCP1 ......................... 52
Special Trigger Output of CCP2 ......................... 52
Interaction of Two CCP Modules ................................ 49
Section........................................................................ 49
Special Event Trigger and A/D Conversions............... 52
Capture/Compare/PWM (CCP)
PWM Block Diagram .................................................. 52
PWM Mode................................................................. 52
PWM, Example Frequencies/Resolutions .................. 53
Timing Diagram ........................................................ 128
CCP2IE bit .......................................................................... 24
CCP2IF bit .......................................................................... 24
CCPR1H Register......................................................... 17, 49
CCPR1L Register ............................................................... 49
CCPR2H Register............................................................... 17
CCPR2L Register ............................................................... 17
CCPxM0 bit......................................................................... 50
CCPxM1 bit......................................................................... 50
CCPxM2 bit......................................................................... 50
CCPxM3 bit......................................................................... 50
CCPxX bit ........................................................................... 50
CCPxY bit ........................................................................... 50
CKE .................................................................................... 56
CKP .................................................................................... 57
Clock Polarity Select bit, CKP............................................. 57
Clocking Scheme................................................................ 14
Code Examples
Call of a Subroutine in Page 1 from Page 0 ............... 26
Indirect Addressing..................................................... 27
Initializing PORTA....................................................... 29
Code Protection ............................................................ 85, 98
Computed GOTO................................................................ 26
Configuration Bits ............................................................... 85
CREN bit............................................................................. 66
CS pin................................................................................. 37
DS30605C-page 169
PIC16C63A/65B/73B/74B
D
D/A ...................................................................................... 56
Data Memory
Register File Map ........................................................ 16
Data/Address bit, D/A.......................................................... 56
DC bit .................................................................................. 19
Development Support ........................................................... 5
Device Differences ............................................................ 165
Direct Addressing................................................................ 27
E
Electrical Characteristics................................................... 113
Errata .................................................................................... 3
F
FERR bit.............................................................................. 66
FSR Register........................................................... 17, 18, 27
G
General Description .............................................................. 5
GIE bit ................................................................................. 93
I
I/O Ports
PORTA ........................................................................ 29
PORTB........................................................................ 31
PORTC........................................................................ 33
PORTD.................................................................. 34, 37
PORTE........................................................................ 35
Section ........................................................................ 29
I2C
Addressing .................................................................. 61
Block Diagram............................................................. 60
I2C Operation .............................................................. 60
Master Mode ............................................................... 64
Mode ........................................................................... 60
Mode Selection ........................................................... 60
Multi-Master Mode ...................................................... 64
Reception .................................................................... 62
Reception Timing Diagram.......................................... 62
SCL and SDA pins ...................................................... 60
Slave Mode ................................................................. 60
Transmission............................................................... 63
I2C (SSP Module)
Timing Diagram, Data ............................................... 134
Timing Diagram, START/STOP Bits.......................... 134
In-Circuit Serial Programming ....................................... 85, 98
INDF Register ......................................................... 17, 18, 27
Indirect Addressing ............................................................. 27
Instruction Cycle.................................................................. 14
Instruction Flow/Pipelining .................................................. 14
Instruction Format ............................................................... 99
Instruction Set
ADDLW ..................................................................... 101
ADDWF ..................................................................... 101
ANDLW ..................................................................... 101
ANDWF ..................................................................... 101
BCF ........................................................................... 101
BSF ........................................................................... 101
BTFSC ...................................................................... 102
BTFSS ...................................................................... 102
CALL ......................................................................... 102
CLRF......................................................................... 102
CLRW........................................................................ 102
CLRWDT................................................................... 102
DS30605C-page 170
K
KEELOQ Evaluation and Programming Tools .................... 110
L
Loading of PC ..................................................................... 26
M
MCLR............................................................................ 87, 90
Memory
Data Memory .............................................................. 15
Program Memory ........................................................ 15
Program Memory Maps
PIC16C73 ........................................................... 15
PIC16C73A......................................................... 15
PIC16C74 ........................................................... 15
PIC16C74A......................................................... 15
Register File Maps
PIC16C73 ........................................................... 16
PIC16C73A......................................................... 16
PIC16C74 ........................................................... 16
PIC16C74A......................................................... 16
PIC16C76 ........................................................... 16
PIC16C77 ........................................................... 16
MPLAB Integrated Development
Environment Software ...................................................... 107
PIC16C63A/65B/73B/74B
O
OERR bit ............................................................................. 66
OPCODE ............................................................................ 99
OPTION Register ................................................................ 20
OSC Selection .................................................................... 85
Oscillator
HS ......................................................................... 86, 90
LP.......................................................................... 86, 90
RC............................................................................... 86
XT ......................................................................... 86, 90
Oscillator Configurations ..................................................... 86
Output of TMR2 .................................................................. 47
P
P.......................................................................................... 56
Packaging ......................................................................... 153
Paging, Program Memory ................................................... 26
Parallel Slave Port ........................................................ 34, 37
Parallel Slave Port (PSP)
Timing Diagram......................................................... 129
PCFG0 bit ........................................................................... 80
PCFG1 bit ........................................................................... 80
PCFG2 bit ........................................................................... 80
PCL Register........................................................... 17, 18, 26
PCLATH .............................................................................. 91
PCLATH Register ................................................... 17, 18, 26
PCON Register ............................................................. 25, 89
PD bit ............................................................................ 19, 87
PICDEMTM 1 Low Cost PICmicro
Demonstration Board ........................................................ 109
PICDEMTM 2 Low Cost PIC16CXX
Demonstration Board ........................................................ 109
PICDEMTM 3 Low Cost PIC16CXXX
Demonstration Board ........................................................ 110
PICSTART Plus Entry Level
Development System ........................................................ 109
PIE1 Register ...................................................................... 22
PIE2 Register ...................................................................... 24
Pin Functions
MCLR/VPP............................................................. 11, 12
OSC1/CLKIN......................................................... 11, 12
OSC2/CLKOUT..................................................... 11, 12
RA0/AN0 ............................................................... 11, 12
RA1/AN1 ............................................................... 11, 12
RA2/AN2 ............................................................... 11, 12
RA3/AN3/VREF ...................................................... 11, 12
RA4/T0CKI............................................................ 11, 12
RA5/AN4/SS ......................................................... 11, 12
RB0/INT ................................................................ 11, 12
RB1 ....................................................................... 11, 12
RB2 ....................................................................... 11, 12
RB3 ....................................................................... 11, 12
RB4 ....................................................................... 11, 12
RB5 ....................................................................... 11, 12
RB6 ....................................................................... 11, 12
RB7 ....................................................................... 11, 12
RC0/T1OSO/T1CKI .............................................. 11, 13
RC1/T1OSI/CCP2................................................. 11, 13
RC2/CCP1 ............................................................ 11, 13
RC3/SCK/SCL ...................................................... 11, 13
RC4/SDI/SDA ....................................................... 11, 13
RC5/SDO .............................................................. 11, 13
RC6/TX/CK ............................................... 11, 13, 6576
RC7/RX/DT ............................................... 11, 13, 6576
RD0/PSP0................................................................... 13
RD1/PSP1 .................................................................. 13
RD2/PSP2 .................................................................. 13
RD3/PSP3 .................................................................. 13
RD4/PSP4 .................................................................. 13
RD5/PSP5 .................................................................. 13
RD6/PSP6 .................................................................. 13
RD7/PSP7 .................................................................. 13
RE0/RD/AN5 .............................................................. 13
RE1/WR/AN6.............................................................. 13
RE2/CS/AN7............................................................... 13
VDD ........................................................................11, 13
VSS ........................................................................11, 13
Pinout Descriptions
PIC16C73 ................................................................... 11
PIC16C73A................................................................. 11
PIC16C74 ................................................................... 12
PIC16C74A................................................................. 12
PIC16C76 ................................................................... 11
PIC16C77 ................................................................... 12
PIR1 Register ..................................................................... 23
PIR2 Register ..................................................................... 24
POP .................................................................................... 26
POR .................................................................................... 89
Oscillator Start-up Timer (OST) ............................ 85, 89
Power Control Register (PCON)................................. 89
Power-on Reset (POR)................................... 85, 89, 91
Power-up Timer (PWRT) ............................................ 85
Power-Up-Timer (PWRT) ........................................... 89
TO............................................................................... 87
POR bit ......................................................................... 25, 89
Port RB Interrupt................................................................. 94
PORTA ............................................................................... 91
PORTA Register ........................................................... 17, 29
PORTB ............................................................................... 91
PORTB Register ........................................................... 17, 31
PORTC ............................................................................... 91
PORTC Register........................................................... 17, 33
PORTD ............................................................................... 91
PORTD Register........................................................... 17, 34
PORTE ............................................................................... 91
PORTE Register ........................................................... 17, 35
Power-down Mode (SLEEP)............................................... 97
Power-on Reset (POR)
Timing Diagram ........................................................ 126
PR2 Register ................................................................ 18, 47
PRO MATE II Universal Programmer ............................. 109
Product Identification System ........................................... 177
Program Memory
Paging ........................................................................ 26
Program Memory Maps
PIC16C73 ................................................................... 15
PIC16C73A................................................................. 15
PIC16C74 ................................................................... 15
PIC16C74A................................................................. 15
Program Verification ........................................................... 98
PS0 bit ................................................................................ 20
PS1 bit ................................................................................ 20
PS2 bit ................................................................................ 20
PSA bit................................................................................ 20
PSPMODE bit ......................................................... 34, 35, 37
PUSH.................................................................................. 26
DS30605C-page 171
PIC16C63A/65B/73B/74B
R
R/W ..................................................................................... 56
R/W bit .................................................................... 61, 62, 63
RBIF bit ......................................................................... 31, 94
RBPU bit ............................................................................. 20
RC Oscillator ................................................................. 87, 90
RCSTA Register.................................................................. 66
RD pin ................................................................................. 37
Read/Write bit Information, R/W ......................................... 56
Receive Overflow Indicator bit, SSPOV .............................. 57
Register File ........................................................................ 15
Register File Map ................................................................ 16
Registers
Maps
PIC16C73 ........................................................... 16
PIC16C73A ......................................................... 16
PIC16C74 ........................................................... 16
PIC16C74A ......................................................... 16
RESET Conditions ...................................................... 90
SSPSTAT .................................................................... 56
Summary..................................................................... 17
RESET .......................................................................... 85, 87
Timing Diagram......................................................... 126
RESET Conditions for Special Registers ............................ 90
Revision History ................................................................ 165
RP0 bit .......................................................................... 15, 19
RP1 bit ................................................................................ 19
RX9 bit ................................................................................ 66
RX9D bit.............................................................................. 66
S
S.......................................................................................... 56
SCL ..................................................................................... 60
Serial Communication Interface (SCI) Module,
See USART
Services
One-Time-Programmable (OTP)................................... 7
Quick-Turnaround-Production (QTP) ............................ 7
Serialized Quick-Turnaround Production
(SQTP) .......................................................................... 7
Slave Mode
SCL ............................................................................. 60
SDA............................................................................. 60
SLEEP........................................................................... 85, 87
SMP .................................................................................... 56
Software Simulator (MPLAB-SIM)..................................... 108
SPBRG Register ................................................................. 18
Special Features of the CPU............................................... 85
Special Function Registers
PIC16C73 ................................................................... 17
PIC16C73A ................................................................. 17
PIC16C74 ................................................................... 17
PIC16C74A ................................................................. 17
Special Function Registers, Section ................................... 16
SPEN bit.............................................................................. 66
SPI
Block Diagram............................................................. 55
Master Mode Timing ................................................... 58
Serial Clock ................................................................. 55
Serial Data In .............................................................. 55
Serial Data Out............................................................ 55
Slave Mode Timing ..................................................... 59
Slave Mode Timing Diagram ....................................... 58
Slave Select ................................................................ 55
SSPCON ..................................................................... 57
DS30605C-page 172
SSPSTAT .................................................................... 56
SPI Clock Edge Select bit, CKE ......................................... 56
SPI Data Input Sample Phase Select bit, SMP .................. 56
SREN bit ............................................................................. 66
SSP
Module Overview ........................................................ 55
Section........................................................................ 55
SSPCON .................................................................... 57
SSPSTAT .................................................................... 56
SSPADD Register............................................................... 18
SSPBUF Register ............................................................... 17
SSPCON............................................................................. 57
SSPCON Register .............................................................. 17
SSPEN................................................................................ 57
SSPM3:SSPM0 .................................................................. 57
SSPOV ......................................................................... 57, 60
SSPSTAT Register ....................................................... 18, 56
Stack................................................................................... 26
Overflows.................................................................... 26
Underflow ................................................................... 26
START bit, S....................................................................... 56
STATUS Register ............................................................... 19
STOP bit, P......................................................................... 56
Synchronous Serial Port Enable bit, SSPEN...................... 57
Synchronous Serial Port Mode Select bits,
SSPM3:SSPM0 .................................................................. 57
Synchronous Serial Port Module ........................................ 55
Synchronous Serial Port Status Register ........................... 56
T
T0CS bit.............................................................................. 20
T1CKPS0 bit ....................................................................... 43
T1CKPS1 bit ....................................................................... 43
T1CON Register ................................................................. 43
T1OSCEN bit ...................................................................... 43
T1SYNC bit......................................................................... 43
T2CKPS0 bit ....................................................................... 47
T2CKPS1 bit ....................................................................... 47
T2CON Register ................................................................. 47
TAD...................................................................................... 83
Timer0
RTCC.......................................................................... 91
Timing Diagram ........................................................ 127
Timer1
Timing Diagram ........................................................ 127
Timers
Timer0
External Clock .................................................... 40
Interrupt .............................................................. 39
Prescaler ............................................................ 40
Prescaler Block Diagram .................................... 39
Section................................................................ 39
T0CKI ................................................................. 40
T0IF .................................................................... 94
TMR0 Interrupt ................................................... 94
Timer1
Asynchronous Counter Mode ............................. 45
Capacitor Selection ............................................ 45
Operation in Timer Mode.................................... 44
Oscillator............................................................. 45
Prescaler ............................................................ 45
Resetting of Timer1 Registers ............................ 45
Resetting Timer1 using a CCP
Trigger Output .................................................... 45
Synchronized Counter Mode .............................. 44
T1CON ............................................................... 43
PIC16C63A/65B/73B/74B
TMR1H ............................................................... 45
TMR1L ................................................................ 45
Timer2
Block Diagram .................................................... 47
Module ................................................................ 47
Postscaler ........................................................... 47
Prescaler............................................................. 47
T2CON................................................................ 47
Timing Diagrams
I2C Reception (7-bit Address) ..................................... 62
SPI Master Mode ........................................................ 58
SPI Slave Mode (CKE = 1) ......................................... 59
SPI Slave Mode Timing (CKE = 0).............................. 58
USART Asynchronous Master Transmission.............. 69
USART Asynchronous Reception............................... 71
USART Synchronous Reception................................. 75
USART Synchronous Transmission............................ 73
Wake-up from SLEEP via Interrupt ............................. 98
Timing Diagrams and Specifications................................. 124
A/D Conversion......................................................... 138
Brown-out Reset (BOR) ............................................ 126
Capture/Compare/PWM (CCP)................................. 128
CLKOUT and I/O....................................................... 125
External Clock........................................................... 124
I2C Bus Data ............................................................. 134
I2C Bus START/STOP Bits ....................................... 134
Oscillator Start-up Timer (OST)................................. 126
Parallel Slave Port (PSP).......................................... 129
Power-up Timer (PWRT)........................................... 126
RESET ...................................................................... 126
Timer0 and Timer1.................................................... 127
USART Synchronous Receive (Master/Slave) ......... 136
USART SynchronousTransmission (Master/Slave) .. 136
Watchdog Timer (WDT) ............................................ 126
TMR0 Register .................................................................... 17
TMR1CS bit ........................................................................ 43
TMR1H Register ................................................................. 17
TMR1L Register .................................................................. 17
TMR1ON bit ........................................................................ 43
TMR2 Register .................................................................... 17
TMR2ON bit ........................................................................ 47
TO bit .................................................................................. 19
TOUTPS0 bit....................................................................... 47
TOUTPS1 bit....................................................................... 47
TOUTPS2 bit....................................................................... 47
TOUTPS3 bit....................................................................... 47
TRISA Register ............................................................. 18, 29
TRISB Register ............................................................. 18, 31
TRISC Register ............................................................. 18, 33
TRISD Register ............................................................. 18, 34
TRISE Register ....................................................... 18, 35, 36
TXSTA Register .................................................................. 65
U
UA....................................................................................... 56
Universal Synchronous Asynchronous Receiver
Transmitter (USART) .......................................................... 65
Update Address bit, UA ...................................................... 56
USART
Asynchronous Mode................................................... 68
Asynchronous Receiver.............................................. 70
Asynchronous Reception............................................ 71
Asynchronous Transmitter.......................................... 68
Baud Rate Generator (BRG) ...................................... 67
Receive Block Diagram .............................................. 70
Sampling..................................................................... 67
Synchronous Master Mode......................................... 72
Timing Diagram, Synchronous Receive ........... 136
Timing Diagram, Synchronous Transmission... 136
Synchronous Master Reception ................................. 74
Synchronous Master Transmission ............................ 72
Synchronous Slave Mode........................................... 76
Synchronous Slave Reception ................................... 76
Synchronous Slave Transmit...................................... 76
Transmit Block Diagram ............................................. 68
UV Erasable Devices............................................................ 7
W
Wake-up from SLEEP......................................................... 97
Watchdog Timer (WDT).................................... 85, 87, 90, 95
Timing Diagram ........................................................ 126
WCOL ................................................................................. 57
WDT ................................................................................... 90
Block Diagram ............................................................ 96
Period ......................................................................... 95
Programming Considerations ..................................... 96
Time-out...................................................................... 91
WR pin ................................................................................ 37
Write Collision Detect bit, WCOL........................................ 57
WWW, On-Line Support ....................................................... 3
Z
Z bit..................................................................................... 19
DS30605C-page 173
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 174
PIC16C63A/65B/73B/74B
ON-LINE SUPPORT
Microchip provides on-line support on the Microchip
World Wide Web (WWW) site.
The web site is used by Microchip as a means to make
files and information easily available to customers. To
view the site, the user must have access to the Internet
and a web browser, such as Netscape or Microsoft
Explorer. Files are also available for FTP download
from our FTP site.
DS30605C-page 175
PIC16C63A/65B/73B/74B
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) 792-4150.
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?
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?
DS30605C-page 176
PIC16C63A/65B/73B/74B
PRODUCT IDENTIFICATION SYSTEM
To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office.
PART NO.
Device
-XX
Frequency Temperature
Range
Range
/XX
XXX
Package
Pattern
Examples:
a)
b)
Device
Frequency Range
04
20
5.5V
to 5.5V
5.5V
to 5.5V
c)
Note 1:
= 4 MHz
= 20 MHz
2:
Temperature Range
blank
I
E
=
0C to
70C
= -40C to +85C
= -40C to +125C
(Commercial)
(Industrial)
(Extended)
Package
JW
PQ
PT
SO
SP
P
L
SS
=
=
=
=
=
=
=
=
Pattern
C
LC
T
= CMOS
= Low Power CMOS
= in tape and reel - SOIC, SSOP,
PLCC, QFP, TQ and FP
packages only.
Windowed CERDIP
MQFP (Metric PQFP)
TQFP (Thin Quad Flatpack)
SOIC
Skinny plastic dip
PDIP
PLCC
SSOP
* 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.
DS30605C-page 177
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 178
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 179
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 180
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 181
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 182
PIC16C63A/65B/73B/74B
NOTES:
DS30605C-page 183
ASIA/PACIFIC
Corporate Office
China - Beijing
Singapore
China - Shanghai
Rocky Mountain
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7966 Fax: 480-792-7456
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
Dayton
Two Prestige Place, Suite 130
Miamisburg, OH 45342
Tel: 937-291-1654 Fax: 937-291-9175
Detroit
Tri-Atria Office Building
32255 Northwestern Highway, Suite 190
Farmington Hills, MI 48334
Tel: 248-538-2250 Fax: 248-538-2260
Los Angeles
18201 Von Karman, Suite 1090
Irvine, CA 92612
Tel: 949-263-1888 Fax: 949-263-1338
New York
150 Motor Parkway, Suite 202
Hauppauge, NY 11788
Tel: 631-273-5305 Fax: 631-273-5335
San Jose
Microchip Technology Inc.
2107 North First Street, Suite 590
San Jose, CA 95131
Tel: 408-436-7950 Fax: 408-436-7955
Toronto
6285 Northam Drive, Suite 108
Mississauga, Ontario L4V 1X5, Canada
Tel: 905-673-0699 Fax: 905-673-6509
Hong Kong
Microchip Asia Pacific
RM 2101, Tower 2, Metroplaza
223 Hing Fong Road
Kwai Fong, N.T., Hong Kong
Tel: 852-2401-1200 Fax: 852-2401-3431
ASIA/PACIFIC (continued)
Taiwan
EUROPE
Denmark
Microchip Technology Denmark ApS
Regus Business Centre
Lautrup hoj 1-3
Ballerup DK-2750 Denmark
Tel: 45 4420 9895 Fax: 45 4420 9910
India
France
Germany
Japan
Korea
Microchip Technology Korea
168-1, Youngbo Bldg. 3 Floor
Samsung-Dong, Kangnam-Ku
Seoul, Korea
Tel: 82-2-554-7200 Fax: 82-2-558-5934
Italy
Arizona 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
10/01/00
All rights reserved. 2000 Microchip Technology Incorporated. Printed in the USA. 12/00
Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by
updates. It is your responsibility to ensure that your application meets with your specifications. No representation or warranty is given and no liability is
assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual
property rights arising from such use or otherwise. Use of Microchips products as critical components in life support systems is not authorized except with
express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, except as maybe explicitly expressed herein, under any intellectual property rights. The Microchip logo and name are registered trademarks of Microchip Technology Inc. in the U.S.A. and other countries. All rights
reserved. All other trademarks mentioned herein are the property of their respective companies.
DS30605C-page 184