English
Language : 

PIC16LC63A-04 Datasheet, PDF (33/184 Pages) Microchip Technology – 8-Bit CMOS Microcontrollers with A/D Converter
PIC16C63A/65B/73B/74B
5.3 PORTC and TRISC Registers
PORTC is an 8-bit bi-directional port. Each pin is indi-
vidually 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.
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 des-
tination 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(2)
Peripheral Data Out
Data Bus D
Q
0
WR
Port
CK Q
1
Data Latch
WR
TRIS
DQ
CK Q
TRIS Latch
RD TRIS
Peripheral
OE(3)
Q
VDD
P
I/O pin(1)
N
VSS
Schmitt
Trigger
D
RD
EN
Port
Peripheral Input
Note 1: I/O pins have diode protection to VDD and VSS.
2: Port/Peripheral select signal selects between port
data and peripheral output.
3: Peripheral OE (output enable) is only activated if
peripheral select is active.
TABLE 5-5: PORTC FUNCTIONS
Name
Bit# Buffer Type
RC0/T1OSO/T1CKI
bit0
ST
RC1/T1OSI/CCP2
bit1
ST
RC2/CCP1
RC3/SCK/SCL
RC4/SDI/SDA
RC5/SDO
RC6/TX/CK
bit2
ST
bit3
ST
bit4
ST
bit5
ST
bit6
ST
RC7/RX/DT
bit7
ST
Legend: ST = Schmitt Trigger input
Function
Input/output port pin or Timer1 oscillator output/Timer1 clock input.
Input/output port pin or Timer1 oscillator input or Capture2 input/Compare2
output/PWM2 output.
Input/output port pin or Capture1 input/Compare1 output/PWM1 output.
RC3 can also be the Synchronous Serial Clock for both SPI and I2C modes.
RC4 can also be the SPI Data In (SPI mode) or Data I/O (I2C mode).
Input/output port pin or Synchronous Serial Port Data output.
Input/output port pin or USART Asynchronous Transmit, or USART
Synchronous Clock.
Input/output port pin or USART Asynchronous Receive, or USART
Synchronous Data.
TABLE 5-6: SUMMARY OF REGISTERS ASSOCIATED WITH PORTC
Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
07h
PORTC RC7
RC6
RC5 RC4
87h
TRISC PORTC Data Direction register
Legend: x = unknown, u = unchanged
RC3
RC2
RC1
RC0
Value on:
POR,
BOR
Value on
all other
RESETS
xxxx xxxx uuuu uuuu
1111 1111 1111 1111
 2000 Microchip Technology Inc.
DS30605C-page 33