
Analog and digital I/O lines
I/O sampling
XBee/XBee-PRO® S2C ZigBee® RF Module
147
Bytes
Name
Description
1
Analog Channel Mask Indicates which lines have analog inputs enabled for sampling.
Each bit in the analog channel mask corresponds to one analog
input channel.
bit 0 = AD0/DIO0
bit 1 = AD1/DIO1
bit 2 = AD2/DIO2
bit 3 = AD3/DIO3
bit 7 = Supply Voltage
Variable Sampled Data Set
A sample set consisting of 1 sample for each enabled ADC and/or
DIO channel, which has voltage inputs of 1143.75 and 342.1875
mV.
If any digital I/O lines are enabled, the first two bytes of the data
set indicate the state of all enabled digital I/O. Only digital
channels that are enabled in the Digital Channel Mask bytes have
any meaning in the sample set. If no digital I/O are enabled on the
device, these 2 bytes will be omitted.
Following the digital I/O data (if any), each enabled analog channel
returns 2 bytes. The data starts with AIN0 and continues
sequentially for each enabled analog input channel up to AIN3, and
the supply voltage (if enabled) at the end.
The sampled data set includes 2 bytes of digital I/O data only if one or more I/O lines on the device are
configured as digital I/O. If no pins are configured as digital I/O, these 2 bytes are omitted. Pins are
configured as digital I/O by setting them to a value of 3, 4, or 5.
The digital I/O data is only relevant if the same bit is enabled in the digital I/O mask.
Analog samples are returned as 10-bit values. The device scales the analog reading such that 0x0000
represents 0 V, and 0x3FF = 1.2 V (The analog inputs on the device cannot read more than 1.2 V.). The
device returns analog samples in order starting with AIN0 and finishing with AIN3, and the supply
voltage. Only enabled analog input channels return data.
To convert the A/D reading to mV, do the following:
AD(mV) = (A/D reading * 1200mV) / 1023
The reading in the sample frame represents voltage inputs of 1143.75 and 342.1875 mV for AD0 and
AD1 respectively.
Queried sampling
You can send the
IS
command to a device locally, or to a remote device using the API remote
command frame (for more information, see
). When you send the IS command, the
receiving device samples all enable digital I/O and analog input channels and return an I/O sample. If
you send the
IS
locally, the device sends the I/O sample out the serial port. If the
IS
command was
received as a remote command, the I/O sample is sent over-the-air to the device that sent the
IS
command.
If you issue the
IS
command in command mode, the device returns a carriage return-delimited list
containing the fields listed in
. If you issue the
IS
command in API mode, an API command
response contains the same information.
The following table shows an example of the fields in an
IS
response.
Содержание XBee
Страница 1: ...XBee XBee PRO S2C ZigBee RF Module User Guide ...
Страница 259: ...AT commands Execution commands XBee XBee PRO S2C ZigBee RF Module 259 Parameter range N A Default N A ...
Страница 289: ...Regulatory information ANATEL Brazil XBee XBee PRO S2C ZigBee RF Module 289 ...
Страница 290: ...Regulatory information ANATEL Brazil XBee XBee PRO S2C ZigBee RF Module 290 ...
Страница 303: ...Load ZigBee firmware on 802 15 4 devices Background 304 Load ZB firmware 305 XBee XBee PRO S2C ZigBee RF Module 303 ...