Datasheet

1999-2013 Microchip Technology Inc. Preliminary DS41124D-page 35
PIC16C745/765
5.3 PORTC and TRISC Registers
PORTC is a 5-bit bi-directional port. Each pin is individ-
ually configureable 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.
When enabling peripheral functions, care should be
taken in defining TRIS bits for each PORTC pin. Some
peripherals override the TRIS bit to make a pin an out-
put, while other peripherals override the TRIS bit to
make a pin an input. Since the TRIS bit override is in
effect while the peripheral is enabled, read-modify-
write instructions (BSF, BCF, XORWF) with TRISC as
destination should be avoided. The user should refer to
the corresponding peripheral section for the correct
TRIS bit settings.
FIGURE 5-5: PORTC BLOCK DIAGRAM
Port/Peripheral Select
(1)
Data Bus
WR
Port
WR
TRIS
RD
Data Latch
TRIS Latch
RD TRIS
Schmitt
Trigger
QD
Q
CK
QD
EN
Peripheral Data Out
0
1
QD
Q
CK
P
N
V
DD
VSS
Port
Peripheral
OE
(2)
Peripheral Input
I/O
pin
Note 1: Port/Peripheral select signal selects between port
data and peripheral output.
2: Peripheral OE (output enable) is only activated if
peripheral select is active.
VDD