English
Language : 

PIC18F1220_07 Datasheet, PDF (100/308 Pages) Microchip Technology – 18/20/28-Pin High-Performance, Enhanced Flash Microcontrollers with 10-bit A/D and nanoWatt Technology
PIC18F1220/1320
TABLE 10-3: PORTB FUNCTIONS
Name
Bit#
Buffer
Function
RB0/AN4/INT0
RB1/AN5/TX/CK/INT1
RB2/P1B/INT2
RB3/CCP1/P1A
RB4/AN6/RX/DT/KBI0
RB5/PGM/KBI1
RB6/PGC/T1OSO/T13CKI/
P1C/KBI2
RB7/PGD/T1OSI/P1D/KBI3
bit 0 TTL(1)/ST(2) Input/output port pin, analog input or external interrupt
input 0.
bit 1 TTL(1)/ST(2) Input/output port pin, analog input, Enhanced USART
Asynchronous Transmit, Addressable USART
Synchronous Clock or external interrupt input 1.
bit 2 TTL(1)/ST(2) Input/output port pin or external interrupt input 2.
Internal software programmable weak pull-up.
bit 3 TTL(1)/ST(3) Input/output port pin or Capture1 input/Compare1 output/
PWM output. Internal software programmable weak pull-up.
bit 4 TTL(1)/ST(4) Input/output port pin (with interrupt-on-change), analog input,
Enhanced USART Asynchronous Receive or Addressable
USART Synchronous Data.
bit 5 TTL(1)/ST(5) Input/output port pin (with interrupt-on-change).
Internal software programmable weak pull-up.
Low-Voltage ICSP enable pin.
bit 6 TTL(1)/ST(5,6) Input/output port pin (with interrupt-on-change), Timer1/
Timer3 clock input or Timer1oscillator output.
Internal software programmable weak pull-up.
Serial programming clock.
bit 7 TTL(1)/ST(5) Input/output port pin (with interrupt-on-change) or Timer1
oscillator input. 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 a port input pin.
2: This buffer is a Schmitt Trigger input when configured as the external interrupt.
3: This buffer is a Schmitt Trigger input when configured as the CCP1 input.
4: This buffer is a Schmitt Trigger input when used as EUSART receive input.
5: This buffer is a Schmitt Trigger input when used in Serial Programming mode.
6: This buffer is a TTL input when used as the T13CKI input.
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 xxxq qqqq
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
ADCON1
—
PCFG6 PCFG5 PCFG4 PCFG3 PCFG2 PCFG1 PCFG0 -000 0000
Legend: x = unknown, u = unchanged, q = value depends on condition. 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
-000 0000
DS39605F-page 98
© 2007 Microchip Technology Inc.