Datasheet
Rev. 3.00, 03/04, page 217 of 830
8.8 Port 8
Port 8 is an 8-bit I/O port. Port 8 pins also function as the A/D converter external trigger input pin,
SCI_0, SCI_1, and SCI_2 clock input/output pins, IIC_0 and IIC_1 input/output pins, TMR_0,
TMR_1, TMR_X, and TMR_Y input pins, and interrupt input pins. Port 8 is an NMOS push-pull
output. Port 8 has the following registers.
• Port 8 data direction register (P8DDR)
• Port 8 data register (P8DR)
8.8.1 Port 8 Data Direction Register (P8DDR)
The individual bits of P8DDR specify input or output for the pins of port 8.
Bit Bit Name Initial Value R/W Description
7 P87DDR 0 W
6 P86DDR 0 W
5 P85DDR 0 W
4 P84DDR 0 W
3 P83DDR 0 W
2 P82DDR 0 W
1 P81DDR 0 W
0 P80DDR 0 W
This register is assigned to the same address as that
of PBPIN. When this register is read, the port B states
are read.
If port 8 pins are specified for use as the general I/O
port, the corresponding port 8 pins are output ports
when the P8DDR bits are set to 1, and input ports
when cleared to 0.
8.8.2 Port 8 Data Register (P8DR)
P8DR stores output data for the port 8 pins.
Bit Bit Name Initial Value R/W Description
7 P87DR 0 R/W
6 P86DR 0 R/W
5 P85DR 0 R/W
4 P84DR 0 R/W
3 P83DR 0 R/W
2 P82DR 0 R/W
1 P81DR 0 R/W
0 P80DR 0 R/W
P8DR stores output data for the port 8 pins that are
used as the general output port.
If a port 8 read is performed while the P8DDR bits are
set to 1, the P8DR values are read. If a port 8 read is
performed while the P8DDR bits are cleared to 0, the
pin states are read.