Rev. 1.00, 05/04, page 107 of 544
7.4 Port
4
Port 4 is an 8-bit I/O port. Port 4 pins also function as TMR_0 and TMR_1 I/O pins, and the IIC_1
I/O pin. The output type of P42 is NMOS push-pull output. The output type of SDA1 is NMOS
open-drain output. Port 4 has the following registers.
•
Port 4 data direction register (P4DDR)
•
Port 4 data register (P4DR)
7.4.1
Port 4 Data Direction Register (P4DDR)
P4DDR specifies input or output for the pins of port 4 on a bit-by-bit basis.
Bit Bit
Name
Initial
Value R/W Description
7 P47DDR
0 W
6 P46DDR
0 W
5 P45DDR
0 W
4 P44DDR
0 W
3 P43DDR
0 W
2 P42DDR
0 W
1 P41DDR
0 W
0 P40DDR
0 W
When a bit in P4DDR is set to 1, the corresponding pin
functions as an output port, and when cleared to 0, as
an input port.
7.4.2
Port 4 Data Register (P4DR)
P4DR stores output data for port 4.
Bit Bit
Name
Initial
Value
R/W Description
7 P47DR
0 R/W
6 P46DR
0 R/W
5 P45DR
0 R/W
4 P44DR
0 R/W
3 P43DR
0 R/W
2 P42DR
0 R/W
1 P41DR
0 R/W
0 P40DR
0 R/W
If a port 4 read is performed while P4DDR bits are set
to 1, the P4DR values are read directly, regardless of
the actual pin states. If a port 4 read is performed while
P4DDR bits are cleared to 0, the pin states are read.
Содержание H8S/2111B
Страница 2: ...Rev 1 00 05 04 page ii of xxxiv...
Страница 8: ...Rev 1 00 05 04 page viii of xxxiv...
Страница 22: ...Rev 1 00 05 04 page xxii of xxxiv...
Страница 30: ...Rev 1 00 05 04 page xxx of xxxiv...
Страница 84: ...Rev 1 00 05 04 page 50 of 544...
Страница 100: ...Rev 1 00 05 04 page 66 of 544...
Страница 126: ...Rev 1 00 05 04 page 92 of 544...
Страница 180: ...Rev 1 00 05 04 page 146 of 544...
Страница 216: ...Rev 1 00 05 04 page 182 of 544...
Страница 254: ...Rev 1 00 05 04 page 220 of 544...
Страница 268: ...Rev 1 00 05 04 page 234 of 544...
Страница 382: ...Rev 1 00 05 04 page 348 of 544...
Страница 462: ...Rev 1 00 05 04 page 428 of 544...
Страница 464: ...Rev 1 00 05 04 page 430 of 544...
Страница 488: ...Rev 1 00 05 04 page 454 of 544...
Страница 496: ...Rev 1 00 05 04 page 462 of 544...
Страница 574: ...Rev 1 00 05 04 page 540 of 544...
Страница 581: ......
Страница 582: ...H8S 2111B Hardware Manual...