English
Language : 

JN516X Datasheet, PDF (32/94 Pages) NXP Semiconductors – IEEE802.15.4 Wireless Microcontroller
9 Digital Input/Output
There are 20 Digital I/O (DIO) pins which when used as general-purpose pins can be configured as either an input or
an output, with each having a selectable internal pull-up resistor. In addition, there are 2 Digital Output (DO) pins.
Most DIO pins are shared with the digital and analogue peripherals of the device. When a peripheral is enabled, it
takes control over the device pins allocated to it. However, note that most peripherals have 2 alternative pin
allocations to alleviate clashes between uses, and many peripherals can disable the use of specific pins if not
required. Refer to Section 2.1 and the individual peripheral descriptions for full details of the available pinout
arrangements.
Following a reset (and whilst the RESETN input is held low), all peripherals are forced off and the DIO pins are
configured as inputs with the internal pull-ups turned on.When a peripheral is not enabled, the DIO pins associated
with it can be used as digital inputs or outputs. Each pin can be controlled individually by setting the direction and
then reading or writing to the pin.
The individual pull-up resistors, RPU, can also be enabled or disabled as needed and the setting is held through sleep
cycles. The pull-ups are generally configured once after reset depending on the external components and
functionality. For instance, outputs should generally have the pull-ups disabled. An input that is always driven should
also have the pull-up disabled.
When configured as an input each pin can be used to generate an interrupt upon a change of state (selectable
transition either from low to high or high to low); the interrupt can be enabled or disabled. When the device is
sleeping, these interrupts become events that can be used to wake the device up. Equally the status of the interrupt
may be read. See Section 18 for further details on sleep and wakeup.
The state of all DIO pins can be read, irrespective of whether the DIO is configured as an input or an output.
Throughout a sleep cycle the direction of the DIO, and the state of the outputs, is held. This is based on the resultant
of the GPIO Data/Direction registers and the effect of any enabled peripherals at the point of entering sleep.
Following a wake-up these directions and output values are maintained under control of the GPIO data/direction
registers. Any peripherals enabled before the sleep cycle are not automatically re-enabled, this must be done through
software after the wake-up.
For example, if DIO0 is configured to be SPISEL1 then it becomes an output. The output value is controlled by the
SPI functional block. If the device then enters a sleep cycle, the DIO will remain an output and hold the value being
output when entering sleep. After wake-up the DIO will still be an output with the same value but controlled from the
GPIO Data/Direction registers. It can be altered with the software functions that adjust the DIO, or the application may
re-configure it to be SPISEL1.
Unused DIO pins are recommended to be set as inputs with the pull-up enabled.
Two DIO pins can optionally be used to provide control signals for RF circuitry (e.g. switches and PA) in high power
range extenders.
DIO3/RFTX is asserted when the radio is in the transmit state and similarly, DIO2/RFRX is asserted when the radio is
in the receiver state.
32
JN-DS-JN516x v1.1 Production
© NXP Laboratories UK 2013