A-RVariousInitial release and subsequent releases for various editorial updates and technical content updates
to keep current with product changes.
SMay 2015Update the SMT dimensions drawing. Added a section on deep sleep and sleep current
measurements. Updated the baud rates supported by the BD command. Updated the Brazil
ANATEL certification information.
TJuly 2015Revised the Maximum RF payload size section. Frames 0x90 and 0x91 no longer report the 0x40
indicator - removed it.
UDecember 2015Updated XBee-PRO Surface Mount agency approvals. Added missing Extended Modem Status
status code descriptions to the 0x98 frame. Added ANATEL labels.
VApril 2016Updated the firmware release notes section. Updated several hardware specifications with S2D
hardware information. Updated regulatory information. Revised the Programmable XBee SDK
section. Added the ED command. Updated the BD command. Added antennas for the S2D
hardware.
Product documentation
To find up-to-date documentation for all Digi products, visit www.digi.com/documentation.
To provide feedback on this documentation, send your comments to techcomm@digi.com.
Trademarks and copyright
Digi, Digi International, and the Digi logo are trademarks or registered trademarks in the United States and other
countries worldwide. All other trademarks mentioned in this document are the property of their respective owners.
Information in this document is subject to change without notice and does not represent a commitment on the part
of Digi International. Digi provides this document “as is,” without warranty of any kind, expressed or implied,
including, but not limited to, the implied warranties of fitness or merchantability for a particular purpose. Digi may
make improvements and/or changes in this manual or in the product(s) and/or the program(s) described in this
manual at any time.
Warranty
To view product warranties online, visit www.digi.com/howtobuy/terms.
Customer support
Digi offers multiple technical support plans and service packages to help our customers get the most out of their Digi
product. For information on Technical Support plans and pricing, please contact us at 952.912.3456 or visit
www.digi.com/support.
XBee/XBee-PRO ZigBee RF Modules User Guide2
If you have a customer account, sign in to the Customer Support Web Portal at www.digi.com/support.
This manual describes the operation of the XBee/XBee-PRO ZigBee RF Module, which consists of ZigBee firmware
loaded onto XBee S2C and PRO S2C hardware.
XBee/XBee-PRO ZigBee RF Modules provide wireless connectivity to end-point devices in ZigBee mesh networks.
Using the ZigBee PRO Feature Set, these modules are inter-operable with other ZigBee devices, including devices
from other vendors. With the XBee, users can have their ZigBee network up-and-running in a matter of minutes
without configuration or additional development.
The XBee/XBee-PRO ZigBee RF Modules are compatible with other devices that use XBee ZigBee technology. These
include ConnectPortX gateways, XBee and XBee-PRO Adapters, Wall Routers, XBee Sensors, and other products with
the ZB name.
Worldwide acceptance
•FCC Approval (USA): Refer to Agency certifications on page 203 for FCC Requirements. Systems that
Addressing OptionsPAN ID and Addresses, Cluster IDs and Endpoints (optional)
Interface Options
UART1 Mb/s maximum (burst)
SPI5 Mb/s maximum (burst)
Agency approvals
The following table provides the agency approvals for the module.
NoteLegacy XBee-PRO SMT (model: PRO S2C; hardware version 21xx) has different FCC and IC IDs; see Agency
certifications on page 203.
Approval
United
States
(FCC Part
15.247)
Industry
Canada
(IC)
FCC/IC
Test
Transmit
Power
Output
range
Europe
(CE)
XBee
(Surface Mount)
FCC ID: MCQ-XBS2CFCC ID: MCQ-XBPS2C
IC: 1846A-XBS2CIC: 1846A-XBPS2C
-26 to +8 dBm -0.7 to +19.4 dBm-26 to +8 dBm+1 to +19 dBm-10 to +8 dBm
ETSIETSIETSI
XBee-PRO
(Surface Mount)
(revision K and
earlier)
FCC ID: MCQ-PS2CSM
(revision L and later)
(revision K and
earlier)
IC: 1846A-PS2CSM
(revision L and later)
XBee
(Through-hole)
FCC ID: MCQ-S2CTHFCC ID: MCQ-PS2CTH FCC ID: MCQ-
IC: 1846A-S2CTHIC: 1846A-PS2CTHIC: 1846A-S2DSM
XBee-PRO
(Through-hole)
XBee S2D SMT
S2DSM
AustraliaC-TickRCMRCMRCM
JapanR201WW10215369R210-105563
Brazil (Res.
506)
RoHSCompliant
XBee/XBee-PRO ZigBee RF Modules User Guide12
ANATEL: 0616-151209
ANATEL: 1533-151209
ANATEL: 4556-151209
ANATEL: 4077-151209
Serial communications specifications
Serial communications specifications
XBee RF modules support both UART (Universal Asynchronous Receiver / Transmitter) and SPI (Serial Peripheral
Interface) serial connections.
UART
The SC1 (Serial Communication Port 1) of the Ember 357 is connected to the UART port. The following table
provides the UART pin assignments.
SpecificationsModule Pin Number
UART PinsXBee (surface-mount)XBee (through-hole)
DOUT32
DIN / CONFIG
CTS
/ DIO72512
RTS
/ DIO62916
More information on UART operation is found in the UART section in Module operation on page 28.
43
SPI
The SC2 (Serial Communication Port 2) of the Ember 357 is connected to the SPI port.
SpecificationsModule Pin Number
SPI PinsXBee (surface mount)XBee (through-hole)
SPI_SCLK1418
SPI_SSEL
SPI_MOSI1611
SPI_MISO174
For more information on SPI operation, see the SPI section in Module operation on page 28.
1517
GPIO specifications
XBee RF modules have 15 General Purpose Input / Output (GPIO) ports available. The exact list will depend on the
module configuration, as some GPIO pads are used for purposes such as serial communication.
See Enabling GPIO 1 and 2 on page 201 for more information on configuring and using GPIO ports.
GPIO Electrical SpecificationValue
Voltage - Supply2.1 - 3.6 V
Low Schmitt switching threshold0.42 - 0.5 x VCC
High Schmitt switching threshold0.62 - 0.8 x VCC
Input current for logic 0-0.5 A
Input current for logic 10.5 A
XBee/XBee-PRO ZigBee RF Modules User Guide13
Hardware specifications for the programmable variant
GPIO Electrical SpecificationValue
Input pull-up resistor value29 k
Input pull-down resistor value29 k
Output voltage for logic 00.18 x VCC (maximum)
Output voltage for logic 10.82 x VCC (minimum)
Output source/sink current for pad numbers 3, 4, 5, 10, 12, 14, 15, 16, 17, 25, 26,
4 mA
28, 29, 30, and 32 on the SMT modules
Output source/sink current for pin numbers 2, 3, 4, 9, 12, 13, 15, 16, 17, and 19
4 mA
on the TH modules
Output source/sink current for pad numbers 7, 8, 24, 31, and 33 on the SMT
8 mA
modules
Output source/sink current for pin numbers 6, 7, 11, 18, and 20 on the TH
8 mA
modules
Total output current (for GPIO pads)40 mA
Hardware specifications for the programmable variant
If the module has the programmable secondary processor, add the following table values to the specifications
listed on page 8. For example, if the secondary processor is running at 20 MHz and the primary processor is in
receive mode then the new current value will be I
current of the secondary processor and I
is the receive current of the primary.
rx
Optional Secondary Processor Specification
total
= Ir2 + I
= 14 mA + 9 mA = 23 mA, where I
rx
These numbers add to specifications
(Add to RX, TX, and sleep currents depending
on mode of operation)
is the runtime
r2
Runtime current for 32k running at 20MHz+14mA
Runtime current for 32k running at 1MHz+1mA
Sleep current+0.5A typical
For additional specifications see Freescale
MC9S08QE32
Datasheet and Manual
Minimum Reset low pulse time for EM357+26S
VREF Range1.8VDC to VCC
Mechanical drawings
The following mechanical drawings of the XBee/XBee-PRO ZigBee RF ModuleRF Modules show all dimensions in
inches. The first drawing shows the surface-mount model (antenna options not shown).
XBee/XBee-PRO ZigBee RF Modules User Guide14
Mechanical drawings
3,1
3,1
3,1
5360$
8)/
:,5(:+,3
3&%$17(11$
The drawings below show the XBee through-hole module.
l
XBee/XBee-PRO ZigBee RF Modules User Guide15
The drawings below show the XBee-PRO through-hole model.
3&%$17(11$
:,5(:+,3
8)/
5360$
3,1
3,1
3,1
Pin signals for the surface mount module
Pin signals for the surface mount module
Pin #NameDirectionDefault StateDescription
1GND--
2VCC--
3DOUT / DIO13 BothOutput
4DIN / CONFIG
5DIO12 Both
6RESET
7RSSI PWM / DIO10BothOutput
8PWM1 / DIO11 BothDisabled
9[reserved]-Disabled
10DTR
11GND--
/ DIO14BothInput
Input
/ SLEEP_RQ / DIO8BothInput
Ground
Power Supply
UART Data Out / GPIO
UART Data In / GPIO
GPIO
Module Reset
RX Signal Strength Indicator / GPIO
Pulse Width Modulator / GPIO
Do Not Connect
Pin Sleep Control Line / GPIO
Ground
XBee/XBee-PRO ZigBee RF Modules User Guide16
Pin signals for the surface mount module
Pin #NameDirectionDefault StateDescription
12SPI_ATTN
13GND--
14SPI_CLK / DIO18InputInput
15SPI_SSEL
16SPI_MOSI / DIO16InputInput
17SPI_MISO / DIO15OutputOutput
18[reserved]*-Disabled
19[reserved]*-Disabled
20[reserved]*-Disabled
21[reserved]*-Disabled
22GND--
23[reserved]-Disabled
24DIO4BothDisabled
25CTS
/ BOOTMODE / DIO19OutputOutput
/ DIO 17InputInput
/ DIO7BothOutput
Serial Peripheral Interface Attention
Do not tie low on reset
Ground
Serial Peripheral Interface Clock / GPIO
Serial Peripheral Interface not Select / GPIO
Serial Peripheral Interface Data In / GPIO
Serial Peripheral Interface Data Out / GPIO
Do Not Connect
Do Not Connect
Do Not Connect
Do Not Connect
Ground
Do Not Connect
GPIO
Clear to Send Flow Control / GPIO
26ON / SLEEP
27VREFInput-
28ASSOCIATE / DIO5BothOutput
29RTS
30AD3 / DIO3BothDisabled
31AD2 / DIO2BothDisabled
32AD1 / DIO1BothDisabled
33AD0 / DIO0BothInput
34[reserved]-Disabled
35GND--
36RFBoth-
/ DIO9BothOutput
/ DIO6BothInput
Module Status Indicator / GPIO
Not used for EM357. Used for programmable
secondary processor. For compatibility with
other XBee modules, we recommend connecting
this pin to the voltage reference if Analog
Sampling is desired. Otherwise, connect to GND.
Associate Indicator / GPIO
Request to Send Flow Control / GPIO
Analog Input / GPIO
Analog Input / GPIO
Analog Input / GPIO
Analog Input / GPIO / Commissioning Button
Do Not Connect
Ground
RF IO for RF Pad Variant
XBee/XBee-PRO ZigBee RF Modules User Guide17
Pin signals for the through-hole module
Pin #NameDirectionDefault StateDescription
37[reserved]-Disabled
Signal Direction is specified with respect to the module
See Design notes for SMT RF pad modules on page 23 for details on pin connections
* Refer to the Writing Custom Firmware section for instructions on using these pins if JTAG functions are needed
Do Not Connect
Pin signals for the through-hole module
Pin #NameDirectionDefault StateDescription
1VCC--
2DOUT / DIO13 BothOutput
3DIN / CONFIG
4DIO12 / SPI_MISOBothDisabled
5RESET
6RSSI PWM / PWMO DIO10BothOutput
7PWM1 / DIO11 BothDisabled
8[reserved]--
/ DIO14BothInput
InputInput
Power Supply
UART Data Out
UART Data In
GPIO/ SPI slave out
Module Reset
RX signal strength indicator / GPIO
GPIO
Do Not Connect
9DTR
10GND--
11SPI_MOSI / DIO4BothDisabled
12CTS
13ON_SLEEP
14VREF--
15ASSOCIATE / DIO5BothOutput
16RTS
17AD3 / DIO3 / SPI_SSE
18AD2 / DIO2 / SPI_CLKBothDisabled
19AD1 / DIO1 / SPI_ATTN
20AD0 / DIO0 / CBBothDisabled
/ SLEEP_RQ / DIO8BothInput
/ DIO7BothOutput
/ DIO9BothOutput
/ DIO6BothInput
L BothDisabled
BothDisabled
Pin Sleep Control Line / GPIO
Ground
GPIO/ SPI slave in
Clear-to-Send Flow Control / GPIO
Module Status Indicator / GPIO
Not connected
Associate Indicator / GPIO
Request to Send Flow Control / GPIO
Analog Input / GPIO / SPI Slave Select
Analog Input / GPIO / SPI Clock
Analog Input / GPIO / SPI Attention
Analog Input / GPIO / Commissioning Button
XBee/XBee-PRO ZigBee RF Modules User Guide18
Pin signals for the through-hole module
EM357 pin mappings
The following table shows how the EM357 pins are used on the XBee.
NoteSome lines may not go to the external XBee pins in the programmable secondary processor version.
EM357 Pin #EM357 Pin Name
12
18
19
20
21
22
24
25
26
27
29
30
RST
PA7
PB3
PB4
PA0 / SC2MOSI
PA1 / SC2MISO
PA2 / SC2SCLK
PA3 / SC2SSEL
PA4 / PTI_EN
PA5 / PTI_DATA /
BOOTMODE
PA6
PB1 / SC1TXD
XBee (SMT)
Pad #
65
87
2916
2512
1611
174
1418
1517
3219
12NA
76
32
XBee (TH)
Pin #
Other Usage
Programming
Used for UART
Used for UART
Used for SPI
Used for SPI
Used for SPI
Used for SPI
OTA packet tracing
OTA packet tracing, force embedded serial bootloader,
and SPI attention line
Used for UART
31
33
34
35
36
38
41
42
43
PB2 / SC1RXD
PC2 / JTDO / SWO
PC3 / JTDI
PC4 / JTMS / SWDIO
PB0
PC1 / ADC3
PB7 / ADC2
PB6 / ADC1
PB5 / ADC0Temperature sensor on PRO version
43
2613
2815
54
109
3017
3118
3320
Used for UART
JTAG (see Writing custom firmware on page 201)
JTAG (see Writing custom firmware on page 201)
JTAG (see Writing custom firmware on page 201)
XBee/XBee-PRO ZigBee RF Modules User Guide19
Design notes
Design notes
The XBee modules do not specifically require any external circuitry or specific connections for proper operation.
However, there are some general design guidelines that are recommended for help in troubleshooting and
building a robust design.
Power supply design
Poor power supply can lead to poor radio performance, especially if the supply voltage is not kept within
tolerance or is excessively noisy. To help reduce noise, we recommend placing both a 1F and 8.2pF capacitor as
near to (pad 2/SMT, pin 1/TH) on the PCB as possible. If using a switching regulator for your power supply,
switching frequencies above 500kHz are preferred. Power supply ripple should be limited to a maximum 50mV
peak to peak.
NoteFor designs using the programmable modules, an additional 10F decoupling cap is recommended near
(pad 2/SMT, pin 1/TH) of the module. The nearest proximity to (pad 2/SMT, pin 1/TH) of the three caps
should be in the following order: 8.2pf, 1F followed by 10F.
Recommended pin connections
The only required pin connections are VCC, GND, DOUT and DIN. To support serial firmware updates, VCC, GND,
DOUT, DIN, RTS, and DTR should be connected.
All unused pins should be left disconnected. All inputs on the radio can be pulled high or low with 30k internal
pull-up or pull-down resistors using the PR and PD software commands. No specific treatment is needed for
unused outputs.
For applications that need to ensure the lowest sleep current, unconnected inputs should never be left floating.
Use internal or external pull-up or pull-down resistors, or set the unused I/O lines to outputs.
Other pins may be connected to external circuitry for convenience of operation, including the Associate LED pad
(pad 28/SMT, pin 15/TH) and the Commissioning pad (pad 33/SMT, pin 20/TH). The Associate LED pad will flash
differently depending on the state of the module to the network, and a pushbutton attached to pad 33 can
enable various join functions without having to send serial port commands. See Commissioning Pushbutton and
Associate LED on page 93 for more details. The source and sink capabilities are limited to 4mA for pad numbers 3,
4, 5, 10, 12, 14, 15, 16, 17, 25, 26, 28, 29, 30 and 32, and 8mA for pad numbers 7, 8, 24, 31 and 33 on the SMT
module. The source and sink capabilities are limited to 4mA for pin numbers 2, 3, 4, 9, 12, 13, 15, 16, 17, and 19,
and 8mA for pin numbers 6, 7, 11, 18, and 20 on the TH module.
The VRef pad (pad 27) is only used on the programmable versions of the SMT modules. For the TH modules, a
VRef pin (Pin #14) is used. For compatibility with other XBee modules, we recommend connecting this pin to a
voltage reference if analog sampling is desired. Otherwise, connect to GND.
Board layout
XBee modules are designed to be self sufficient and have minimal sensitivity to nearby processors, crystals or
other PCB components. As with all PCB designs, Power and Ground traces should be thicker than signal traces
and able to comfortably support the maximum current specifications. A recommended PCB footprint for the
module can be found in Manufacturing information on page 228. No other special PCB design considerations are
required for integrating XBee radios except in the antenna section.
The choice of antenna and antenna location is very important for correct performance. With the exception of the
RF Pad variant, XBees do not require additional ground planes on the host PCB. In general, antenna elements
XBee/XBee-PRO ZigBee RF Modules User Guide20
Design notes
radiate perpendicular to the direction they point. Thus a vertical antenna emits across the horizon. Metal objects
near the antenna cause reflections and may reduce the ability for an antenna to radiate efficiently. Metal objects
between the transmitter and receiver can also block the radiation path or reduce the transmission distance, so
external antennas should be positioned away from them as much as possible. Some objects that are often
overlooked are metal poles, metal studs or beams in structures, concrete (it is usually reinforced with metal
rods), metal enclosures, vehicles, elevators, ventilation ducts, refrigerators, microwave ovens, batteries, and tall
electrolytic capacitors.
Design notes for PCB antenna modules
PCB Antenna modules should not have any ground planes or metal objects above or below the antenna. For best
results, the module should not be placed in a metal enclosure, which may greatly reduce the range. The module
should be placed at the edge of the PCB on which it is mounted. The ground, power and signal planes should be
vacant immediately below the antenna section. The drawings on the following pages illustrate important
recommendations when designing with PCB antenna modules. It should be noted that for optimal performance,
this module should not be mounted on the RF Pad footprint described in the next section because the footprint
requires a ground plane within the PCB Antenna keep out area.
XBee/XBee-PRO ZigBee RF Modules User Guide21
Surface-mount keepout area
Design notes
XBee/XBee-PRO ZigBee RF Modules User Guide22
Through-hole keepout area
Design notes
Design notes for SMT RF pad modules
The RF Pad is a soldered antenna connection. The RF signal travels from pin 36 on the module to the antenna
through an RF trace transmission line on the PCB. Note that any additional components between the module and
antenna will violate modular certification. The RF trace should have a controlled impedance of 50 ohms. We
recommend using a microstrip trace, although coplanar waveguide may also be used if more isolation is needed.
Microstrip generally requires less area on the PCB than coplanar waveguide. Stripline is not recommended
because sending the signal to different PCB layers can introduce matching and performance problems.
It is essential to follow good design practices when implementing the RF trace on a PCB. The following figures
show a layout example of a host PCB that connects an RF Pad module to a right angle, through hole RPSMA jack.
The top two layers of the PCB have a controlled thickness dielectric material in between. The second layer has a
ground plane which runs underneath the entire RF Pad area. This ground plane is a distance d, the thickness of
the dielectric, below the top layer. The top layer has an RF trace running from pin 36 of the module to the RF pin
of the RPSMA connector. The RF trace's width determines the impedance of the transmission line with relation to
XBee/XBee-PRO ZigBee RF Modules User Guide23
Design notes
the ground plane. Many online tools can estimate this value, although the PCB manufacturer should be consulted
for the exact width. Assuming d=0.025”, and that the dielectric has a relative permittivity of 4.4, the width in this
example will be approximately 0.045" for a 50 ohm trace. This trace width is a good fit with the module footprint's
0.060" pad width. Using a trace wider than the pad width is not recommended, and using a very narrow trace
(under 0.010") can cause unwanted RF loss. The length of the trace is minimized by placing the RPSMA jack close
to the module. All of the grounds on the jack and the module are connected to the ground planes directly or
through closely placed vias. Any ground fill on the top layer should be spaced at least twice the distance d (in this
case, at least 0.050") from the microstrip to minimize their interaction.
Implementing these design suggestions will help ensure that the RF Pad module performs to its specifications.
The following illustration shows PCB layer 1 of an example RF layout.
The following illustration shows PCB layer 2 of an example RF layout.
XBee/XBee-PRO ZigBee RF Modules User Guide24
Module operation for the programmable variant
Module operation for the programmable variant
The modules with the programmable option have a secondary processor with 32k of flash and 2k of RAM. This
allows module integrators to put custom code on the XBee module to fit their own unique needs. The DIN, DOUT,
RTS, CTS, and RESET lines are intercepted by the secondary processor to allow it to be in control of the data
transmitted and received. All other lines are in parallel and can be controlled by either the EM357 or the
MC9SO8QE micro (see the Block Diagram for details). The pin use is automatically handled by the Programmable
XBee SDK native APIs.
In order for the secondary processor to sample with ADCs, the XBee VREF pin (27/SMT, 14/TH) must be connected
to a reference voltage.
Digi provides a bootloader that can take care of programming the processor over the air or through the serial
interface. This means that over the air updates can be supported through an XMODEM protocol. The processor
can also be programmed and debugged through a one wire interface BKGD (Pin 9/SMT, Pin 8/TH).
Programmable XBee SDK
The XBee Programmable module is equipped with a Freescale MC9S08QE32 application processor. This
application processor comes with a supplied bootloader. To interface your application code running on this
processor to the XBee Programmable module's supplied bootloader, use the Programmable XBee SDK.
To use the SDK, you must also download CodeWarrior. The download links are:
If these revisions change, search for the part number on Digi’s website. For example, search for “40003003”.
Install the IDE first, then install the SDK.
The documentation for the Programmable XBee SDK is built into the SDK, so the Getting Started guide appears
when you open CodeWarrior.
XBee/XBee-PRO ZigBee RF Modules User Guide25
The following figure shows the programmable connections for the SMT.
Overview of the XBee ZigBee RF Module
XBee/XBee-PRO ZigBee RF Modules User Guide26
The following illustration shows the programmable connections for the TH Module.
Overview of the XBee ZigBee RF Module
XBee/XBee-PRO ZigBee RF Modules User Guide27
Module operation
Serial communications
XBee RF Modules interface to a host device through a serial port. Through its serial port, the module can
communicate with any logic and voltage compatible UART, through a level translator to any serial device (for
example, through a RS-232 or USB interface board), or through a Serial Peripheral Interface, which is a synchronous
interface to be described later.
Two Wire serial Interface (TWI) is also available, but not supported by Digi. For information on the TWI, see the EM357
specification.
UART data flow
Devices that have a UART interface can connect directly to the pins of the RF module as shown in the figure below.
System data flow diagram in a UART-interfaced environment (Low-asserted signals distinguished with horizontal line
over signal name.)
Serial data
Data enters the module UART through the DIN (pin 4) as an asynchronous serial signal. The signal should idle high
when no data is being transmitted.
Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high). The following
figure illustrates the serial bit pattern of data passing through the module.
XBee/XBee-PRO ZigBee RF Modules User Guide28
Serial communications
UART data packet 0x1F (decimal number “31”) as transmitted through the RF module
Example Data Format is 8-N-1 (bits - parity - # of stop bits)
Serial communications depend on the two UARTs (the microcontroller's and the RF module's) to be configured
with compatible settings (baud rate, parity, start bits, stop bits, data bits).
The UART baud rate, parity, and stop bits settings on the XBee module can be configured with the BD, NB, and SB
commands respectively. See Serial interfacing (I/O) commands on page 186 for details.
SPI communications
The XBee modules support SPI communications in slave mode. Slave mode receives the clock signal and data
from the master and returns data to the master. The SPI port uses the following signals on the XBee:
•SPI_MOSI (Master Out, Slave In) - inputs serial data from the master
•SPI_MISO (Master In, Slave Out) - outputs serial data to the master
•SPI_SCLK (Serial Clock) - clocks data transfers on MOSI and MISO
•SPI_SSEL (Slave Select) - enables serial communication with the slave
The above four pins are standard for SPI. This module also supports an additional pin, which may be configured
to alert the SPI master when it has data to send. This pin is called SPI_ATTN
(through polling or interrupts), it can know when it needs to receive data from the module. SPI_ATTN
whenever it has data to send and it remains asserted until all available data has been shifted out to the SPI
master.
In this mode, the following apply:
. If the master monitors this pin
asserts
•Data/clock rates of up to 5 Mb/s are possible
•Data is MSB first
•Frame format mode 0 is used (see below)
The following illustration shows the frame format for SPI communications.
XBee/XBee-PRO ZigBee RF Modules User Guide29
Serial communications
Serial
Receiver
Buffer
RF TX
Buffer
Transmitter
RF Switch
Antenna
Port
Receiver
Serial Transmit
Buffer
RF RX
Buffer
Processor
DIN
DOUT
CTS
RTS
SPI operation
When the slave select (SPI_SSEL) signal is asserted by the master, SPI transmit data is driven to the output pin
(SPI_MISO), and SPI data is received from the input pin SPI_MOSI. The SPI_SSEL
the transmit serializer to drive data to the output signal SPI_MISO. A rising edge on SPI_SSEL
shift registers.
pin has to be asserted to enable
resets the SPI slave
If the SPI_SCLK is present, the SPI_MISO line is always driven whether with or without the SPI_SSEL
line driven.
This is a known issue with the Ember EM357 chip, and makes additional hardware necessary if multiple slaves are
using the same bus as the XBee.
If the input buffer is empty, the SPI serializer transmits a busy token (0xFF). Otherwise, all transactions on the SPI
port use API operation. See API Operation on page 130 for more information.
The SPI slave controller must guarantee that there is time to move new transmit data from the transmit buffer
into the hardware serializer. To provide sufficient time, the SPI slave controller inserts a byte of padding at the
start of every new string of transmit data. Whenever the transmit buffer is empty and data is placed into the
transmit buffer, the SPI hardware inserts a byte of padding onto the front of the transmission as if this byte were
placed there by software.
Serial port selection
In the default configuration the UART and SPI ports will both be configured for serial port operation. In this case,
serial data will go out the UART until the SPI_SSEL signal is asserted. Thereafter all serial communications will
operate only on the SPI interface until a reset occurs.
If only the UART is enabled, then only the UART will be used, and SPI_SSEL will be ignored.
If only the SPI is enabled, then only the SPI will be used, and UART communications will be ignored. If DOUT is
held low during boot, then only the SPI will be used.
Once SPI is in use, do not attempt to apply changes (AC) which change the UART or SPI settings. Instead, use 0x09
frames to reconfigure UART/SPI/other settings, use WR to save the settings, then FR to reset the XBee and use the
new configuration settings.
If neither serial port is enabled, then UART will remain enabled, only the UART will be used, and SPI_SSEL will be
ignored.
Serial buffers
The XBee modules maintain small buffers to collect received serial and RF data, which is illustrated in the figure
below. The serial receive buffer collects incoming serial characters and holds them until they can be processed.
The serial transmit buffer collects data that is received via the RF link that will be transmitted out the UART or SPI
port. The following figure shows an internal data flow diagram.
XBee/XBee-PRO ZigBee RF Modules User Guide30
Loading...
+ 202 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.