Section 8 I/O Ports
8.1 Overview
The H8/3864 Series is provided with six 8-bit I/O ports, one 4-bit I/O port, one 3-bit I/O port, one 8-
bit input-only port, and one 1-bit input-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 8-bit units.
Block diagrams of each port are given in Appendix C, I/O Port Block Diagrams.
Table 8-1 Port Functions
Function
Switching
Port
Description
Pins
Other Functions
Registers
Port 1
• 8-bit I/O port
P1
7
to P1
5
/
External interrupts 3 to 1
PMR1
• MOS input pull-up
IRQ
3
to
IRQ
1
/
Timer event interrupts
TCRF,
option
TMIF, TMIC
TMIF, TMIC
TMC
P1
4
/
IRQ
4
/
ADTRG
External interrupt 4 and A/D
PMR1, AMR
converter external trigger
P1
3
/TMIG
Timer G input capture input
PMR1
P1
2
, P1
1
/
Timer F output compare
PMR1
TMOFH, TMOFL
output
P1
0
/TMOW
Timer A clock output
PMR1
Port 3
• 8-bit I/O port
P3
7
/AEVL
SCI3-1 data output (TXD
31
), PMR3
• MOS input pull-up
P3
6
/AEVH
data input (RXD
31
), clock
SCR31
option
P3
5
/TXD
31
input/output (SCK
31
), SMR31
• Large-current port
P3
4
/RXD
31
and asynchronous counter
P3
3
/SCK
31
event inputs AEVL, AEVH
P3
2
/
RESO
Reset output, timer C count-
PMR3
P3
1
/UD
up/down select input, and
P3
0
/PWM
14-bit PWM output
Port 4
• 1-bit input port
P4
3
/
IRQ
0
External interrupt 0
PMR3
• 3-bit I/O port
P4
2
/TXD
32
SCI3-2 data output (TXD
32
), SCR32
P4
1
/RXD
32
data input (RXD
32
), clock
SMR32
P4
0
/SCK
32
input/output (SCK
32
)
131