![Digi XBee DigiMesh 2.4 Скачать руководство пользователя страница 50](http://html1.mh-extra.com/html/digi/xbee-digimesh-2-4/xbee-digimesh-2-4_user-manual_2496252050.webp)
Work with networked devices
Monitor I/O lines
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
50
Example
Sample AT response
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
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
graph shows only
IR
samples, the bottom graph shows a combination of
IR
samples and
IC
(Change
Detect). In the top graph, the humps indicate that the sample was not taken at that exact moment
and needed to wait for the next
IR
sample period.
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.
Содержание XBee DigiMesh 2.4
Страница 1: ...XBee XBee PRO DigiMesh 2 4 Radio Frequency RF Module User Guide...
Страница 63: ...Sleep modes Synchronization messages XBee XBee PRO DigiMesh 2 4 RF Module User Guide 63...
Страница 105: ...Operate in API mode API mode overview 106 API frames 110 XBee XBee PRO DigiMesh 2 4 RF Module User Guide 105...
Страница 112: ...Operate in API mode API frames XBee XBee PRO DigiMesh 2 4 RF Module User Guide 112...