13
Digi Connect SP Hardware Reference
Programming Considerations
CHAPTER 2
This chapter discusses programming considerations for the Digi Connect SP and Digi Connect Wi-SP
and the NS7520 processor it is based on.
GPIO
General Information
The NS7520 processor supports 16 general purpose I/O (GPIO) pins, some of which are reserved for
specific functions and some of which can be customized. These pins fall into three categories:
Those labeled “Reserved” in the following table are dedicated to a specific use and must
not
be reprogrammed, or the unit may not operate correctly. Often, these pins are not
connected to external interfaces.
Those labeled “Allocated” in the following table are exposed to an external interface and
allocated to a specific use by the software but can be customized safely with code
modifications.
Those labeled “Available” are exposed to an external interface, not controlled directly by
the software, and can be customized.
GPIO Registers
Two registers, named PORTA and PORTC, govern the 16 GPIO pins. Each register is responsible for
eight pins, and each GPIO pin uses the following four bits to completely describe its behavior:
Mode (CMODE)
Direction (CDIR)
Special function (CSF). This is only applicable to PORTC.
Data value
The first three bits describe the functionality of the GPIO pin. The data bit provides the current value
of the pin when read and allows control of the value of an output pin when written.
14
In order to configure a pin as either a GPIO input or GPIO output, the corresponding bit positions in
the appropriate register must be configured according to the information in the following table:
Since each register controls 8 GPIO pins, it is safest to read the full 32 bit register, modify the bits
corresponding to the pin, and then write the full 32 bits back. In this way, the behavior of other
GPIO pins will be preserved.
For more information regarding the format and programming of the GPIO registers, see the NS7520
Hardware Reference.
GPIO Pin Use
GPIO Configuration
Input Output
CMODE = 0
–CDIR = 0
–CSF = 0
–CMODE = 0
–CDIR = 1
CSF = 0
GPIO Pin Use
Register Bit Category
External
Interface
Description
PORTA7 -
PORTA0
Reserved NA NA
PORTC7 Reserved NA NA
PORTC6 Allocated
Connected to the
red LED
Used as a power indicator (always on).
It could be reassigned as a general
purpose LED. It must remain a GPIO
output for the LED to operate correctly.
The LED is lit when the signal is a logic
"high."
PORTC5 Available
Connected to the
reset button.
It should be configured as a GPIO input.
PORTC4 -
PORTC0
Reserved NA NA
15
Digi Connect SP Hardware Reference
LEDs
General information
The device server has two types of LEDs:
LEDs connected directly to GPIO pins on the processor and controlled directly in
software
LEDs connected to other hardware components (normally the Ethernet hardware) and
not directly programmable by the operating system
The development kit supplies software to control the LEDs. This behavior can often be modified by
manipulating the LED table in the BSP code. See gpio.c for details.
As with any GPIO output, the GPIO register must be properly configured in order to assert values
on the pin. The appropriate bits should be configured as:
CMODE = 0
CDIR = 1
CSF=0
About LEDs
The device server has three LEDs:
The green LED is wired directly to the Ethernet hardware and indicates that a link has
been established.
The yellow LED is wired directly to the Ethernet hardware and signals Ethernet activity.
The red LED is software programmable. It is wired to processor GPIO register bit
PORTC6. The LED is wired to be active high. The development kit software is
implemented by default so that this LED reflects "power" (and is, therefore, always lit).
Flash
General Information
Digi Connect SP and Digi Connect Wi-SP device servers each have 4 MB of flash memory, which is
controlled by chip select 0, located at 0x02000000.

DC-ANT-24DT-50

Mfr. #:
Manufacturer:
Digi International
Description:
Antennas 2.4GHz Desktop Ant 2dBi gain NRND
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union