English
Language : 

PIC18F67J11-IPT Datasheet, PDF (144/448 Pages) Microchip Technology – 64/80-Pin High-Performance, 1-Mbit Flash Microcontrollers with nanoWatt Technology
PIC18F87J11 FAMILY
10.7 PORTF, LATF and TRISF Registers
PORTF is a 7-bit wide, bidirectional port. Only pin 7 of
PORTF has no analog input; it is the only pin that can
tolerate voltages up to 5.5V.
All pins on PORTF are implemented with Schmitt
Trigger input buffers. Each pin is individually
configurable as an input or output.
PORTF is multiplexed with analog peripheral functions.
RF1 through RF6 may also be used as analog input
channels for the A/D Converter. All pins may be used as
comparator inputs or outputs by setting the appropriate
bits in the CMCON register. To use RF<6:3> as digital
inputs, it is also necessary to turn off the comparators.
Note 1: On device Resets, pins RF6:RF1 are
configured as analog inputs and are read
as ‘0’.
2: To configure PORTF as digital I/O, set the
corresponding bits in ANCON0 and
ANCON1.
When Configuration bit, PMPMX = 0, PORTF is
multiplexed with the Parallel Master Port data. This
multiplexing is available only in 80-pin devices.
EXAMPLE 10-6: INITIALIZING PORTF
CLRF PORTF
; Initialize PORTF by
; clearing output
; data latches
CLRF LATF
; Alternate method to
; clear output latches
BSF WDTCON,ADSHR ; Enable write/read to
; the shared SFR
MOVLW C0h
; make RF1:RF2 digital
MOVWF ANCON0
;
MOVLW 0Fh
; make RF<6:3> digital
MOVWF ANCON1
;
BCF WDTCON,ADSHR ; Disable write/read to
; the shared SFR
MOVLW CEh
;
MOVWF TRISF
; Set RF5:RF4 as outputs,
; RF<7:6>,<3:1> as inputs
DS39778D-page 144
© 2009 Microchip Technology Inc.