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.