155
8.10
Port B
8.10.1
Overview
Port B is an 4-bit input-only port configured as shown in figure 8.9.
PB /AN
PB /AN
PB /AN
PB /AN
7
6
5
4
7
6
5
4
Port B
Figure 8.9 Port B Pin Configuration
8.10.2
Register Configuration and Description
Table 8.26 shows the port B register configuration.
Table 8.26
Port B Register
Name
Abbrev.
R/W
Address
Port data register B
PDRB
R
H'FFDE
Port Data Register B (PDRB)
Bit
7
6
5
4
3
2
1
0
PB
7
PB
6
PB
5
PB
4
—
—
—
—
Read/Write
R
R
R
R
—
—
—
—
Reading PDRB always gives the pin states. However, if a port B pin is selected as an analog input
channel for the A/D converter by AMR bits CH3 to CH0, that pin reads 0 regardless of the input
voltage.