English
Language : 

M38203M4 Datasheet, PDF (137/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.3 Timer X and timer Y
(1) Port P5 direction register (P5D)
The port P5 direction register (address 000B16) selects the I/O direction of port P5. Figure 2.3.11
shows the structure of the port P5 direction register.
The CNTR0 pin is also used as P54, while the CNTR1 pin is also used as P55.
sTimer X
In the pulse output mode, set bit 4 to “1” for the output mode.
In the event counter mode or the pulse width measurement mode, set bit 4 to “0” for the input mode.
sTimer Y
In the period measurement mode or the event counter mode or the pulse width HL continuously
measurement mode, set bit 5 to “0” to set it for the input mode.
Port P5 direction register
b7 b6 b5 b4 b3 b2 b1 b0
Port P5 direction register (P5D) [Address 0B16]
B
Name
Functions
At reset R W
0 Port P5 direction 0 : Port P50 input mode 0 ×
register
1 : Port P50 output mode
1
0 : Port P51 input mode 0 ×
1 : Port P51 output mode
2
0 : Port P52 input mode 0 ×
1 : Port P52 output mode
3
0 : Port P53 input mode 0 ×
1 : Port P53 output mode
4
0 : Port P54 input mode 0 ×
1 : Port P54 output mode
5
0 : Port P55 input mode 0 ×
1 : Port P55 output mode
6
0 : Port P56 input mode 0 ×
1 : Port P56 output mode
7
0 : Port P57 input mode 0 ×
1 : Port P57 output mode
Note : Port P5 direction register cannot be read out.
P57
INT2
P56 P55 P54 P53 P52 P51
TOUT CNTR1 CNTR0 SRDY2 SCLK2 SOUT2
P50
SIN2
Fig. 2.3.11 Structure of port P5 direction register
3820 GROUP USER’S MANUAL
2–51