User Manual

Jennic
JennicJennic
Jennic
© Jennic 2008 JN-DS-JN5139 v1.5 29
9 Digital Input/Output
There are 21 Digital I/O (DIO) pins, which can be configured as either an input or an output, and each has a
selectable internal pull-up resistor. Most DIO pins are multiplexed with alternate peripheral features of the device.
Once a peripheral is enabled it takes precedence over the device pins. Refer to the individual module sections for a
full description of the alternate peripherals functions. Following a reset (and whilst the reset input is held low), all
peripherals are off and the DIO pins are configured as inputs with the internals pull-ups turned on.
SPI Port
UART 0
UART 1
Counter/Timer 0
Counter/Timer 1
MUX
RFTX
Chip
Pins
2-Wire Serial
Interface
GPIO
Data / Direction
Registers
DIO<20:0>
DIO<20:0>
SPISEL<4:0>
Processor Bus
(Address, Data, Interrupts)
SPICLK, MOSI, MISO
SPISEL<0>
TxD
CTS
RxD
RTS
TxD
CTS
RxD
RTS
TIM0CK_GT
TIM0CAP
TIM0OUT
TIM1CK_GT
TIM1CAP
TIM1OUT
SIF_CLK
SIF_D
RFTX
Intelligent
Peripheral
IP_CLK
IP_SEL
IP_DI
IP_DO
IP_INT
Figure 21: DIO Block Diagram
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, R
PU
, can also be enabled or disabled as needed. These are generally configured
once after reset depending on the external components and functionality. The setting is held through sleep cycles.
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. The interrupt transition edges can
be configured, and interrupts can be enabled and/or masked. Equally the status of the interrupt may be read. See
section 16 Power Management and Sleep Modes for further details on sleep and wakeup.
Where a pin is configured for output but is read as an input, then the output pin state will be read back.