Section 5. I/O Ports
5.1 Overview
The H8/329 Series has seven parallel I/O ports, including:
•
Five 8-bit input/output ports—ports 1, 2, 3, 4, and 6
•
One 8-bit input port—port 7
•
One 3-bit input/output port—port 5
Ports 1, 2, and 3 have programmable input pull-up transistors. Ports 1 to 6 can drive a Darlington
pair. Ports 1 to 4, and 6 can drive one TTL load and a 90pF capacitive load. Port 5 can drive one
TTL load and a 30pF capacitive load. Ports 1 and 2 can drive LEDs (10mA current sink).
Input and output are memory-mapped. The CPU views each port as a data register (DR) located in
the register field at the high end of the address space. Each port (except port 7) also has a data
direction register (DDR) which determines which pins are used for input and which for output.
Output: To send data to an output port, the CPU selects output in the data direction register and
writes the desired data in the data register, causing the data to be held in a latch. The latch output
drives the pin through a buffer amplifier. If the CPU reads the data register of an output port, it
obtains the data held in the latch rather than the actual level of the pin.
Input: To read data from an I/O port, the CPU selects input in the data direction register and reads
the data register. This causes the input logic level at the pin to be placed directly on the internal
data bus. There is no intervening input latch.
The data direction registers are write-only registers; their contents are invisible to the CPU. If the
CPU reads a data direction register all bits are read as “1,” regardless of their true values. Care is
required if bit manipulation instructions are used to set and clear the data direction bits. See the
note on bit manipulation instructions in section 3.5.5, “Bit Manipulations.”
Auxiliary Functions: In addition to their general-purpose input/output functions, all of the I/O
ports have auxiliary functions. Most of the auxiliary functions are software-selectable and must be
enabled by setting bits in control registers. When selected, an auxiliary function usually replaces
the general-purpose input/output function, but in some cases both functions can operate
simultaneously. Table 5-1 summarizes the functions of the ports.
75
Summary of Contents for H8/326 Series
Page 67: ...58 ...
Page 121: ...112 ...
Page 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Page 279: ...270 ...