I/O support Periodic I/O sampling
Digi XBee3® 802.15.4 RF Module User Guide
52
how many I/O samples can fit into a maximum size packet; seeMaximum payload. A query of IT after
changes are applied tells how many I/O samples will actually be gathered.
SinceMM (MAC Mode) must be 0 or 3 to send I/O samples, the maximum payload in the best of
conditions (short source address, short destination address, and no encryption) is 114 bytes. Seven of
those bytes are used by the command header and the I/O header, leaving 107 bytes for I/O samples.
The minimum I/O sample is 2 bytes. Therefore the maximum possible usable value forITis 53 (or
0x35).
Only legacy I/O frames allow for gathering multiple samples. Ifyou set AOto 0 or 1, thenITis not
applicable and only one sample can be gathered per frame.
Example: Remote AT command in API mode
A device is configured with the following settings:
n D0andD1are set to ADC (2)
n D3is configured as a digital input (3)
n AOis set to 2, so legacy frames are generated
n ITis configured to 3, so that three samples are gathered per transmission
On the destination node, the following frame is emitted:
7E 00 1A 83 12 34 26 02 03 06 04 00 04 01 28 03 12 00 00 01 58 02 FE 00 04 01 2A 03 A0 94
Output Field Description
7E Start
Delimiter
Indicates the beginning of an API frame
00 1A Length Length of the packet
83 Frame
type
Legacy 16-bit I/O Sample
12 34 16-bit
Source
Address
The source address of the device that sent the I/O sample
26 RSSI The 64-bit address of the node that responded to the request
02
03 Sample
sets
The number of samples that are included in this frame
06 04 Channel
mask
Mask which indicates which digital and analog lines are enabled. Even though
multiple samples are being gathered, there will only ever be one channel
mask per frame.
(0x0604 = 0000 0110 0000 0100b = ADC0, ADC1, DIO3)