Programming considerations
Since each register controls 8 GPIO lines, it is safest to read the full 32 bit register, modify the bits
corresponding to the GPIO line of interest, and then write the full 32 bits back. In this way, the
behavior of the other GPIO lines will be preserved.
For more information regarding the format and programming of the GPIO registers, see the NS7520
Hardware Reference.
GPIO pin use
Register
Name
bit
TXD/
PORTA7
GPIO-6
DTR/
PORTA6
GPIO-5
See the
PORTA5,
PORTA4
description
RXD/
PORTA3
GPIO-7
DSR/
PORTA2
GPIO-3
CTS/
PORTA1
GPIO-2
Digi Connect EM and Digi Connect Wi-EM Hardware Reference
Configuring a GPIO pin for input and output
Input
CMODE = 0
n
CDIR = 0
n
CSF = 0
n
GPIO pin use
External
Category
interface
Allocated Pin 4 on
the main
header
Allocated Pin 6 on
the main
header
Allocated Pin 5 on
the main
header
Allocated Pin 3 on
the main
header
Allocated Pin 9 on
the main
header
Allocated Pin 7 on
the main
header
Output
CMODE = 0
n
CDIR = 1
n
CSF = 0
n
Description
Used for port 1 serial transmit but can be
reassigned as GPIO input or output. If used with the
development board, this pin maps to GPIO-6.
Used for the port 1 serial DTR signal but can be
reassigned as GPIO input or output. If used with the
development board, this pin maps to GPIO-5.
Since these two processor pins map to the same
header pin, one must be configured as an input to
avoid contention. Under normal serial conditions,
PORTA5 is configured to deliver the port 1 RTS
signal and PORTA4 for GPIO input. To use the port
for SPI, configure PORTA5 for GPIO input and
PORTA4 to deliver SPI clock.
When used with the development board, header pin
5 maps to GPIO-4.
Used for port 1 serial receive but can be reassigned
as GPIO input or output. If used with the
development board, this pin maps to GPIO-7.
Used for the port1 serial DSR signal but can be
reassigned as GPIO input or output. If used with the
development board, this pin maps to GPIO-3.
Used for the port 1 serial CTS signal but can be
reassigned as GPIO input or output. If used with the
development board, this pin maps to GPIO-2.
GPIO
31
Need help?
Do you have a question about the Digi Connect EM DC-EM02T-JT and is the answer not in the manual?
Questions and answers