55
ARK-5420 User Manual
Chapter 6
G
PIO Programming
Below is the diagram of PCA9554 register:
The command byte is the first byte to follow the address byte during a write transmis-
sion. It is used as a pointer to determine which of the following registers will be writ-
ten or read.
PCA9554 has in all 4 registers to control GPIO.
Register 0 - Input Port register
This register is a read-only port. It reflects the incoming logic levels of the pins, regard-
less of whether the pin is defined as an input or an output by Register 3. Writes to this
register have no effect.
The default ‘X’ is determined by the externally applied logic level, normally ‘1’ when
no external signal externally applied because of the internal pull-up resistors.
If one GPIO Pin is set to Input, you can read input value from the bit that register 0
corresponds to.
Register 1 - Output Port register
This register reflects the outgoing logic levels of the pins defined as outputs by Regis-
ter 3. Bit values in this register have no effect on pins defined as inputs. Reads from
this register return the value that is in the flip-flop controlling the output selection,
not
the actual pin value.
Table 6.2: Command Byte
Command
Protocol
Function
0
read byte
Input Port register
1
read/write byte
Output Port register
2
read/write byte
Polarity Inversion register
3
read/write byte
Configuration register
Table 6.3: Register 0 - Input Port Register Bit Description
Bit
Symbol
Access
Value
Description
7
I7
read only
X
determined by externally applied logic level
6
I6
read only
X
5
I5
read only
X
4
I4
read only
X
3
I3
read only
X
2
I2
read only
X
1
I1
read only
X
0
I0
read only
X
Table 6.4: Register 1 - Output Port Register Bit Description
Bit
Symbol
Access
Value
Description
7
O7
R
1*
reflects outgoing logic levels of pins defined as outputs by
Register 3
6
O6
R
1*
5
O5
R
1*
4
O4
R
1*
3
O3
R
1*
2
O2
R
1*
1
O1
R
1*
0
O0
R
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 ...