PIC16C745/765
5.3
PORTC and TRISC Registers
FIGURE 5-5: PORTC BLOCK DIAGRAM
PORT/PERIPHERAL Select(1)
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.
Peripheral Data Out
VDD
VDD
0
Data Bus
WR
PORT
D
Q
Q
P
1
CK
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.
Data Latch
I/O
pin
D
Q
Q
WR
TRIS
CK
N
TRIS Latch
VSS
Schmitt
Trigger
RD TRIS
Peripheral
OE(2)
Q
D
EN
RD
PORT
Peripheral Input
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.
1999 Microchip Technology Inc.
Advanced Information
DS41124A-page 35