Section 8 I/O Ports
8.1
Overview
The H8/3887 Series is provided with eight 8-bit I/O ports, one 4-bit I/O port, one 3-bit I/O port,
one 8-bit input-only port, one 4-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, 9, 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
P17 to P15/IRQ3 to External interrupts 3 to 1
IRQ1/TMIF, TMIC Timer event interrupts
TMIF, TMIC
PMR1
TCRF,
TMC
•
MOS input pull-up option
P14/IRQ4/ADTRG External interrupt 4 and A/D
PMR1,
AMR
converter external trigger
P13/TMIG
Timer G input capture input
PMR1
P12, P11/
Timer F output compare output PMR1
TMOFH, TMOFL
P10/TMOW
Timer A clock output PMR1
Port 2 • 8-bit I/O port
P20/SCK1
P21/SI1
Open-drain output option
SCI1 data output (SO1), data PMR2
input (SI1), clock input/output
(SCK1)
•
•
P22/SO1
Large-current port
P27 to P23
None
130