PIC18CXX2
TABLE 8-3:
Name
PORTB FUNCTIONS
Bit#
Buffer
Function
TTL/ST(1)
RB0/INT0
RB1/INT1
RB2/INT2
bit0
Input/output pin or external interrupt input1. Internal software
programmable weak pull-up.
TTL/ST(1)
TTL/ST(1)
TTL/ST(4)
bit1
bit2
bit3
Input/output pin or external interrupt input2. Internal software programma-
ble weak pull-up.
Input/output pin or external interrupt input3. Internal software programma-
ble weak pull-up.
RB3/CCP2 (3)
Input/output pin. Capture2 input/Compare2 output/PWM output when
CCP2MX configuration bit is enabled. Internal software programmable
weak pull-up.
RB4
RB5
RB6
RB7
bit4
bit5
bit6
bit7
TTL
TTL
Input/output pin (with interrupt on change). Internal software programma-
ble weak pull-up.
Input/output pin (with interrupt on change). Internal software programma-
ble weak pull-up.
TTL/ST(2)
TTL/ST(2)
Input/output pin (with interrupt on change). Internal software programma-
ble weak pull-up. Serial programming clock.
Input/output pin (with interrupt on change). Internal software programma-
ble weak pull-up. Serial programming data.
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: A device configuration bit selects which I/O pin the CCP2 pin is multiplexed on.
4: This buffer is a Schmitt Trigger input when configured as the CCP2 input.
TABLE 8-4:
SUMMARY OF REGISTERS
ASSOCIATED WITH PORTB
Value on
POR,
BOR
Value on all
other resets
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
PORTB
LATB
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0
xxxx xxxx
uuuu uuuu
LATB Data Output Register
PORTB Data Direction Register
1111 1111
0000 000x
1111 1111
0000 000u
TRISB
INTCON
GIE/
PEIE/
GIEL
TMR0IE
INT0IE
RBIE
TMR0IF
INT0IF
RBIF
GIEH
RBPU
INTEDG0 INTEDG1 INTEDG2
INT1IP INT2IE
—
TMR0IP
—
—
RBIP
1111 -1-1
11-0 0-00
1111 -1-1
11-0 0-00
INTCON2
INT2IP
—
INT1IE
INT2IF
INT1IF
INTCON3
Legend: x = unknown, u = unchanged. Shaded cells are not used by PORTB.
DS39026B-page 82
Preliminary
7/99 Microchip Technology Inc.