EasyManuals Logo

Digi XBee SX User Manual

Digi XBee SX
206 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #166 background imageLoading...
Page #166 background image
Monitor I/O lines Periodic I/O sampling
XBee®/XBee-PRO SX RF Module User Guide
166
Field Name Description
Variable Sampled
data set
If you enable any digital I/O lines, the first two bytes of the data set indicate
the state of all enabled digital I/O.
Only digital channels that you enable in the Digital channel mask bytes have
any meaning in the sample set. If do not enable any digital I/O on the device, it
omits these two bytes.
Following the digital I/O data (if there is any), each enabled analog channel
returns two bytes. The data starts with AIN0 and continues sequentially for
each enabled analog input channel up to AIN5.
If you issue the IS command using a a local or remote AT Command API frame, then the device returns
an AT Command Response (0x88) frame with the I/O data included in the command data portion of
the packet.
Example Sample AT response
0x01 [1 sample set]
0x0C0C [Digital Inputs: DIO 2, 3, 10, 11 enabled]
0x03 [Analog Inputs: A/D 0, 1 enabled]
0x0408 [Digital input states: DIO 3, 10 high, DIO 2, 11 low]
0x03D0 [Analog input: ADIO 0 = 0x3D0]
0x0124 [Analog input: ADIO 1 =0x120]
Periodic I/O sampling
Periodic sampling allows a device to take an I/O sample and transmit it to a remote device at a
periodic rate. Use the IR command to set the periodic sample rate.
n To disable periodic sampling, set IR to 0.
n For all other IR values, the firmware samples data when IR milliseconds elapse and the sample
data transmits to a remote device.
The DH and DL commands determine the destination address of the I/O samples.
Only devices with API operating mode enabled send I/O data samples out their serial interface.
Devices that are in Transparent mode (AP = 0) discard the I/O data samples they receive. You must
configure at least one pin as a digital or ADC input to generate sample data.
A device with sleep enabled transmits periodic I/O samples at the IR rate until the ST time expires and
the device can resume sleeping. For more information about setting sleep modes, see Sleep modes.
Detect digital I/O changes
You can configure devices to transmit a data sample immediately whenever a monitored digital I/O
pin changes state. The IC command is a bitmask that you use to set which digital I/O lines to monitor
for a state change. If you set one or more bits in IC, the device transmits an I/O sample as soon it
observes a state change in one of the monitored digital I/O lines using edge detection.
The figure below shows how I/O change detection can work with periodic sampling. In the figure, the
gray dashed lines with a dot on top represent samples taken from the monitored DIO line. The top

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Digi XBee SX and is the answer not in the manual?

Digi XBee SX Specifications

General IconGeneral
BrandDigi
ModelXBee SX
CategoryControl Unit
LanguageEnglish

Related product manuals