Operation
Serial interface
XBee Wi-Fi RF Module User Guide
34
Serial interface
The XBee Wi-Fi RF Module interfaces to a host device through a serial port. The device can
communicate through its serial port with:
n
Through logic and voltage compatible universal asynchronous receiver/transmitter (UART).
n
Through a level translator to any serial device, for example, through an RS-232 or USB
interface board.
n
Through a serial peripheral interface (SPI) port.
n
Through logic and voltage compatible universal asynchronous receiver/transmitter (UART).
n
Through a level translator to any serial device, for example, through an RS-232 or USB
interface board.
UART data flow
Devices that have a UART interface connect directly to the pins of the XBee Wi-Fi RF Module as shown
in the following figure. The figure shows system data flow in a UART-interfaced environment. Low-
asserted signals have a horizontal line over the signal name.
Serial data
A device sends data to the XBee Wi-Fi RF Module's UART through TH pin 3/SMT pin 4 (DIN) as an
asynchronous serial signal. When the device is not transmitting data, the signals should idle high.
For serial communication to occur, you must configure the UART of both devices (the microcontroller
and the XBee Wi-Fi RF Module) with compatible settings for the baud rate, parity, start bits, stop bits,
and data bits.
Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high).
The following diagram illustrates the serial bit pattern of data passing through the device. The
diagram shows UART data packet 0x1F (decimal number 31) as transmitted through the device.