
131
Section 8 I/O Ports
8.1
Overview
The H8/3802 Series is provided with three 8-bit I/O ports, one 7-bit I/O port, one 4-bit I/O port,
one 3-bit I/O port, one 1-bit I/O port, one 4-bit input-only port, one 1-bit input-only port, and one
6-bit output-only port. Table 8.1 indicates the functions of each port.
Each port has of a port control register (PCR) that controls input and output, and a port data
register (PDR) for storing output data. Input or output can be assigned to individual bits.
See 2.9.2, Notes on Bit Manipulation, for information on executing bit-manipulation instructions
to write data in PCR or PDR.
Ports 5, 6, 7, 8, and A are also used as liquid crystal display segment and common pins, selectable
in 4-bit units.
Block diagrams of each port are given in Appendix C, I/O Port Block Diagrams.
Table 8.1
Port Functions
Port
Description
Pins
Other Functions
Function
Switching
Registers
Port 3
7-bit I/O port
MOS input pull-up
option
Large-current port
P3
7
/AEVL
P3
6
/AEVH
P3
5,
P3
4,
P3
3
Asynchronous event counter
event inputs AEVL, AEVH
PMR3
P3
2
, TMOFH
P3
1
, TMOFL
P4
3
/
IRQ
0
P4
2
/TXD
32
P4
1
/RXD
32
P4
0
/SCK
32
P5
7
to P5
0
/
WKP
7
to
WKP
0
/
SEG
8
to SEG
1
Timer F output compare
output
PMR3
Port 4
1-bit input port
3-bit I/O port
External interrupt 0
PMR2
SCI3 data output (TXD
32
),
data input (RXD
32
), clock
input/output (SCK
32
)
Wakeup input (
WKP
7
to
WKP
0
), segment output
(SEG
8
to SEG
1
)
SCR3
SMR
Port 5
8-bit I/O port
MOS input pull-up
option
PMR5
LPCR