Datasheet

Section 8 I/O Ports
Rev. 2.00 Aug. 20, 2008 Page 248 of 1198
REJ09B0403-0200
8.1.11 Port B
Port B is an 8-bit I/O port. Port B pins can also function as the bidirectional data bus, de-bounced
input, and EtherC control I/O pins. The pin functions change according to the operating mode.
Port B has the following registers.
Port B data direction register (PBDDR)
Port B output data register (PBODR)
Port B input data register (PBPIN)
Noise canceler enable register (P4BNCE)
Noise canceler mode control register (P4BNCMC)
Noise cancel cycle setting register (NCCS)
(1) Port B Data Direction Register (PBDDR)
The individual bits of PBDDR specify input or output for the pins of port B.
Bit Bit Name Initial Value R/W Description
7 PB7DDR 0 W
6 PB6DDR 0 W
5 PB5DDR 0 W
4 PB4DDR 0 W
3 PB3DDR 0 W
2 PB2DDR 0 W
1 PB1DDR 0 W
0 PB0DDR 0 W
When set to 1, the corresponding pins function as
output port pins; when cleared to 0, function as input
port pins.