Digi Connect SP Hardware Reference Manual page 20

Hide thumbs Also See for Connect SP:
Table of Contents

Advertisement

G P I O
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:
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.
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.
2 0
Mode (CMODE)
Direction (CDIR)
Special function (CSF). This is only applicable to PORTC.
Data value
Input
CMODE = 0
CDIR = 0
CSF = 0
D i g i C o n n e c t S P H a r d w a r e R e f e r e n c e
GPIO Configuration
Output
CMODE = 0
CDIR = 1
CSF = 0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Connect wi-sp

Table of Contents