EVM-915-DTS-BZS Linx Technologies, EVM-915-DTS-BZS Datasheet - Page 19

no-image

EVM-915-DTS-BZS

Manufacturer Part Number
EVM-915-DTS-BZS
Description
RF Development Tools 915 MHz Wireless Module DTS Brazil
Manufacturer
Linx Technologies
Type
Wi-Fir
Datasheet

Specifications of EVM-915-DTS-BZS

Rohs
yes
Product
Evaluation Modules
Tool Is For Evaluation Of
Wi.232DTSB-R
Frequency
915 MHz
Operating Supply Voltage
3 V to 3.6 V
Interface Type
UART
Factory Pack Quantity
1
Using Configuration Registers
CMD Pin
The CMD pin is used to inform the module where incoming UART
information should be routed. When the CMD pin is high or left floating, all
incoming UART information is treated as payload data and transferred over
the wireless interface. If the CMD pin is low, the incoming UART data is
routed to the command parser for processing. Since the module’s proces-
sor looks at UART data one byte at a time, the CMD line must be held low
for the entire duration of the command plus a 20µs margin for processing.
Leaving the CMD pin low for additional time (for example, until the ACK
byte is received by your application) will not adversely affect the module.
If RF packets are received while the CMD line is active, they are still
processed and presented to the module’s UART for transmission.
Preliminary Draft
Command Formatting
The DTS Series module contains several volatile and non-volatile
registers that control its configuration and operation. The volatile registers
all have a non-volatile mirror registers that are used to determine the default
configuration when power is applied to the module. During normal
operation, the volatile registers are used to control the module.
Placing the module in the command mode allows these registers to be
programmed. Byte values in excess of 127 (0x80 or greater) must be
changed into a two-byte escape sequence of the format: 0xFE, [value
- 128]. For example, the value 0x83 becomes 0xFE, 0x03. The follow-
ing function will prepend a 0xFF header and size specifier to a command
sequence and create escape sequences as needed. It is assumed that
*src is populated with either the register number to read (one byte, pass 1
into src_len) or the register number and value to write (two bytes, pass 2
into src_len). It is also assumed that the *dest buffer has enough space
for the two header characters plus, the encoded command, and the null
terminator.
Figure 39: Command and CMD Pin Timing
32
int EscapeString(char *src, char src_len, char *dest)
{
// The following function copies and encodes the first
// src_len characters from *src into *dest. This
// encoding is necessary for module command formats.
// The resulting string is null terminated. The size
// of this string is the function return value.
// ---------------------------------------------------
char src_idx, dest_idx;
// Save space for the command header and size bytes
// ------------------------------------------------
dest_idx = 2;
// Loop through source string and copy/encode
// ------------------------------------------
for (src_idx = 0; src_idx < src_len; src_idx++)
{
if (src[src_idx] > 127)
{
dest[dest_idx++] = 0xFE;
}/*if*/
dest[dest_idx++] = (src[src_idx] & 0x7F);
}/*for*/
// -------------------
dest[dest_idx] = 0;
// Add command header
// ------------------
dest[0] = 0xFF;
dest[1] = dest_idx – 2;
// Return escape string size
// -------------------------
return dest_idx;
}
Figure 40: Command Conversion Code
// Add null terminator
33
Preliminary Draft

Related parts for EVM-915-DTS-BZS