
Interfaces and Connectors
EBX-18 Hardware Reference manual
31
COM3/COM4
S
OFTWARE
C
ONFIGURATION
By default, COM3 and COM4 are configured for RS-232 operation. Two registers in the
Vortex86DX2 (0x9A and 0x7A) need to be programmed for COM3 and/or COM4 to operate in
RS-422 or RS-485 mode. Table 17 and Table 18 provide bit-level descriptions of these registers.
To configure COM3 and COM4 for RS-422/485 Mode
1.
Write 0xFF to I/O register 0x9A (sets GPIO-P2[7:0] to outputs)
2.
Write 0x0E to I/O register 0x7A (disables RS-232 mode and enables transceivers)
To reconfigure COM3 and COM4 for RS-232 Mode
1.
Write 0xFF to I/O register 0x9A (sets GPIO-P2[7:0] to outputs)
2.
Write 0x02 to I/O register 0x7A (enables RS-232 mode and enables transceivers)
Table 17: GPIO Port 2 Direction Register – 0x9A
Bit
Description
7
0 = Sets pin 7 to input mode
1 = Sets pin 7 to output mode
6
0 = Sets pin 6 to input mode
1 = Sets pin 6 to output mode
5
0 = Sets pin 5 to input mode
1 = Sets pin 5 to output mode
4
0 = Sets pin 4 to input mode
1 = Sets pin 4 to output mode
3
0 = Sets pin 3 to input mode
1 = Sets pin 3 to output mode
2
0 = Sets pin 2 to input mode
1 = Sets pin 2 to output mode
1
0 = Sets pin 1 to input mode
1 = Sets pin 1 to output mode
0
0 = Sets pin 0 to input mode
1 = Sets pin 0 to output mode
Table 18: GPIO Port 2 Data Register – 0x7A
Bit
Description
7-4
X – Don’t care
3
0 = Sets COM4 to RS-232 mode
1 = Sets COM4 to RS-422/485 mode
2
0 = Sets COM3 to RS-232 mode
1 = Sets COM3 to RS-422/485 mode
1
0 = Disables multi-protocol serial transceivers (COM3 and COM4 only)
1 = Enables multi-protocol serial transceivers (COM3 and COM4 only)
0
0 = Enables RS-232 transceivers (COM1 and COM2 only)
1 = Disables RS-232 transceivers (COM1 and COM2 only)