Datasheet
1997 Microchip Technology Inc. DS30444E - page 39
PIC16C9XX
5.6 PORTF and TRISF Register
PORTF is an digital input only port. Each pin is multi-
plexed with an LCD segment driver. These pins have
Schmitt Trigger input buffers.
EXAMPLE 5-6: INITIALIZING PORTF
BCF STATUS,RP0 ;Select Bank2
BSF STATUS,RP1 ;
BCF LCDSE,SE16 ;Make all PORTF
BCF LCDSE,SE12 ;digital inputs
Note 1: On a Power-on Reset these pins are con-
figured as LCD segment drivers.
Note 2: To configure the pins as a digital port, the
corresponding bits in the LCDSE register
must be cleared. Any bit set in the LCDSE
register overrides any bit settings in the
corresponding TRIS register.
FIGURE 5-9: PORTF BLOCK DIAGRAM
RD PORT
Schmitt
Trigger
input
buffer
EN
Q D
EN
Digital Input/
LCDSE<n>
LCD
LCD Segment
LCD Output pin
LCD
LCD Common
Data Bus
RD TRIS
V
DD
Segment Data
Output Enable
Common Data
Output Enable
TABLE 5-11: PORTF FUNCTIONS
TABLE 5-12: SUMMARY OF REGISTERS ASSOCIATED WITH PORTF
Name Bit# Buffer Type Function
RF0/SEG12 bit0 ST Digital input or Segment Driver12
RF1/SEG13 bit1 ST Digital input or Segment Driver13
RF2/SEG14 bit2 ST Digital input or Segment Driver14
RF3/SEG15 bit3 ST Digital input or Segment Driver15
RF4/SEG16 bit4 ST Digital input or Segment Driver16
RF5/SEG17 bit5 ST Digital input or Segment Driver17
RF6/SEG18 bit6 ST Digital input or Segment Driver18
RF7/SEG19 bit7 ST Digital input or Segment Driver19
Legend: ST = Schmitt Trigger input
Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Value on
Power-on
Reset
Value on all
other resets
107h PORTF RF7 RF6 RF5 RF4 RF3 RF2 RF1 RF0 0000 0000 0000 0000
187h TRISF PORTF Data Direction Control Register 1111 1111 1111 1111
10Dh LCDSE SE29 SE27 SE20 SE16 SE12 SE9 SE5 SE0 1111 1111 1111 1111
Legend: Shaded cells are not used by PORTF.