PIC18F2331/2431/4331/4431
TABLE 1-2:
PIC18F2331/2431 PINOUT I/O DESCRIPTIONS
Pin Number
Pin Buffer
Pin Name
Description
SPDIP,
SOIC
Type Type
QFN
MCLR/VPP
MCLR
1
26
Master Clear (input) or programming voltage (input).
Master Clear (Reset) input. This pin is an active-low
Reset to the device.
I
ST
VPP
P
High-voltage ICSP™ programming enable pin.
OSC1/CLKI/RA7
OSC1
9
6
7
Oscillator crystal or external clock input.
Oscillator crystal input or external clock source input.
ST buffer when configured in RC mode; CMOS otherwise.
External clock source input. Always associated with pin
function OSC1. (See related OSC1/CLKI, OSC2/CLKO
pins.)
I
I
ST
CLKI
CMOS
RA7
I/O
TTL
General purpose I/O pin.
OSC2/CLKO/RA6
OSC2
10
Oscillator crystal or clock output.
O
O
—
—
Oscillator crystal output. Connects to crystal or
resonator in Crystal Oscillator mode.
In RC mode, OSC2 pin outputs CLKO, which has 1/4
the frequency of OSC1 and denotes the instruction
cycle rate.
CLKO
RA6
I/O
TTL
General purpose I/O pin.
PORTA is a bidirectional I/O port.
RA0/AN0
RA0
2
3
4
27
28
1
I/O
I
TTL
Analog
Digital I/O.
Analog Input 0.
AN0
RA1/AN1
RA1
I/O
I
TTL
Analog
Digital I/O.
Analog Input 1.
AN1
RA2/AN2/VREF-/CAP1/INDX
RA2
AN2
VREF-
CAP1
INDX
I/O
TTL
Analog
Analog
ST
Digital I/O.
Analog Input 2.
A/D reference voltage (low) input.
Input Capture Pin 1.
Quadrature Encoder Interface index input pin.
I
I
I
I
ST
RA3/AN3/VREF+/CAP2/QEA
5
6
2
3
RA3
AN3
VREF+
CAP2
QEA
I/O
TTL
Analog
Analog
ST
Digital I/O.
Analog Input 3.
A/D reference voltage (high) input.
Input Capture Pin 2.
Quadrature Encoder Interface Channel A input pin.
I
I
I
I
ST
RA4/AN4/CAP3/QEB
RA4
AN4
CAP3
QEB
I/O
TTL
Analog
ST
Digital I/O.
Analog Input 4.
Input Capture Pin 3.
Quadrature Encoder Interface Channel B input pin.
I
I
I
ST
Legend: TTL = TTL compatible input
ST = Schmitt Trigger input with CMOS levels
= Output
CMOS = CMOS compatible input or output
I
= Input
O
P
= Power
DS39616D-page 16
2010 Microchip Technology Inc.