Datasheet

Table Of Contents
Section 9 I/O Ports
Rev. 2.00 Jul. 04, 2007 Page 190 of 692
REJ09B0309-0200
9.10 Port B
Port B is an input-only port: its pins can also be configured to function as an interrupt input pin
and analog input pin. Figure 9.10 shows the pin configuration.
PB4/AN4
PB7/AN7
Port B
PB6/AN6
PB5/AN5
PB0/AN0/IRQ
0
PB3/AN3
PB2/AN2/IRQ
3
PB1/AN1/IRQ
1
Figure 9.10 Port B Pin Configuration
Port B has the following registers.
Port data register B (PDRB)
Port mode register B (PMRB)
9.10.1 Port Data Register B (PDRB)
PDRB is a register that stores data of port B.
Bit Bit Name
Initial
Value
R/W Description
7
6
5
4
3
2
1
0
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
R
R
R
R
R
R
R
R
Reading PDRB always gives the pin states. However, if
a port B pin is selected as an analog input channel by
the CH3 to CH0 bits in AMR of the A/D converter, that
pin is read as 0 regardless of the input voltage.