ARK-5420 User Manual
56
If one GPIO Pin is set to Output, you can read input value from the bit that register 1
corresponds to.
Register 2 - Polarity Inversion register
This register allows the user to invert the polarity of the Input Port register data. If a
bit in this register is set (written with ‘1’), the corresponding Input Port data is inverted.
If a bit in this register is cleared (written with a ‘0’), the Input Port data polarity is
retained.
If one GPIO Pin is set to Input, you can control the polarity of input pin from the bit
that register 2 corresponds to.
Register 3 - Configuration register
This register configures the directions of the I/O pins. If a bit in this register is set, the
corresponding port pin is enabled as an input with high-impedance output driver. If a
bit in this register is cleared, the corresponding port pin is enabled as an output. At
reset, the I/Os are configured as inputs with a weak pull-up to VDD.
Register 3 is used to set each GPIO as Input or Output:
If the bit is ‘0’, the corresponding GPIO pin is set as Output; If the bit is ‘1’, the corre-
sponding GPIO pin is set as Input.
Table 6.5: Register 2 - Polarity Inversion Register Bit Description
Bit
Symbol
Access
Value
Description
7
N7
R/W
0*
inverts polarity of Input Port register data
6
N6
R/W
0*
0 = Input Port register data retained (default value)
5
N5
R/W
0*
1 = Input Port register data inverted
4
N4
R/W
0*
3
N3
R/W
0*
2
N2
R/W
0*
1
N1
R/W
0*
0
N2
R/W
0*
Table 6.6: Register 3 - Configuration Register Bit Description
Bit
Symbol
Access
Value
Description
7
C7
R/W
1*
configures the directions of the I/O pins
6
C6
R/W
1*
0 = corresponding port pin enabled as an output
5
C5
R/W
1*
1 = corresponding port pin configured as input
4
C4
R/W
1*
3
C3
R/W
1*
2
C2
R/W
1*
1
C1
R/W
1*
1
C0
R/W
1*
Содержание ARK-5420 Series
Страница 8: ...ARK 5420 User Manual viii ...
Страница 12: ...ARK 5420 User Manual xii ...
Страница 18: ...ARK 5420 User Manual 6 ...
Страница 19: ...Chapter 2 2 Hardware installation Sections include Introduction Jumpers and Connectors I O Connectors ...
Страница 35: ...Chapter 4 4 BIOS Setting ...
Страница 64: ...ARK 5420 User Manual 52 ...
Страница 65: ...Chapter 6 6 GPIO Programming This chapter introduces GPIO pro gramming Guide ...
Страница 74: ...ARK 5420 User Manual 62 ...
Страница 75: ...Appendix A A Programming the Watchdog Timer ...
Страница 79: ...67 ARK 5420 User Manual Appendix A Programming the Watchdog Timer ...