Product manual

XBee®/XBeePRO®RFModules‐802.15.4‐v1.xEx[2009.09.23]
©2009DigiInternatonal,Inc. 13
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:
I/O Data Format
I/O data begins with a header. The first byte of the header defines the number of samples forth-
coming. The last 2 bytes of the header (Channel Indicator) define which inputs are active. Each
bit represents either a DIO line or ADC channel.
Figure204. 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 sample. The
ADC data follows. ADC channel data is represented as an unsigned 10-bit value right-justified on
a 16- bit boundary.
Figure205. SampleData
Table201. Pinfunctionsandtheirassociatedpinnumbersandcommands
AD=AnalogtoDigitalConverter,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
Sample Data
DIO Line Data is first (if enabled) ADC Line Data
ADCn MSB ADCn LSB7 0123456X 8XXXXXX