PIC16F684-ISL Microchip Technology Inc., PIC16F684-ISL Datasheet - Page 42

no-image

PIC16F684-ISL

Manufacturer Part Number
PIC16F684-ISL
Description
Manufacturer
Microchip Technology Inc.
Datasheets

Specifications of PIC16F684-ISL

Case
N/A
Notes
NEW
Date_code
11+
PIC16F684
4.3
PORTC
PORTC is a general purpose I/O port consisting of 6
bidirectional pins. The pins can be configured for either
digital I/O or analog input to A/D converter or compara-
tor. For specific information about individual functions
such as the Enhanced CCP or the A/D, refer to the
appropriate section in this data sheet.
Note:
The ANSEL (91h) and CMCON0 (19h)
registers must be initialized to configure
an analog channel as a digital input. Pins
configured as analog inputs will read ‘0’.
EXAMPLE 4-3:
INITIALIZING PORTC
BCF
STATUS,RP0
;Bank 0
CLRF
PORTC
;Init PORTC
MOVLW
07h
;Set RC<4,1:0> to
MOVWF
CMCON0
;digital I/O
BSF
STATUS,RP0
;Bank 1
CLRF
ANSEL
;digital I/O
MOVLW
0Ch
;Set RC<3:2> as inputs
MOVWF
TRISC
;and set RC<5:4,1:0>
;as outputs
BCF
STATUS,RP0
;Bank 0
4.3.1
RC0/AN4/C2IN+
The RC0 is configurable to function as one of the
following:
• a general purpose I/O
• an analog input for the A/D Converter
• an analog input to the comparator
4.3.2
RC1/AN5/C2IN-
The RC1 is configurable to function as one of the
following:
• a general purpose I/O
• an analog input for the A/D Converter
• an analog input to the comparator
DS41202C-page 40
FIGURE 4-7:
BLOCK DIAGRAM OF RC0
AND RC1
Data Bus
D
Q
WR
CK
Q
PORTC
D
Q
WR
CK
Q
TRISC
RD
TRISC
RD
PORTC
To Comparators
To A/D Converter
Note 1:
Analog Input mode comes from ANSEL or
Comparator mode.
Preliminary
 2004 Microchip Technology Inc.
V
DD
I/O PIN
V
SS
Analog Input
(1)
Mode

Related parts for PIC16F684-ISL