
PIC16F87X
DS30292C-page 32
2001 Microchip Technology Inc.
TABLE 3-3:
PORTB FUNCTIONS
TABLE 3-4:
SUMMARY OF REGISTERS ASSOCIATED WITH PORTB
Name
Bit#
Buffer
Function
RB0/INT
bit0
TTL/ST
(1)
Input/output pin or external interrupt input. Internal software
programmable weak pull-up.
Input/output pin. Internal software programmable weak pull-up.
Input/output pin. Internal software programmable weak pull-up.
Input/output pin or programming pin in LVP mode. Internal software
programmable weak pull-up.
Input/output pin (with interrupt-on-change). Internal software programmable
weak pull-up.
Input/output pin (with interrupt-on-change). Internal software programmable
weak pull-up.
Input/output pin (with interrupt-on-change) or In-Circuit Debugger pin.
Internal software programmable weak pull-up. Serial programming clock.
Input/output pin (with interrupt-on-change) or In-Circuit Debugger pin.
Internal software programmable weak pull-up. Serial programming data.
RB1
RB2
RB3/PGM
(3)
bit1
bit2
bit3
TTL
TTL
TTL
RB4
bit4
TTL
RB5
bit5
TTL
RB6/PGC
bit6
TTL/ST
(2)
RB7/PGD
bit7
TTL/ST
(2)
Legend: TTL = TTL input, ST = Schmitt Trigger input
Note 1:
This buffer is a Schmitt Trigger input when configured as the external interrupt.
2:
This buffer is a Schmitt Trigger input when used in Serial Programming mode.
3:
Low Voltage ICSP Programming (LVP) is enabled by default, which disables the RB3 I/O function. LVP
must be disabled to enable RB3 as an I/O pin and allow maximum compatibility to the other 28-pin and
40-pin mid-range devices.
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on:
POR,
BOR
Value on
all other
RESETS
06h, 106h
86h, 186h
81h, 181h
Legend:
x
= unknown,
u
= unchanged. Shaded cells are not used by PORTB.
PORTB
TRISB
OPTION_REG
RB7
PORTB Data Direction Register
RBPU
INTEDG
RB6
RB5
RB4
RB3
RB2
RB1
RB0
xxxx xxxx uuuu uuuu
1111 1111 1111 1111
T0CS
T0SE
PSA
PS2
PS1
PS0
1111 1111 1111 1111