English
Language : 

PIC18F87J10 Datasheet, PDF (117/394 Pages) Microchip Technology – 64/80-Pin High-Performance, 1-Mbit Flash Microcontrollers with nanoWatt Technology
PIC18F87J10 FAMILY
10.0 I/O PORTS
Depending on the device selected and features
enabled, there are up to nine ports available. Some
pins of the I/O ports are multiplexed with an alternate
function from the peripheral features on the device. In
general, when a peripheral is enabled, that pin may not
be used as a general purpose I/O pin.
Each port has three registers for its operation. These
registers are:
• TRIS register (data direction register)
• Port register (reads the levels on the pins of the
device)
• LAT register (output latch)
The Data Latch (LAT register) is useful for
read-modify-write operations on the value that the I/O
pins are driving.
A simplified model of a generic I/O port, without the
interfaces to other peripherals, is shown in Figure 10-1.
FIGURE 10-1:
GENERIC I/O PORT
OPERATION
RD LAT
Data
Bus
WR LAT
or Port
WR TRIS
RD TRIS
D
Q
CK
Data Latch
DQ
CK
TRIS Latch
I/O pin(1)
Input
Buffer
Q
D
RD Port
ENEN
Note 1: I/O pins have diode protection to VDD and VSS.
10.1 I/O Port Pin Capabilities
When developing an application, the capabilities of the
port pins must be considered. Outputs on some pins
have higher output drive strength than others. Similarly,
some pins can tolerate higher than VDD input levels.
10.1.1 PIN OUTPUT DRIVE
The output pin drive strengths vary for groups of pins
intended to meet the needs for a variety of applications.
PORTB and PORTC are designed to drive higher
loads, such as LEDs. The external memory interface
ports (PORTD, PORTE and PORTJ) are designed to
drive medium loads. All other ports are designed for
small loads, typically indication only. Table 10-1 sum-
marizes the output capabilities. Refer to Section 26.0
“Electrical Characteristics” for more details.
TABLE 10-1: OUTPUT DRIVE LEVELS
Port
Drive
Description
PORTA Minimum Intended for indication.
PORTF
PORTG
PORTH(1)
PORTD
PORTE
PORTJ(1)
Medium Sufficient drive levels for
external memory interfacing
as well as indication.
PORTB
PORTC
High Suitable for direct LED drive
levels.
Note 1: These ports are not available on 64-pin
devices.
 2005 Microchip Technology Inc.
Advance Information
DS39663A-page 115