Datasheet

Table Of Contents
2010 Microchip Technology Inc. DS39770C-page 135
PIC18F85J90 FAMILY
10.10 PORTJ, TRISJ and
LATJ Registers
PORTJ is an 8-bit wide, bidirectional port. The
corresponding Data Direction and Data Latch registers
are TRISJ and LATJ. All pins on PORTJ are digital only
and tolerate voltages up to 5.5V.
All pins on PORTJ are implemented with Schmitt
Trigger input buffers. Each pin is individually
configurable as an input or output.
All PORTJ pins, except RJ0, are multiplexed with LCD
segment drives controlled by the LCDSE4 register. I/O
port functions are only available on these pins when the
segments are disabled.
Each of the PORTJ pins has a weak internal pull-up.
The pull-ups are provided to keep the inputs at a known
state for the external memory interface while powering
up. A single control bit can turn off all the pull-ups. This
is performed by clearing bit RJPU (PORTG<5>). The
weak pull-up is automatically turned off when the port
pin is configured as an output. The pull-ups are
disabled on any device Reset.
EXAMPLE 10-9: INITIALIZING PORTJ
Note: PORTJ is available only on 80-pin devices.
Note: These pins are configured as digital inputs
on any device Reset.
CLRF PORTJ ; Initialize PORTJ by
; clearing output latches
CLRF LATJ ; Alternate method
; to clear output latches
MOVLW 0CFh ; Value used to
; initialize data
; direction
MOVWF TRISJ ; Set RJ3:RJ0 as inputs
; RJ5:RJ4 as output
; RJ7:RJ6 as inputs