m37905 Renesas Electronics Corporation., m37905 Datasheet - Page 77

no-image

m37905

Manufacturer Part Number
m37905
Description
Mitsubishi 16-bit Single-chip Microcomputer 7700 Family / 7900 Series
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
m37905F8CSP
Manufacturer:
MIT
Quantity:
20 000
INPUT/OUTPUT PINS
5.2 Programmable I/O ports
Fig. 5.2.3 Structure of port Pi (i = 1, 2, 4 to 8) register
5-4
5.2.2 Port register
Data is input from or output to the external by writing/reading data to/from a port register. A port register
consists of a port latch which holds the output data and a circuit which reads the pin state. One bit of the
port register corresponds to one pin of the microcomputer. (This is the one-to-one relationship.) Figure
5.2.3 shows the structure of the port Pi (i = 1, 2, 4 to 8) register.
When outputting data from programmable I/O port which has been set to output mode
By reading the port register of a port which has been set to the output mode, the contents of the port
latch is read out, instead of the pin state. Accordingly, the output data can be correctly read out without
being affected by an external load, etc. (See “Figures 5.2.4 and 5.2.5.”)
When inputting data from programmable I/O port which has been set to input mode
By writing data to a port register of a programmable I/O port which has been set to the input mode,
the data is written only into the port latch and is not output to the external (Note). This pin remains
floating state.
Port Pi register (i = 1, 2, 4 to 8)
(Addresses 3
Notes 1: Nothing is assigned for bits 0 and 4 of the port P5 register. These bits are undefined at reading.
Note: When executing a read-modify-write instruction to a port register of a programmable I/O port
A pin which has been set to the input mode enters the floating state.
By reading the corresponding bit of the port register, the data which has been input from the pin can
be read out.
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.
Bit
0
1
2
3
4
5
6
7
2: Nothing is assigned for bits 4 to 7 of the port P8 register. These bits are undefined at reading.
which has been set to the input mode, the instruction will be executed to the data which has
been input from the pin and the result will be written into the port register.
Port pin Pi
Port pin Pi
Port pin Pi
Port pin Pi
Port pin Pi
Port pin Pi
Port pin Pi
Port pin Pi
16
, 6
16
, A
0
1
2
3
4
5
6
7
Bit name
16,
B
16
, E
16
, F
16
, 12
16
7905 Group User’s Manual Rev.1.0
)
Data is input from or output to a pin by reading from
or writing to the corresponding bit.
0 : “L” level
1 : “H” level
Funtion
b7 b6 b5 b4 b3 b2 b1 b0
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
At reset
R/W
RW
RW
RW
RW
RW
RW
RW
RW

Related parts for m37905