Datasheet

Section 8 I/O Ports
Rev. 3.00 Sep. 28, 2009 Page 137 of 710
REJ09B0384-0300
8.4 Port 4
Port 4 is an 8-bit I/O port. Port 4 pins also function as external interrupt input and de-bounce
input. Port 4 has the following registers.
Port 4 data direction register (P4DDR)
Port 4 data register (P4DR)
Port 4 pull-up MOS control register (P4PCR)
Noise canceler enable register (P4NCE)
Noise canceler mode control register (P4NCMC)
Noise cancel cycle setting register (NCCS)
8.4.1 Port 4 Data Direction Register (P4DDR)
The individual bits of P4DDR specify input or output for the pins of port 4.
These bits are initialized only by a system reset, and retain their values even when an internal reset
signal is generated by the WDT.
Bit Bit Name Initial Value R/W Description
7 P47DDR 0 W
6 P46DDR 0 W
5 P45DDR 0 W
4 P44DDR 0 W
3 P43DDR 0 W
2 P42DDR 0 W
1 P41DDR 0 W
If port 4 pins are specified for use as the general I/O
port, the corresponding port 4 pins function as output
port when the P4DDR bits are set to 1, and as input
port when cleared to 0.
0 P40DDR 0 W