PIC16C65A Microchip Technology, PIC16C65A Datasheet - Page 55

no-image

PIC16C65A

Manufacturer Part Number
PIC16C65A
Description
8-Bit CMOS Microcontrollers
Manufacturer
Microchip Technology
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16C65A-04/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16C65A-04/L
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C65A-04/P
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC16C65A-04/PQ
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16C65A-04/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16C65A-04E/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16C65A-04E/PQ
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16C65A-10/L
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC16C65A-10/P
Quantity:
6
Part Number:
PIC16C65A-10/P
Quantity:
17
5.3
PORTC is an 8-bit wide 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.
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.
EXAMPLE 5-3:
BCF
BCF
CLRF
BSF
MOVLW
MOVWF
TABLE 5-5:
Applicable Devices
61 62 62A R62 63 R63 64 64A R64 65 65A R65 66 67
Name
RC0/T1OSI/T1CKI
RC1/T1OSO
RC2/CCP1
RC3/SCK/SCL
RC4/SDI/SDA
RC5/SDO
RC6
RC7
Legend: ST = Schmitt Trigger input
1997 Microchip Technology Inc.
STATUS, RP0
STATUS, RP1
PORTC
STATUS, RP0
0xCF
TRISC
PORTC and TRISC Register
PORTC FUNCTIONS FOR PIC16C62/64
INITIALIZING PORTC
Bit# Buffer Type Function
bit1
bit2
bit3
bit4
bit5
bit6
bit7
bit0
;
; PIC16C66/67 only
; Initialize PORTC by
; clearing output
; data latches
; Select Bank 1
; Value used to
; initialize data
; direction
; Set RC<3:0> as inputs
; RC<5:4> as outputs
; RC<7:6> as inputs
ST
ST
ST
ST
ST
ST
ST
ST
RC3 can also be the synchronous serial clock for both SPI and I
Input/output port pin or synchronous serial port data output
Input/output port pin or Timer1 oscillator input or Timer1 clock input
Input/output port pin or Timer1 oscillator output
Input/output port pin or Capture1 input/Compare1 output/PWM1 output
RC4 can also be the SPI Data In (SPI mode) or data I/O (I
Input/output port pin
Input/output port pin
FIGURE 5-6:
PORT/PERIPHERAL Select
Peripheral Data Out
Data bus
Note 1: I/O pins have diode protection to V
Peripheral input
Peripheral
OE
WR
TRIS
WR
PORT
(3)
2: Port/Peripheral select signal selects between port
3: Peripheral OE (output enable) is only activated if
data and peripheral output.
peripheral select is active.
RD
PORT
TRIS Latch
Data Latch
D
D
CK
RD TRIS
CK
PORTC BLOCK DIAGRAM
Q
Q
Q
Q
0
1
(2)
PIC16C6X
Q
EN
D
DS30234D-page 55
2
Schmitt
Trigger
C mode).
DD
V
2
V
N
P
C modes.
and V
SS
DD
I/O
pin
SS
(1)
.

Related parts for PIC16C65A