c пик18 не знаком но открыв шит вижу пример EXAMPLE 11-1: INITIALIZING PORTA
CLRF PORTA ; Initialize PORTA by
; clearing output latches
CLRF LATA ; Alternate method to
; clear output data latches
MOVLW 00h ; Configure A/D
MOVWF ANCON1 ; for digital inputs
MOVLW 0BFh ; Value used to initialize
; data direction
MOVWF TRISA ; Set RA<7, 5:0> as inputs,
; RA<6> as output