Advanced application features I/O line monitoring
XBee®-PRO 900HP/XSC RF Modules
170
Field Name Description
2 Digital
channel
mask
Indicates which digital I/O lines have sampling enabled. Each bit corresponds to
one digital I/O line on the device.
bit 0 = AD0/DIO0
bit 1 = AD1/DIO1
bit 2 = AD2/DIO2
bit 3 = AD3/DIO3
bit 4 = DIO4
bit 5 = ASSOC/DIO5
bit 6 = RTS/DIO6
bit 7 = CTS/GPIO7
bit 8 = DTR / SLEEP_RQ / DIO8
bit 9 = ON_SLEEP / DIO9
bit 10 = RSSI/DIO10
bit 11 = PWM/DIO11
bit 12 = CD/DIO12
For example, a digital channel mask of 0x002F means DIO0,1,2,3, and 5 are
enabled as digital I/O.
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 4 = AD4/DIO4
bit 5 = ASSOC/AD5/DIO5
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.
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]