Hardware manual

Rev. 3.0, 09/98, page 84 of 361
6.2 Port 1
Port 1 is an 8-bit input/output port that also provides the low bits of the address bus. The function
of port 1 depends on the MCU mode as indicated in table 6.2.
Table 6.2 Functions of Port 1
Mode 1 Mode 2 Mode 3
Address bus (Low)
(A
7
to A
0
)
Input port or Address bus (Low)
(A
7
to A
0
)
*
Input/output port
Note: Depending on the bit settings in the data direction register: 0input pin; 1address pin
Pins of port 1 can drive a single TTL load and a 90pF capacitive load when they are used as output
pins. They can also drive light-emitting diodes and a Darlington pair. When they are used as
input pins, they have programmable MOS transistor pull-ups.
Table 6.3 details the port 1 registers.
Table 6.3 Port 1 Registers
Name Abbreviation Read/Write Initial Value Address
Port 1 data direction register P1DDR W H'FF (mode 1)
H'00 (modes 2 and 3)
H'FFB0
Port 1 data register P1DR R/W H'00 H'FFB2
Port 1 input pull-up control register P1PCR R/W H'00 H'FFAC
Port 1 Data Direction Register (P1DDR)H'FFB0
Bit 76543210
P1
7
DDR P1
6
DDR P1
5
DDR P1
4
DDR P1
3
DDR P1
2
DDR P1
1
DDR P1
0
DDR
Mode 1
Initial value 11111111
Read/Write 
Modes 2 and 3
Initial value 00000000
Read/Write W W W W W W W W
P1DDR is an 8-bit register that selects the direction of each pin in port 1. A pin functions as an
output pin if the corresponding bit in P1DDR is set to “1,” and as an input pin if the bit is cleared
to “0.”