English
Language : 

PIC18F45K80-I Datasheet, PDF (189/622 Pages) Microchip Technology – 28/40/44/64-Pin, Enhanced Flash Microcontrollers with ECAN and nanoWatt XLP Technology
PIC18F66K80 FAMILY
11.7 PORTF, LATF and TRISF Registers
PORTF is an 8-bit wide, bidirectional port. The
corresponding Data Direction and Output Latch regis-
ters are TRISF and LATF. All pins on PORTF are
implemented with Schmitt Trigger input buffers. Each pin
is individually configurable as an input or output.
Note: PORTF is only available on 64-pin devices.
Each of the PORTF pins has a weak internal pull-up. A
single control bit can turn off all the pull-ups. This is
done by clearing bit, RFPU (PADCFG1<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.
Note:
On device Resets, pins, RF<7:1>, are
configured as analog inputs and are read
as ‘0’.
EXAMPLE 11-6: INITIALIZING PORTF
CLRF
CLRF
MOVLW
MOVWF
PORTF
LATF
0CEh
TRISF
; Initialize PORTF by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
; Value used to
; initialize data
; direction
; Set RF3:RF1 as inputs
; RF5:RF4 as outputs
; RF7:RF6 as inputs
TABLE 11-11: PORTF FUNCTIONS
Pin Name
Function
TRIS
Setting
I/O I/O Type
Description
RF0/MDMIN
RF1
RF2/MDCIN1
RF3
RF4/MDCIN2
RF5
RF6/MDOUT
RF7
RF0
0
1
MDMIN
1
RF1
0
1
RF2
0
1
MDCIN1
1
RF3
0
1
RF4
0
1
MDCIN2
1
RF5
0
1
RF6
0
1
MDOUT
0
RF7
0
1
O
DIG LATF<0> data output.
I
ST PORTF<0> data input.
I
ST Modulator source input.
O
DIG LATF<1> data output.
I
ST PORTF<1> data input.
O
DIG LATF<2> data output.
I
ST PORTF<2> data input.
I
ST Modulator Carrier Input 1.
O
DIG LATF<3> data output.
I
ST PORTF<3> data input.
O
DIG LATF<4> data output.
I
ST PORTF<4> data input.
I
ST Modulator Carrier Input 2.
O
DIG LATF<5> data output.
I
ST PORTF<5> data input.
O
DIG LATF<6> data output.
I
ST PORTF<6> data input.
O
DIG Modulator output.
O
DIG LATF<7> data output.
I
ST PORTF<7> data input.
Legend: O = Output; I = Input; ANA = Analog Signal; DIG = CMOS Output; ST = Schmitt Trigger Buffer Input;
x = Don’t care (TRIS bit does not affect port direction or is overridden for this option)
TABLE 11-12: SUMMARY OF REGISTERS ASSOCIATED WITH PORTF
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
PORTF
RF7
RF6
RF5
RF4
RF3
RF2
LATF
LATF7
LATF6
LATF5
LATF4
LATF3
LATF2
TRISF
TRISF7 TRISF6 TRISF5 TRISF4 TRISF3 TRISF2
PADCFG1
RDPU
REPU
RFPU(1) RGPU(1)
—
—
Legend: — = unimplemented, read as ‘0’. Shaded cells are not used by PORTF.
Note 1: These bits are unimplemented on 28-pin devices, read as ‘0’.
Bit 1
RF1
LATF1
TRISF1
—
Bit 0
RF0
LATF0
TRISF0
CTMUDS
 2010-2012 Microchip Technology Inc.
DS39977F-page 189