English
Language : 

PIC18F2331_07 Datasheet, PDF (121/400 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D
PIC18F2331/2431/4331/4431
TABLE 10-3: PORTB FUNCTIONS
Name
Bit # Buffer
Function
RB0/PWM0
RB1/PWM1
RB2/PWM2
RB3/PWM3
bit 0
TTL(1) Input/output pin or PCPWM output PWM0. Internal software
programmable weak pull-up.
bit 1
TTL(1) Input/output pin or PCPWM output PWM1. Internal software
programmable weak pull-up.
bit 2
TTL(1) Input/output pin or PCPWM output PWM2. Internal software
programmable weak pull-up.
bit 3
TTL(1) Input/output pin or PCPWM output PWM3. Internal software
programmable weak pull-up.
RB4/KBI0/PWM5
RB5/KBI1/PWM4/
PGM(3)
RB6/KBI2/PGC
RB7/KBI3/PGD
bit 4
TTL Input/output pin (with interrupt-on-change) or PCPWM output PWM5.
Internal software programmable weak pull-up.
bit 5 TTL/ST(2) Input/output pin (with interrupt-on-change) or PCPWM output PWM4.
Internal software programmable weak pull-up.
Low-Voltage ICSP™ enable pin.(3)
bit 6 TTL/ST(2) Input/output pin (with interrupt-on-change). Internal software
programmable weak pull-up. Serial programming clock.
bit 7 TTL/ST(2) Input/output pin (with interrupt-on-change). Internal software
programmable weak pull-up. Serial programming data.
Legend: TTL = TTL input, ST = Schmitt Trigger input
Note 1: This buffer is a TTL input when configured as digital I/O.
2: This buffer is a Schmitt Trigger input when used in Serial Programming mode.
3: Low-Voltage Programming must be 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
Bit 0
Value on
POR, BOR
PORTB
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0 xxxx xxxx
LATB
LATB Data Output Register
xxxx xxxx
TRISB
PORTB Data Direction Register
1111 1111
INTCON GIE/GIEH PEIE/GIEL TMR0IE INT0IE RBIE TMR0IF INT0IF RBIF 0000 000x
INTCON2 RBPU INTEDG0 INTEDG1 INTEDG2 — TMR0IP —
RBIP 1111 -1-1
INTCON3 INT2IP INT1IP
—
INT2IE INT1IE
—
INT2IF INT1IF 11-0 0-00
Legend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, read as ‘0’.
Shaded cells are not used by PORTB.
Value on
all other
Resets
uuuu uuuu
uuuu uuuu
1111 1111
0000 000u
1111 -1-1
11-0 0-00
© 2007 Microchip Technology Inc.
Preliminary
DS39616C-page 119