EasyManua.ls Logo

Digi XBee SX 868 - Periodic I;O Sampling; Detect Digital I;O Changes

Digi XBee SX 868
212 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
Loading...
Advanced application features I/O line monitoring
XBee® SX 868 RF Module User Guide
72
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.
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.
Detect digital I/O changes
When the network is setup for synchronous sleep there is an option to randomize a single I/O sample
by setting SO bit 10—enables random I/O samples—and setting IR to zero where the sample will be
randomized over the ST time period. In addition you can use IR in conjunction with SO bit 10 which
will randomize the first I/O sample over the IR time period and thereafter I/O samples will occur on
the IR interval sending x samples or x samples - 1. If the IR interval is greater than the ST time period
then ST time will be used to randomize the I/O sample.
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.
Enabling edge detection forces an immediate sample of all monitored digital I/O lines if any digital I/O
lines change state.
Note Use caution when combining Change Detect sampling with sleep modes. IC only causes a
sample to be generated if the change takes place during a wake period. If the device is sleeping when
the digital input transition occurs, then no change is detected and an I/O sample is not generated.
Use IR in conjunction with IC in this instance, since IR generates an I/O sample upon wakeup and
ensures that the change is properly observed.

Table of Contents

Related product manuals