English
Language : 

PIC18F67J11T-I Datasheet, PDF (161/466 Pages) Microchip Technology – 64/80-Pin, High-Performance, 1-Mbit Flash Microcontrollers
PIC18F87J11 FAMILY
11.9 PORTH, LATH and
TRISH Registers
Note: PORTH is available only on 80-pin
devices.
PORTH is an 8-bit wide, bidirectional I/O port. PORTH
pins <3:0> are digital only and tolerate voltages up to
5.5V.
All pins on PORTH are implemented with Schmitt
Trigger input buffers. Each pin is individually
configurable as an input or output.
When the External Memory Interface is enabled, four of
the PORTH pins function as the high-order address
lines for the interface. The address output from the
interface takes priority over other digital I/O. The
corresponding TRISH bits are also overridden. PORTH
pins, RH4 through RH7, are multiplexed with analog
converter inputs. The operation of these pins as analog
inputs is selected by clearing or setting the
corresponding bits in the ANCON1 register. RH2 to
RH6 are multiplexed with the Parallel Master Port and
RH4 to RH6 are multiplexed as comparator inputs.
PORTH can also be configured as the alternate
Enhanced PWM Output Channels B and C for the
ECCP1 and ECCP3 modules. This is done by clearing
the ECCPMX Configuration bit.
EXAMPLE 11-9: INITIALIZING PORTH
CLRF
CLRF
BSF
MOVLW
MOVWF
BCF
MOVLW
MOVWF
PORTH
; Initialize PORTH by
; clearing output
; data latches
LATH
; Alternate method to
; clear output latches
WDTCON,ADSHR ; Enable write/read to
; the shared SFR
F0h
; Configure PORTH as
ANCON1
; digital I/O
WDTCON,ADSHR ; Disable write/read to
; the shared SFR
H'CF'
; Value used to initialize
; data direction
TRISH
; Set RH<3:0> as inputs
; RH<5:4> as outputs
; RH<7:6> as inputs
 2007-2012 Microchip Technology Inc.
DS39778E-page 161