English
Language : 

PIC18F23K20_10 Datasheet, PDF (126/456 Pages) Microchip Technology – 28/40/44-Pin Flash Microcontrollers with nanoWatt XLP Technology
PIC18F2XK20/4XK20
TABLE 10-3: PORTB I/O SUMMARY (CONTINUED)
Pin
Function
TRIS
Setting
I/O
I/O
Type
Description
RB6/KBI2/PGC
RB6
0
O DIG LATB<6> data output.
1
I
TTL PORTB<6> data input; Programmable weak pull-up.
KBI2
PGC
1
I
TTL Interrupt-on-pin change.
x
I
ST Serial execution (ICSP) clock input for ICSP and ICD operation.(3)
RB7/KBI3/PGD
RB7
0
O DIG LATB<7> data output.
1
I
TTL PORTB<7> data input; Programmable weak pull-up.
KBI3
PGD
1
I
TTL Interrupt-on-pin change.
x
O DIG Serial execution data output for ICSP and ICD operation.(3)
x
I
ST Serial execution data input for ICSP and ICD operation.(3)
Legend:
Note 1:
2:
3:
DIG = Digital level output; TTL = TTL input buffer; ST = Schmitt Trigger input buffer; ANA = Analog level input/output;
x = Don’t care (TRIS bit does not affect port direction or is overridden for this option).
Configuration on POR is determined by the PBADEN Configuration bit. Pins are configured as analog inputs by default
when PBADEN is set and digital inputs when PBADEN is cleared.
Alternate assignment for CCP2 when the CCP2MX Configuration bit is ‘0’. Default assignment is RC1.
All other pin functions are disabled when ICSP or ICD are enabled.
TABLE 10-4: SUMMARY OF REGISTERS ASSOCIATED WITH PORTB
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
PORTB
RB7
RB6
RB5
RB4
RB3
RB2
LATB
PORTB Data Latch Register (Read and Write to Data Latch)
TRISB
PORTB Data Direction Control Register
WPUB
WPUB7 WPUB6 WPUB5 WPUB4 WPUB3 WPUB2
IOCB
SLRCON
IOCB7
—
IOCB6
—
IOCB5
—
IOCB4
—
SLRE(1) SLRD(1)
—
SLRC
INTCON
GIE/GIEH PEIE/GIEL TMR0IE INT0IE RBIE TMR0IF
INTCON2
RBPU INTEDG0 INTEDG1 INTEDG2 —
TMR0IP
INTCON3
INT2IP INT1IP
—
INT2IE INT1IE
—
ANSELH
—
—
—
ANS12 ANS11 ANS10
Legend: — = unimplemented, read as ‘0’. Shaded cells are not used by PORTB.
Note 1: Not implemented on PIC18F2XK20 devices.
RB1
WPUB1
—
SLRB
INT0IF
—
INT2IF
ANS9
Bit 0
RB0
WPUB0
—
SLRA
RBIF
RBIP
INT1IF
ANS8
Reset
Values
on page
62
62
62
62
62
63
59
59
59
62
DS41303G-page 126
 2010 Microchip Technology Inc.