PIC16F913/914/916/917/946
3.8 PORTF and TRISF Registers
PORTF is an 8-bit port with Schmitt Trigger input buff-
ers. RF<7:0> are individually configured as inputs or
outputs, depending on the state of the port direction.
The port bits are also multiplexed with LCD segment
functions. PORTF is available on the PIC16F946 only.
EXAMPLE 3-6:
BANKSEL PORTF
CLRF PORTF
BANKSEL TRISF
MOVLW 0FFh
MOVWF TRISF
INITIALIZING PORTF
;
;Init PORTF
;
;Set RF<7:0> as inputs
;
REGISTER 3-14: PORTF: PORTF REGISTER(1)
R/W-x
RF7
bit 7
R/W-x
RF6
R/W-x
RF5
R/W-x
RF4
R/W-x
RF3
R/W-x
RF2
R/W-x
RF1
R/W-x
RF0
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
x = Bit is unknown
bit 7-0
RF<7:0>: PORTF I/O Pin bits
1 = Port pin is >VIH min.
0 = Port pin is <VIL max.
Note 1: PIC16F946 only.
REGISTER 3-15: TRISF: PORTF TRI-STATE REGISTER(1)
R/W-1
TRISF7
bit 7
R/W-1
TRISF6
R/W-1
TRISF5
R/W-1
TRISF4
R/W-1
TRISF3
R/W-1
TRISF2
R/W-1
TRISF1
R/W-1
TRISF0
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
x = Bit is unknown
bit 7-0
TRISF<7:0>: PORTF Tri-State Control bits
1 = PORTF pin configured as an input (tri-stated)
0 = PORTF pin configured as an output
Note 1: PIC16F946 only.
© 2007 Microchip Technology Inc.
DS41250F-page 81