User's Guide
Table Of Contents
- XBee/XBee-PRO S2C 802.15.4 RF Module User Guide
- Technical specifications
- Hardware
- Configure the XBee/XBee-PRO S2C 802.15.4 RF Module
- Modes
- Operation
- AT commands
- Special commands
- Networking and security commands
- C8 (802.15.4 Compatibility)
- CH (Operating Channel)
- ID (Network ID)
- DH (Destination Address High)
- DL (Destination Address Low)
- MY (Source Address)
- SH (Serial Number High)
- SL (Serial Number Low)
- MM (MAC Mode)
- RR (XBee Retries)
- RN (Random Delay Slots)
- ND (Network Discovery)
- NT (Node Discover Timeout)
- NO (Node Discovery Options)
- DN (Discover Node)
- CE (Coordinator Enable)
- SC (Scan Channels)
- SD (Scan Duration)
- A1 (End Device Association)
- A2 (Coordinator Association)
- AI (Association Indication)
- DA (Force Disassociation)
- FP (Force Poll)
- AS (Active Scan)
- ED (Energy Detect)
- EE (Encryption Enable)
- KY (AES Encryption Key)
- NI (Node Identifier)
- NP (Maximum Packet Payload Bytes)
- RF interfacing commands
- Sleep commands
- Serial interfacing commands
- I/O settings commands
- D0 (DIO0/AD0)
- D1 (DIO1/AD1)
- D2 (DIO2/AD2)
- D3 (DIO3/AD3)
- D4 (DIO4)
- D5 (DIO5/ASSOCIATED_INDICATOR)
- D8 (DIO8/SLEEP_REQUEST)
- P0 (RSSI/PWM0 Configuration)
- P1 (PWM1 Configuration)
- P2 (SPI_MISO)
- M0 (PWM0 Duty Cycle)
- M1 (PWM1 Duty Cycle)
- P5 (SPI_MISO)
- P6 (SPI_MOSI Configuration)
- P7 (SPI_SSEL )
- P8 (SPI_SCLK)
- P9 (SPI_ATTN)
- PR (Pull-up/Down Resistor Enable)
- PD (Pull Up/Down Direction)
- IU (I/O Output Enable)
- IT (Samples before TX)
- IS (Force Sample)
- IO (Digital Output Level)
- IC (DIO Change Detect)
- IR (Sample Rate)
- RP (RSSI PWM Timer)
- I/O line passing commands
- Diagnostic commands
- Command mode options
- Operate in API mode
- API mode overview
- API frame specifications
- Escaped characters in API frames
- Frame descriptions
- TX Request: 64-bit address frame - 0x00
- TX Request: 16-bit address - 0x01
- AT Command frame - 0x08
- AT Command - Queue Parameter Value frame - 0x09
- Remote AT Command Request frame - 0x17
- RX Packet: 64-bit Address frame - 0x80
- Receive Packet: 16-bit address frame - 0x81
- RX (Receive) Packet: 64-bit address IO frame- 0x82
- RX Packet: 16-bit address I/O frame - 0x83
- AT Command Response frame - 0x88
- TX Status frame - 0x89
- Modem Status frame - 0x8A
- Remote Command Response frame - 0x97
- Regulatory information
- Load 802.15.4 firmware on ZB devices
- Migrate from XBee through-hole to surface-mount devices
- PCB design and manufacturing
Operation I/O support
XBee/XBee-PRO S2C 802.15.4 RF Module User Guide
59
Wakeup I/O sampling
Bit 2 of the SO parameter specifies whether or not the device automatically samples the ADC/DIO
lines on wakeup. On the receiving side the I/O sample may go to the I/O pins, the serial port, both, or
neither based on the settings of the IA (I/O Input Address) and IU (I/O Output Enable) parameters.
For more information, see SO (Sleep Options), IA (I/O Input Address), and IU (I/O Output Enable).
Sample rate (interval)
The Sample Rate (Interval) feature allows enabled ADC and DIO pins to be read periodically on devices
that are not configured to operate in Sleep Mode. When one of the Sleep Modes is enabled and the IR
(Sample Rate) parameter is set, the device stays awake until IT (Samples before TX) samples have
been collected.
Once a particular pin is enabled, the appropriate sample rate must be chosen. The maximum sample
rate that can be achieved while using one A/D line is 1 sample/ms or 1 kHz. The device cannot keep up
with transmission when IR and IT are equal to 1 and we do not recommend configuring the device to
sample at rates greater than once every 20 ms.
I/O line passing
You can configure XBee/XBee-PRO S2C 802.15.4 RF Modules to perform analog and digital line
passing. When a device receives an RF I/O sample data packet, you can set up the receiving device to
update any enabled outputs (PWM and DIO) based on the data it receives.
Digital I/O lines are mapped in pairs; pins configured as digital input on the transmitting device affect
the corresponding digital output pin on the receiving device. For example: DI5 (pin 25) can only update
DO5 (pin 25).
No I/O line passing occurs if the receiving device does not have the corresponding pins set for output.
For Analog Line Passing, the XBee/XBee-PRO S2C 802.15.4 RF Module has two PWM output pins that
simulate the voltage measured by the ADC lines AD0 and AD1. For example, when configured as an
ADC, AD0 (pin 33) updates PWM0 (pin 7); AD1 (pin 32) updates PWM1 (pin 8).
The default setup is for outputs to not be updated. Instead, a device sends I/O sample data out the
serial interface in API mode, even if the destination node is not configured for API mode. You can use
the IU command to disable sample data output.
To enable updating the outputs, set the IA (I/O Input Address) parameter with the address of the
device that has the appropriate inputs enabled. This effectively binds the outputs to a particular
device’s input. This does not affect the ability of the device to receive I/O line data from other devices -
only its ability to update enabled outputs. Set the IA parameter to 0xFFFF (broadcast address) to set
up the device to accept I/O data for output changes from any device on the network.
For line passing to function, the device configured with inputs must generate sample data.
When outputs are changed from their configured state, the device can be setup to return the output
level to its configured state after a timer expires. The timers are set using the Tn (Dn Output Timer)
and PT (PWM Output Timeout) commands. The timers are reset every time the device receives a valid
I/O sample packet with a matching IA address. You can adjust the IT (Samples before TX) and IR
(Sample Rate) parameters on the transmitting device to keep the outputs set to their active output if
the system needs more time than the timers can handle. Alternatively, the timers can be set to 0xFF,
which prevents them from expiring (in other words, the outputs remain in the state specified by the
input device indefinitely).