English
Language : 

PIC16F946 Datasheet, PDF (67/274 Pages) Microchip Technology – 64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology
PIC16F946
3.7 PORTF and TRISF Registers
PORTF is an 8-bit port with Schmitt Trigger input
buffers. 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.
Note:
Analog lines that carry LCD signals
(i.e., SEGx, where x are segment identifiers)
are shown as direct connections to the
device pins. The signals are outputs from
the LCD module and may be tri-stated,
depending on the configuration of the LCD
module.
EXAMPLE 3-6: INITIALIZING PORTF
BCF
BCF
CLRF
BSF
BCF
MOVLW
MOVWF
CLRF
BCF
BCF
STATUS,RP0
STATUS,RP1
PORTF
STATUS,RP0
STATUS,RP1
0Fh
TRISF
;
ANSEL
STATUS,RP0
STATUS,RP1
;Bank 3
;
;Init PORTF
;Bank 1
;
;Set RF<3:0> as inputs
;Make RF<2:0> as I/O’s
;Bank 0
;
REGISTER 3-13:
PORTF – PORTF REGISTER (ADDRESS: 188h)
R/W-x R/W-x R/W-x R/W-x R/W-x
RF7
RF6
RF5
RF4
RF3
bit 7
R/W-x
RF2
R/W-x
RF1
R/W-x
RF0
bit 0
bit 7-0
RF<7:0>: PORTF I/O Pin bits
1 = Port pin is >VIH
0 = Port pin is <VIL
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
REGISTER 3-14:
TRISF – PORTF TRI-STATE REGISTER (ADDRESS: 185h)
R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1
TRISF7 TRISF6 TRISF5 TRISF4 TRISF3 TRISF2
bit 7
R/W-1
TRISF1
R/W-1
TRISF0
bit 0
bit 7-0
TRISF<7:0>: Data Direction bits
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
© 2005 Microchip Technology Inc.
Preliminary
DS41265A-page 65