I/O support
Change detection sampling
XBee Wi-Fi RF Module User Guide
74
When
DL
points to a network client, the I/O sample is sent to that network client. See
for the format of I/O samples sent to a network client.
IR
can be used with sleep. A device transmits periodic I/O samples at the
IR
rate until the device
resumes sleeping. Even if the
IR
rate is set longer than the
ST
defined wake time, at least one I/O
sample is still sent before the device returns to sleep because it sends one immediately upon wake
up. If it is not desired that a sample is sent every wake cycle,
can be used
to configure how many wake cycles should elapse before sending I/O samples at the
IR
rate.
Change detection sampling
Devices can be configured to transmit a data sample immediately whenever a monitored digital I/O
pin changes state. Change detect sampling cannot be triggered by an enabled analog input.
is a bitmask that can be used to set which digital I/O lines should be monitored for
a state change. If one or more bits in
IC
is set, an I/O sample is transmitted as soon as a state change
is observed in one of the monitored digital IO lines. Change detection samples are transmitted to the
IPv4 address specified by
, to Remote Manager, or to both, depending on the
setting of
. Viewing I/O samples on the remote device or Remote Manager is the
same for change detect sampling as it is for periodic sampling.
Example
Configure the following I/O settings on the XBee Wi-Fi RF Module:
1. To configure DIO1/AD1 as a digital input, issue
with a parameter
of 3 (
ATD13
).
2. To enable pull-up resistors on the same pin, issue
with bit 3 set (for
example
ATPR8
,
ATPR1FFF
, and so forth).
3. To configure DIO2/AD2 as an analog input, issue
with a parameter
of 2 to enable the analog input (
ATD22
).
4. To configure DIO4 as a digital output, driving high, issue
with a
parameter value of 5 (
ATD45
).
5. After issuing these commands, apply the changes so the device's I/O pins update to the new
states. Issue
or
to apply the changes.
RSSI PWM
The XBee Wi-Fi RF Module features an RSSI/PWM pin (DIO10) that, if enabled, adjusts the PWM output
to indicate the signal strength of the last received packet. Use
to enable the
RSSI pulse width modulation (PWM) output on the pin. If
P0
is set to 1, the RSSI/PWM pin outputs a
PWM signal where the frequency is adjusted based on the received signal strength of the last packet.
When a data packet is received, if
P0
is set to enable the RSSI/PWM feature, the RSSI PWM output is
adjusted based on the link margin of the last packet. The RSSI/PWM output is enabled for a time
based on
. Each time an RF packet is received, the RSSI/PWM output is adjusted
based on the link margin of the new packet, and the RSSI timer is reset. If the RSSI timer expires, the
RSSI/PWM pin is driven low.
RP
is measured in 100 ms units and defaults to a value of 40 (4 seconds).
If running on the XBIB development board, DIO10 is connected to the RSSI LEDs, which may be
interpreted as follows: