174
CHAPTER 10 I/O PORTS
10.2.2
Data Direction Register
When a pin is used as a port, the corresponding pin is controlled as described below:
0: Input mode
1: Output mode
■
Data Direction Register
Figure 10.2-3 shows the data direction registers.
Figure 10.2-3 Data Direction Registers
■
Reading the Data Direction Register
The Data Direction Register can be read independently from the status of the corresponding resource.
However, the value of the DDR influences the result of a read access on the Port Data Register.
DDR0
7
bit
6
5
4
3
2
1
0
Initial value
Access
Address: 000010
H
D07
D06
D05
D04
D03
D02
D01
D00
00000000
B
R/W
DDR1
Address: 000011
H
D17
D16
D15
D14
D13
D12
D11
D10
00000000
B
R/W
DDR2
7
6
5
4
3
2
1
0
Address: 000012
H
D27
D26
D25
D24
D23
D22
D21
D20
00000000
B
R/W
DDR3
Address: 000013
H
D37
D36
D35
D34
D33
D32
D31
D30
00000000
B
R/W
DDR4
7
6
5
4
3
2
1
0
Address: 000014
H
D47
D46
D45
D44
D43
D42
D41
D40
00000000
B
R/W
DDR5
Address: 000015
H
D57
D56
D55
D54
D53
D52
D51
D50
00000000
B
R/W
DDR6
7
6
5
4
3
2
1
0
Address: 000016
H
D67
D66
D65
D64
D65
D62
D61
D60
00000000
B
R/W
DDR7
Address: 000017
H
D77
D76
D75
D74
D73
D72
D71
D70
00000000
B
R/W
DDR8
7
6
5
4
3
2
1
0
Address: 000018
H
D87
D86
D85
D84
D83
D82
D81
D80
00000000
B
R/W
DDR9
Address: 000019
H
D97
D96
D95
D94
D93
D92
D91
D90
00000000
B
R/W
DDRA
7
6
5
4
3
2
1
0
Address: 00001A
H
DA7
DA6
DA5
DA4
DA3
DA2
DA1
DA0
00000000
B
R/W
DDRB
Address: 00001B
H
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
00000000
B
R/W
15
14
13
12
11
10
9
8
15
14
13
12
11
10
9
8
15
14
13
12
11
10
9
8
15
14
13
12
11
10
9
8
15
14
13
12
11
10
9
8
15
14
13
12
11
10
9
8
Summary of Contents for MB90390 Series
Page 2: ......
Page 4: ......
Page 17: ...xiii APPENDIX D List of Interrupt Vectors 690 INDEX 695 ...
Page 18: ...xiv ...
Page 132: ...104 CHAPTER 5 CLOCKS ...
Page 152: ...124 CHAPTER 6 CLOCK MODULATOR ...
Page 210: ...182 CHAPTER 11 TIME BASE TIMER ...
Page 218: ...190 CHAPTER 12 WATCHDOG TIMER ...
Page 264: ...236 CHAPTER 14 16 BIT RELOAD TIMER WITH EVENT COUNT FUNCTION ...
Page 274: ...246 CHAPTER 15 WATCH TIMER ...
Page 306: ...278 CHAPTER 17 DTP EXTERNAL INTERRUPTS ...
Page 338: ...310 CHAPTER 18 8 10 BIT A D CONVERTER ...
Page 364: ...336 CHAPTER 19 UART0 UART1 ...
Page 398: ...370 CHAPTER 20 UART2 UART3 Figure 20 5 2 ORE Set Timing Receive data RDRF ORE ...
Page 432: ...404 CHAPTER 20 UART2 UART3 ...
Page 482: ...454 CHAPTER 22 SERIAL I O ...
Page 560: ...532 CHAPTER 24 STEPPING MOTOR CONTROLLER ...
Page 582: ...554 CHAPTER 27 ROM MIRRORING MODULE ...
Page 632: ...604 CHAPTER 29 EXAMPLES OF SERIAL PROGRAMMING CONNECTION ...
Page 722: ...694 APPENDIX ...
Page 723: ...695 INDEX The index follows on the next page This is listed in alphabetic order ...
Page 740: ......