
MB90470 Series
32
(2) Port Direction Registers
When a pin is functioning as a port, the corresponding pin control setting is as follows :
0 : Input mode
1 : Output mode The register value is “0” at reset.
Port 76, 77
These ports do not have DDR registers. Data at these pins is always valid, so that when P76, P77 are used
as I
2
C pins the PDR value should be “1”. (The I
2
C functions should be stopped, when these pins are used as
P76,P77 .)
These ports have open drain configuration. If they are used as input ports, the output transistor is turned off,
so that the output data register must be set to “1” and pull-up resistance applied.
Note : If these registers are accessed using read-modify-write instructions (such as bit set instructions) ,the bit that
is the object of the instruction will be set to the specified value but for other bits the value of the corresponding
output register will be rewritten to the input value of the pin at that time. For this reason when a pin used for
input is switched to output, first write the desired value to the PDR register, then set the DDR register to
switch the pin direction.
DDR0
Address : 000010
H
Default value
00000000
Access
R/W
DDR1
Address : 000011
H
00000000
R/W
DDR2
Address : 000012
H
00000000
R/W
DDR3
Address : 000013
H
00000000
R/W
DDR4
Address : 000014
H
00000000
R/W
DDR5
Address : 000015
H
00000000
R/W
DDR6
Address : 000016
H
00000000
R/W
DDR7
Address : 000017
H
00000000
R/W
DDR8
Address : 000018
H
00000000
R/W
DDR9
Address : 000019
H
00000000
R/W
DDRA
Address : 00001A
H
- - - - 0000
R/W
7
6
5
4
3
2
1
0
D06
D07
D05
D04
D03
D02
D01
D 00
7
6
5
4
3
2
1
0
D16
D17
D15
D14
D13
D12
D11
D10
7
6
5
4
3
2
1
0
D26
D27
D25
D24
D23
D22
D21
D20
7
6
5
4
3
2
1
0
D36
D37
D35
D34
D33
D32
D31
D30
7
6
5
4
3
2
1
0
D46
D47
D45
D44
D43
D42
D41
D40
7
6
5
4
3
2
1
0
D56
D57
D55
D54
D53
D52
D51
D50
7
6
5
4
3
2
1
0
D66
D67
D65
D64
D63
D62
D61
D60
7
6
5
4
3
2
1
0
D75
D74
D73
D72
D71
D70
7
6
5
4
3
2
1
0
D86
D87
D85
D84
D83
D82
D81
D80
7
6
5
4
3
2
1
0
D96
D97
D95
D94
D93
D92
D91
D90
7
6
5
4
3
2
1
0
DA3
DA2
DA1
DA0