XBee®/XBee‐PRO® ZB SMT RF Modules
Queried Sampling
The IS command can be sent to a device locally, or to a remote device using the API remote command frame
(see chapter 8 for details). When the IS command is sent, the receiving device samples all enabled digital IO
and analog input channels and returns an IO sample. If IS is sent locally, the IO sample is sent out the serial
port. If the IS command was received as a remote command, the IO sample is sent over-the-air to the device
that sent the IS command.
If the IS command is issued in command mode, the module returns a carriage return-delimited list containing
the above-listed fields. If the IS command is issued in API mode, an API command response contains the same
information.
The following table shows an example of the fields in an IS response.
Example
Sample AT Response
0x01
[1 sample set]
0x0C0C
0x03
[Digital Inputs: DIO 2, 3, 10, 11 low]
[Analog Inputs: A/D 0, 1]
0x0408
0x03D0
0x0124
[Digital input states: DIO 3, 10 high, DIO 2, 11 low]
[Analog input ADIO 0= 0x3D0]
[Analog input ADIO 1=0x120]
Periodic I/O Sampling
Periodic sampling allows an XBee module to take an I/O sample and transmit it to a remote device at a periodic
rate. The periodic sample rate is set by the IR command. If IR is set to 0, periodic sampling is disabled. For all
other values of IR, data will be sampled after IR milliseconds have elapsed and transmitted to a remote device.
The DH and DL commands determine the destination address of the I/O samples. DH and DL can be set to 0 to
transmit to the coordinator, or to the 64-bit address of the remote device (SH and SL). Only devices running in
API mode can send I/O data samples out their serial port. Devices running in transparent mode will discard
received I/O data samples.
A sleeping end device will transmit periodic IO samples at the IR rate until the ST timer expires and the device
can resume sleeping.
Change Detection Sampling
Modules can be configured to transmit a data sample immediately whenever a monitored digital I/O pin changes
state. The IC command 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 will be transmitted as soon as a state change is
observed in one of the monitored digital IO lines. Change detection samples are transmitted to the 64-bit
address specified by DH and DL.
RSSI PWM
The XBee module features an RSSI/PWM pin (pin 7) that, if enabled, will adjust the PWM output to indicate the
signal strength of the last received packet. The P0 (P-zero) command is used to enable the RSSI pulse width
modulation (PWM) output on the pin. If P0 is set to 1 (and P1 is not set to 1), the RSSI/PWM pin will output a pulse
width modulated signal where the frequency is adjusted based on the received signal strength of the last packet.
Otherwise, for all other P0 settings, the pin can be used for general purpose IO.
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 RSSI of the last packet. The RSSI/PWM output will be enabled for a time based on the RP command. Each
time an RF packet is received, the RSSI/PWM output is adjusted based on the RSSI 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 100ms units and
defaults to a value of 40 (4 seconds).
The RSSI PWM runs at 12MHz and has 2400 total counts (200us period).
RSSI (in dBm) is converted to PWM counts using the following equation:
PWM counts = (41 * RSSI_Unsigned) - 5928
© 2010 Digi International, Inc.
94