Product Manual
XBee/XBee‐PRO™OEMRFModules‐802.15.4‐v1.xAx[2007.05.031]
©2007MaxStream,Inc. 12
Chapter2‐RFModuleOperation
2.2. ADC and Digital I/O Line Support
The XBee/XBee-PRO RF Modules support ADC (Analog-to-digital conversion) and digital I/O line
passing. The following pins support multiple functions:
To enable ADC and DIO pin functions:
2.2.1. I/O Data Format
I/O data begins with a header. The first byte of the header defines the number of samples forth-
coming. A sample is comprised of input data and the inputs can contain either DIO or ADC. The
last 2 bytes of the header (Channel Indicator) define which inputs are active. Each bit represents
either a DIO line or ADC channel.
Figure2‐04. Header
Sample data follows the header and the channel indicator frame is used to determine how to read
the sample data. If any of the DIO lines are enabled, the first 2 bytes are the DIO data and the
ADC data follows. ADC channel data is stored as an unsigned 10-bit value right-justified on a 16-
bit boundary.
Figure2‐05. SampleData
Tab le2‐01. Pinfunctionsandtheirassociatedpinnumbersandcommands
AD=Analog‐to‐DigitalConverter, DIO=DigitalInput/Output
Pinfunctionsnotapplicabletothissectionaredenotedwithin(parenthesis).
Pin Function Pin# AT Command
AD0 / DIO0 20 D0
AD1 / DIO1 19 D1
AD2 / DIO2 18 D2
AD3 / DIO3 / (COORD_SEL) 17 D3
AD4 / DIO4 11 D4
AD5 / DIO5 / (ASSOCIATE) 15 D5
DIO6 / (RTS) 16 D6
DIO7 / (CTS) 12 D7
DI8 / (DTR) / (Sleep_RQ) 9 D8
For ADC Support: Set ATDn = 2
For Digital Input support: Set ATDn = 3
For Digital Output Low support: Set ATDn = 4
For Digital Output High support: Set ATDn = 5
Header
Bit set to ‘1’ if channel is active
Bytes 2 - 3 (Channel Indicator)
na D8A0A1A2A3A4A5 D7 D0D1D2D3D4D5D6
Byte 1
Total number of samples
bit 15 bit 0
Sample Data
DIO Line Data is first (if enabled) ADC Line Data
ADCn MSB ADCn LSB7 0123456X 8XXXXXX