Port Register - Renesas 7700 FAMILY User Manual

Mitsubishi 16-bit single-chip microcomputer
Table of Contents

Advertisement

INPUT/OUTPUT PINS
3.1 Programmable I/O ports

3.1.2 Port register

Data is input/output to/from externals by writing/reading data to/from the port register. The port register
consists of a port latch which holds the output data and a circuit which reads the pin state. Each bit of the
port register corresponds one for one to each pin of the microcomputer. Figure 3.1.3 shows the structure
of the port Pi (i = 0 to 8) register.
When outputting data from programmable I/O ports set to output mode
By writing data to the corresponding bit of the port register, the data is written into the port latch.
The data is output from the pin according to the contents of the port latch.
By reading the port register of a port set to output mode, the contents of the port latch is read out,
instead of the pin state. Accordingly, the output data is correctly read without being affected by an
external load. (Refer to Figures 3.1.4 and 3.1.5.)
When inputting data from programmable I/O ports set to input mode
The pin which is set to input mode enters the floating state.
By reading the corresponding bit of the port register, the data which is input from the pin can be
read out.
By writing data to the port register of a programmable I/O port set to input mode, the data is only
written into the port latch and is not output to externals. The pin retains floating.
3–4
7751 Group User's Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

7751 series

Table of Contents