Datasheet

© 2007 Microchip Technology Inc. DS41250F-page 81
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: INITIALIZING PORTF
BANKSEL PORTF ;
CLRF PORTF ;Init PORTF
BANKSEL TRISF ;
MOVLW 0FFh ;Set RF<7:0> as inputs
MOVWF TRISF ;
REGISTER 3-14: PORTF: PORTF REGISTER
(1)
R/W-x R/W-x R/W-x R/W-x R/W-x R/W-x R/W-x R/W-x
RF7 RF6 RF5 RF4 RF3 RF2 RF1 RF0
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 7-0 RF<7:0>: PORTF I/O Pin bits
1 = Port pin is >V
IH min.
0 = Port pin is <V
IL max.
Note 1: PIC16F946 only.
REGISTER 3-15: TRISF: PORTF TRI-STATE REGISTER
(1)
R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1
TRISF7 TRISF6 TRISF5 TRISF4 TRISF3 TRISF2 TRISF1 TRISF0
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘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.