EasyManuals Logo
Home>Digi>Control Unit>XBee

Digi XBee Manual

Digi XBee
121 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 #54 background imageLoading...
Page #54 background image
XBee® Wi-Fi RF Modules
© 2013 Digi International, Inc. 54
bit 8 = DIO8
bit 9 = DIO9
bit 10 = DIO10
bit 11 = DIO11
bit 12 = DIO12
For example, a digital channel mask of 0x002F means DIO0 1, 2, 3, and
5 are enabled as digital IO.
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
• bit 1 = AD1
• bit 2 = AD2
• bit 3 = AD3
Variable Sampled Data Set
If any digital IO lines are enabled, the first two bytes of the data set
indicate the state of all enabled digital IO. Only digital channels that
are enabled in the Digital Channel Mask bytes have any meaning in the
sample set. If no digital IO is enabled on the module, these 2 bytes will
be omitted.
Following the digital IO data (if any), each enabled analog channel will
return 2 bytes. The data starts with AD0 and continues sequentially for
each enabled analog input channel up to AD3.
The sampled data set will include 2 bytes of digital I/O data only if one or more I/O lines
on the module are configured as digital I/O. If no pins are configured as digital I/O, these
2 bytes will be omitted.
The digital I/O data is only relevant if the same bit is enabled in the digital I/O mask.
Analog samples are 10 bit values and aligned on a 16 bit boundary. The analog reading is
scaled such that 0x0000 represents 0V, and 0x3FF = VREF. VREF may be either 1.25
volts or 2.5 volts based on the setting of the AV command, where 2.5 volts is the
default. The analog inputs on the module are capped at 0x3FF. Analog samples are
returned in order starting with AD0 and finishing with AD3. Only enabled analog input
channels return data as shown in the example below.
To convert the A/D reading to mV, do the following:
AD (mV) = (A/D reading (converted to decimal) * VREF) / 1023 where VREF may be 1250 or 2500
Assuming that AV is set to the default value, the reading in the sample frame represents
voltage inputs of 2385.14 mV (0x3D0) and 713.59 mV (0x124) for AD0 and AD1
respectively.
Queried Sampling
The IS command can be sent to a module locally, or to a remote module using the API
remote command frame (see chapter 8 for details). When the IS command is sent and at
least one I/O line is enabled as an input or an output, the receiving device samples all
enabled digital I/O and analog input channels and returns an I/O sample. When no I/O
line is enabled, IS will return nothing. If IS is sent locally, the I/O sample is sent out the
UART or SPI port. If the IS command was received as a remote command, the I/O sample
is sent over-the-air to the module that sent the IS command.

Table of Contents

Other manuals for Digi XBee

Questions and Answers:

Question and Answer IconNeed help?

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

Digi XBee Specifications

General IconGeneral
BrandDigi
ModelXBee
CategoryControl Unit
LanguageEnglish

Related product manuals