English
Language : 

PIC18F87K90 Datasheet, PDF (175/566 Pages) Microchip Technology – 64/80-Pin, High-Performance Microcontrollers with LCD Driver and nanoWatt XLP Technology
PIC18F87K90 FAMILY
11.9 PORTH, LATH and
TRISH Registers
Note: PORTH is available only on the 80-pin
devices.
PORTH is an 8-bit wide, bidirectional I/O port. The
corresponding Data Direction and Output Latch registers
are TRISH and LATH.
All pins on PORTH are implemented with Schmitt
Trigger input buffers. Each pin is individually
configurable as an input or output.
All PORTH pins are multiplexed with the
ADC/CCP/Comparator and LCD segment drives
controlled by the LCDSE5 register. I/O port functions are
only available when the segments are disabled.
EXAMPLE 11-8:
CLRF PORTH
CLRF LATH
BANKSEL ANCON2
MOVLW 0Fh
MOVWF ANCON2
MOVLW 0Fh
MOVWF ANCON1
MOVLW 0CFh
MOVWF TRISH
INITIALIZING PORTH
; Initialize PORTH by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
; Configure PORTH as
; digital I/O
; Configure PORTH as
; digital I/O
; Value used to
; initialize data
; direction
; Set RH3:RH0 as inputs
; RH5:RH4 as outputs
; RH7:RH6 as inputs
 2010 Microchip Technology Inc.
Preliminary
DS39957B-page 175