Section 8 I/O Ports
Rev. 3.00 Mar. 14, 2006 Page 212 of 804
REJ09B0104-0300
8.1.1
Data Direction Register (PnDDR) (n = 1 to 3, 6, A, D, H, J, and K)
DDR is an 8-bit write-only register that specifies the port input or output for each bit. A read from
the DDR is invalid and DDR is always read as an undefined value.
When the general I/O port function is selected, the corresponding pin functions as an output port
by setting the corresponding DDR bit to 1; the corresponding pin functions as an input port by
clearing the corresponding DDR bit to 0.
Note: The lower four bits are valid and the upper four bits are reserved for port 2 data direction register (P2DDR).
The lower seven bits are valid and the upper one bit is reserved for port 6 data direction register (P6DDR).
The upper seven bits are valid and the lower one bit is reserved for port A data direction register (PADDR).
7
Pn7DDR
0
W
6
Pn6DDR
0
W
5
Pn5DDR
0
W
4
Pn4DDR
0
W
3
Pn3DDR
0
W
0
Pn0DDR
0
W
2
Pn2DDR
0
W
1
Pn1DDR
0
W
Bit
Bit Name
Initial Value
R/W
8.1.2
Data Register (PnDR) (n = 1 to 3, 6, A, D, H, J, and K)
DR is an 8-bit readable/writable register that stores the output data of the pins to be used as the
general output port.
The initial value of DR is H'00.
Note: The lower four bits are valid and the upper four bits are reserved for port 2 data register (P2DR).
The lower seven bits are valid and the upper one bit is reserved for port 6 data register (P6DR).
The upper seven bits are valid and the lower one bit is reserved for port A data register (PADR).
7
Pn7DR
0
R/W
6
Pn6DR
0
R/W
5
Pn5DR
0
R/W
4
Pn4DR
0
R/W
3
Pn3DR
0
R/W
0
Pn0DR
0
R/W
2
Pn2DR
0
R/W
1
Pn1DR
0
R/W
Bit
Bit Name
Initial Value
R/W
electronic components distributor
Содержание H8SX series
Страница 2: ...Rev 3 00 Mar 14 2006 Page ii of xxxviii Downloaded from Elcodis com electronic components distributor...
Страница 22: ...Rev 3 00 Mar 14 2006 Page xxii of xxxviii Downloaded from Elcodis com electronic components distributor...
Страница 32: ...Rev 3 00 Mar 14 2006 Page xxxii of xxxviii Downloaded from Elcodis com electronic components distributor...
Страница 38: ...Rev 3 00 Mar 14 2006 Page xxxviii of xxxviii Downloaded from Elcodis com electronic components distributor...
Страница 845: ...Downloaded from Elcodis com electronic components distributor...
Страница 846: ...H8SX 1520 Group Hardware Manual Downloaded from Elcodis com electronic components distributor...