DLP-RF1 & DLP-RF1-Z

DLP-RF1 & DLP-RF1-Z
USB / RF OEM Transceiver Module
The DLP-RF1-Z combines a USB interface, Freescale™ MC13193
2.4GHz Direct-Sequence Spread Spectrum RF Transceiver IC and
Freescale MC9S08GT60 microcontroller to form an IEEE 802.15.4
compliant, ZigBee™ ready, short-range transceiver module.
The MC9S08GT60 microcontroller is preprogrammed with
DLP Design’s Serial Interface Packet Processor (SIPP™ firmware)
for accessing the transceiver functions via simple serial calls. The
application programming required for accessing the module via USB
is functionally identical to that used to access the RS232C ports on a
standard Windows/Linux/Mac PC via the use of royalty-free Virtual
COM Port (VCP) drivers. (No USB driver development is required
for most applications.) The SIPP firmware in the DLP-RF1 resides at the application layer and is based
on Freescale’s SMAC. The SIPP firmware provides basic access to DLP-RF1 functionality: packet
receive and transmit, transceiver settings, EEPROM access, etc.
The MC9S08GT60 can be reprogrammed (if desired) with user-supplied firmware via a 6-pin BDM
header that is compatible with the P&E USB-ML-12 and other device programmers (purchased
separately).
Application Areas:
• Remote control and wire replacement in
industrial systems
• Wireless sensor networks
• Home automation and control
• Remote entertainment control
• Factory automation
• Heating and cooling systems
• Inventory management and RFID tagging
• Human interface devices
• Wireless toys
Features:
• All operational power taken from the host
PC
• Microcontroller pre-programmed with
SIPP firmware
• Carrier-sense, multiple-access technology
• USB interface programming as easy as
RS232C
Rev 1.5 (November 2005)
• Range: >500 feet (outdoor line of sight)
• Default reset via shorting two jumpers at
power-up
• Royalty-free USB drivers
• Agency approvals for immediate
deployment in the US, Canada, & Europe
• Modular approval – no additional agency
testing required under certain conditions
1
DLP-RF1/Z DLP Design, Inc.
1.0 System Overview
Using the pre-programmed SIPP firmware, the DLP-RF1 can be used in conjunction with other DLP-RF1
and/or DLP-RF2 modules to form simple point-to-point and star configuration systems. Both the
DLP-RF1 and the DLP-RF2 can serve as host/system controllers. In the case of the DLP-RF1, the host
is a user-supplied Windows, Linux, or Mac PC that is accessed via a USB interface and user-supplied,
6-foot USB cable. In the case of the DLP-RF2, the host is a user-supplied microcontroller/
DSP/FPGA/etc. that is accessed via a 2-wire serial interface–TX, RX, and ground. A host processor is
not necessarily required by the DLP-RF2. The SIPP firmware within the DLP-RF2 can be used to both
gain access to the MC9S08GT60’s port pins for basic digital I/O as well as offer a few hardware-specific
functions.
The DLP-RF1 can be used in conjunction with other DLP-RF1/DLP-RF2 transceivers as well as other
MC13193-based transceivers to form complex point-to-point and star networks.
In a system using the preprogrammed SIPP firmware, each transceiver has a unique 16-bit ID yielding a
theoretical maximum of 65,535 transceivers. Every data packet handled by the SIPP firmware must
contain, at minimum, the number of bytes in the packet, the destination transceiver ID (packet destination), the source transceiver ID (packet origin), and a command byte.
As shipped from DLP Design, the DLP-RF1 has an ID of 1. If more than one DLP-RF1 is to be used in a
system, then this ID must be changed to a value higher than 2 (the DLP-RF2 has a default ID value of 2).
Upon reset or power up, the ID is read from non-volatile (EEPROM) memory. If JP1 is shorted at power
up (or before a reset), the default ID for the DLP-RF1 is set to 1, and other transceiver settings are also
returned to a default state in the EEPROM. (Refer to Section 2.2 for additional details.)
2.0 Preprogrammed Serial Interface Packet Processor (SIPP) Firmware
The source code for Freescale’s SMAC is available as a free download from www.freescale.com. The
SIPP firmware is based on the SMAC.
A test program (DLP-RFTestAp.exe) is available as a free download from www.dlpdesign.com that
makes easy work of setting up the DLP-RF1 transceiver and testing its basic functionality. Use of the
DLP-RFTestAp.exe requires a USB interface between a host Windows PC and the DLP-RF1 as well as a
user-supplied 6-foot USB cable.
**Under this communication protocol, it is the responsibility of the host application to “Retry”
transmissions that do not produce the anticipated reply.**
Rev 1.5 (November 2005)
2
DLP-RF1/Z DLP Design, Inc.
2.1 Packet Structure
Each SIPP firmware packet is comprised of 6 or more bytes. The following table outlines the packet
structure:
PACKET STRUCTURE
Byte
0
Description
Number of bytes in the packet
following byte 0: 5-124
1
Destination ID MSByte
ID Range: 1-65535*
2
3
4
5
6
Destination ID LSByte
Source ID MSByte
Range: 1-65535
Source ID LSByte
Command Byte
Command Range: 0xA0-0xDF
Data Byte(s)
Comments
Each packet must contain (as a minimum) the
number of bytes, a destination ID, Source ID
and a command byte
ID:1 default for new DLP-RF1 transceivers
ID:2 default for new DLP-RF2 transceivers
ID:0 reserved for broadcast to all transceivers
Both Command Packets and Reply Packets.
Every packet must have a command byte.
0-119 bytes of data are allowed in the packet
*Note: Each transceiver in the system must have a unique ID. ID:0 is reserved for broadcast packets sent by
DLP-RF2 transceivers coming out of Sleep Mode.
2.2 Reserved EEPROM Locations
The EEPROM memory is a feature of the preprogrammed SIPP firmware and, as such, is only available
when using the DLP-RF1 with its firmware as shipped from DLP Design.
The EEPROM memory used by the SIPP firmware consists of a block of 32 bytes that reside within the
Flash program memory of the MC9S08GT60. The first 10 bytes (0-9) and the last byte (31) are reserved
for storing transceiver settings and checksum. Bytes 10 through 30 (user area) are available for use by
the user’s host software.
Whenever the data in any EEPROM location is changed, the checksum location (EEPROM Location 31)
is automatically updated. At power up or reset, if ever the calculated checksum for the first 31 bytes
does not match the value at EEPROM Location 31, the Default Reset values for the transceiver settings
are restored, and the checksum is recalculated and rewritten. The values in the user area are preserved.
Additionally, if JP1 is shorted at power up (or reset), the default values for the transceiver settings are
restored, and the checksum is recalculated and rewritten. Again, values in the user area are preserved.
The following table outlines usage of the reserved EEPROM locations. These values are read at power
up, reset, or via SIPP firmware:
Rev 1.5 (November 2005)
3
DLP-RF1/Z DLP Design, Inc.
EEPROM CONTENTS
Byte
0
1
2
3
4
5
6
7
8
Description
My ID MSB
My ID LSB
Options
Range: 1-65,535
Transceiver
Channel
RF Transmit Power
0-15 (2.405GHz to 2.480GHz)
Sleep Time Length
MSB (DLP-RF2
Low-Power Mode
Only)
Range: 1-65,535: 5-second increments,
3.8 days max.
Sleep Time Length
LSB
Wake from Sleep,
Host Command
Timeout after
Check-in (DLP-RF2
in Low-Power Mode
Only)
Baud rate for RF1-Z
and RF2 Host
Controller
Port Pin Bit Field
(DLP-RF2 Only)
DLP-RF2 Available
Features
(DLP-RF2 Only)
9
31
Checksum
0-15 (-16.6 to +3.5dBm into the balun)
Default Reset
1 for RF1; 2 for RF2
0 reserved for
broadcast commands
7 (2.440 GHz)
15 (+3.5dBm - Max
Power)
5 seconds
For Example: 1=5 seconds, 12=1
minute, 120=10 minutes, 720=1 hour,
17,280=1day
1-128 half-seconds
2 (4 half-second
intervals)
0-2400; 1-4800; 2-9600; 3-14400;
4-19200; 5-38400; 6-128000;
7-250000
0x00-0xFF (A6B6B5B4 B3B2B1B0)
2 (9600 baud)
Bit 7 – Measures battery voltage
Bit 6 – Temperature sensor
Bit 5 – Relays
Bit 4 – Reserved
Bit 3 – Reserved
Bit 2 – Reserved
Bit 1 – Reserved
Bit 0 – Reserved
EX-OR of bytes 0-30
All bits cleared; no
features available
0x80; A6 monitored
Calculated
2.3 Command Set
This Command Set is a feature of the preprogrammed SIPP firmware and, as such, is only available if
using the DLP-RF1 with its firmware as shipped from DLP Design.
Packets are broken down into two primary types: Command Packets and Reply Packets. The host
controller/PC originates all Command Packets. In the case of the DLP-RF1, the host is the user-supplied
host PC and associated application program.
If a Command Packet is received by the DLP-RF1 via USB with a destination ID that matches the ID
stored in the EEPROM of the DLP-RF1, then the MC9S08GT60 will process the packet and reply to the
host PC. If the ID in the packet does not match the ID stored in EEPROM, then the packet is intended
for a different destination and is transmitted via the transceiver.
Rev 1.5 (November 2005)
4
DLP-RF1/Z DLP Design, Inc.
If a packet is received via the RF transceiver with the correct ID, then the packet is either processed by
the MC9S08GT60 or forwarded on to the host. Commands between 0xA0 and 0xBF are Command
Packets that are to be processed by the MC9S08GT60, while commands between 0xC0 and 0xDF are
Reply Packets and are forwarded on to the host.
If a packet arrives via the RF transceiver with an ID of 0 (zero), then the packet is a “broadcast” packet
intended for the system controller (the RF1/RF2 unit that is designated as system controller). ID:0
packets are always immediately forwarded on to the host.
If a packet arrives via the RF transceiver with a non-zero ID that does not match the EEPROM, then the
packet is ignored. The only exception to this is if “Return All Packets” Mode is enabled, in which case
the DLP-RF1 is monitoring packet traffic, and all unsolicited packets are returned to the serial host.
**Under this communication protocol, it is the responsibility of the host application to “Retry”
transmissions that do not produce the anticipated reply.**
Cmd
0xA0
0xA1
Packet Recipient
MC9S08GT60
MC9S08GT60
0xA2
MC9S08GT60
0xA3
0xA4
MC9S08GT60
MC9S08GT60
0xA5
0xA6
MC9S08GT60
MC9S08GT60
0xA7
MC9S08GT60
0xA8
MC9S08GT60
0xA9
MC9S08GT60
0xAA
MC9S08GT60
0xAB
MC9S08GT60
0xAC
MC9S08GT60
0xAD
MC9S08GT60
0xAE
MC9S08GT60
0xAF
0xB6
MC9S08GT60
MC9S08GT60
0xB7
MC9S08GT60
Rev 1.5 (November 2005)
Description
Ping (no data)
Set Transmit Power Level
1 Data Byte; Range: 0-15
Set Transceiver Channel
1 Data Byte; Range: 0-15
Set RF2 Baud Rate (RF2 Only)
Release immediately to Sleep
(DLP-RF2 only) (no data)
Measure energy on all channels (no data)
Return all packets received to host
(Packet Watch Mode—no data)
Return only packets with correct ID to host
(Default mode) (no data)
Read EEPROM
1 Data Byte; Address: 0-31
Write EEPROM and update checksum
2 Data Bytes; Address: 0-30; Data: 0-255
Read I/O pin, 1 Data Byte: Port: 0-7 (RF2
Only)
Set I/O pin direction, 2 Data Bytes: Port: 07, Direction: 1=Out, 0=In (RF2 only)
Set/Clear I/O pin, 2 Data Bytes: Port: 0-7,
State: 0/1 (RF2 Only)
Setup A/D, 2 Data Bytes: Port: 0-6, Mode:
0=Off, 1=On (RF2 Only)
Read A/D, 1 Data Byte: Channel: 0-6 (RF2
Only)
Read VBAT (no data) (RF2 Only)
Request Board Type (DLP-RF1, RF2),
ROM and RFIC versions (no data)
Return Board ID (not available through RF
transceiver, physical connection only)
(destination ID ignored) (no data)
5
Expected
Reply Cmd
0xC0
0xC0
0xC0
0xC0
0xC0
0xC3
0xC0
0xC0
0xC4
0xC5
0xC6
0xC7
0xC8
0xC9
0xCA
0xCB
0xCD
0xCF
DLP-RF1/Z DLP Design, Inc.
0xB8
MC9S08GT60
0xB9
MC9S08GT60
0xC0
Serial / USB
0xC1
Serial / USB
0xC2
Serial / USB
0xC3
Serial / USB
0xC4
Serial / USB
0xC5
0xC6
0xC7
0xC8
0xC9
0xCA
Serial / USB
Serial / USB
Serial / USB
Serial / USB
Serial / USB
Serial / USB
0xCB
Serial / USB
0xCC
Serial / USB
0xCD
Serial / USB
0xCF
Serial / USB
0xD0
0xD1
Serial / USB
Serial / USB
Pulse high/low with delay while high (For
DLP-RF2RELAY Only; additional hardware
required) 2 Data Bytes: Relay Number: 1/2,
State: 0/1 (RST/SET) (RF2 Only)
Read Temperature and Humidity (DLP-RF2
only; additional hardware required) (no
data) Refer to RFTestAp source code for
data processing details (RF2 Only)
Generic Reply or “ACK” for selected
non-broadcast commands
Check-in from DLP-RF2 due to monitored
port pin input change. 2 Data Bytes:
Current I/O pin state (A6, B6:0), Bit-field
with bits set for the port pins that changed
state (A6, B6:0)
Check-in from DLP-RF2 due to wake from
sleep (no data)
Measured energy data, 16 Data Bytes:
Channel 0 – channel 15 energy levels,
Refer to RFTestAp source code for data
processing details
EEPROM read reply, 1 Data Byte:
EEPROM Read data
Write EEPROM reply (no data)
Read I/O pin reply, 1 Data Byte: pin state
Set direction reply (no data)
Set/Clear I/O pin reply (no data)
Setup A/D reply (no data)
Read A/D reply, 2 Data Bytes: ATD1RH,
ATD1RL, voltage result =
((ATD1RH << 8) | ATD1RL) * Vref / 1024
Read VBAT reply, 2 Data Bytes: ATD1RH,
ATD1RL, Refer to RFTestAp source code
for data processing details
Read Temperature & Humidity reply, Refer
to RFTestAp source code for data
processing details
Return board type--uC ROM and RF IC
versions, 3 Data Bytes: Module Mode:
100:RF1, 101:RF2, ROM Version: divide by
10 for version, RF IC Version byte
Return ID, 2 Data Bytes: Board ID MSByte,
LSByte
Generic packet send
Generic packet reply
0xC0
0xCC
Example: Below is a simple C program illustrating the Ping (0xA0) Command. This assumes the
presence of a transceiver with an ID of 1 issuing the Ping command and a second transceiver with an ID
of 0x13 (19 decimal) to receive and respond to the Ping command:
Rev 1.5 (November 2005)
6
DLP-RF1/Z DLP Design, Inc.
int m_DestID = 0x13;
int m_SourceID = 0x01;
unsigned char rx[126], tx[126];
int pos=1;//init packet index
tx[pos++] = (unsigned char)((m_DestID&0xff00)>>8); //Destination ID MSB
tx[pos++] = (unsigned char)(m_DestID&0x00ff);
//Destination ID LSB
tx[pos++] = (unsigned char)((m_SourceID&0xff00)>>8); //Source ID MSB
tx[pos++] = (unsigned char)(m_SourceID&0x00ff);
//Source ID LSB
tx[pos++] = 0xA0;//Command byte: Ping
tx[0] = pos-1;//assign number of bytes in packet to position zero
PutBuffer(tx, pos);//send tx out serial port (actually USB)
GetBuffer(rx, 6, TIMEOUTWAIT); //wait up to timeout for 6 bytes to return
if(rx[5] != 0xC0)//if Buffer Position 5 is not the expected reply (0XC0)
{
//No reply to the Ping command
//either retry the command or process the error
}
2.4 Antenna Switch Control
The antenna switch used on the DLP-RF1 is of single-pole, double-throw configuration and is controlled
by microcontroller port pins. When Port Pin PTA7 is low, the switch is in Transmit Mode and the RF is
passed from the MC13193 PA output to the antenna. When Port Pin PTA7 is high, the switch is in
Receive Mode and the antenna is connected to the receiver input.
If using the SIPP firmware as shipped from DLP Design, the DLP-RF1 will set the correct mode
automatically. This information is only made available in the event that the user wishes to reprogram the
microcontroller with custom firmware.
Port Pin PTA7
0
1
TX Mode
RX Mode
3.0 USB Interface
The VCP (Virtual COM Port) USB drivers can be downloaded from the bottom of the page at
www.dlpdesign.com. [Windows XP (SP1 or later) and Linux (Kernel 2.4.0 or later) users do not need to
download drivers as they are already part of the operating system.] Unzip the drivers into a folder on the
PC’s hard drive. The USB driver installation process is initiated by connecting a DLP-RF1 to the host
PC. When prompted, point the driver installer to the folder in which the VCP drivers reside.
The DLP-RF1 uses a USB interface design similar to that used by the DLP-USB245M USB adapter
module in that the connection between the USB IC and MC9S08GT60 consists of 8 data lines and 5
hand-shaking lines. The DLP-RF1 uses a USB interface design similar to that used by the DLPUSB232M USB adapter module in that the connection between the USB IC and MC9S08GT60 consists
of the TX, RX, CTS and RTS lines. Once the VCP drivers are installed, the DLP-RF1 appears to the
host PC as a COM (RS232C) port. Look in Device Manager to determine the COM port number that is
assigned to the DLP-RF1 module. The application program running on the host PC simply has to open
what appears to be an RS232C port then build and send a packet to gain access to/control of the DLPRF1. The VCP drivers intercept the data packets on their way to the RS232C COM port and reroute
Rev 1.5 (November 2005)
7
DLP-RF1/Z DLP Design, Inc.
them to the USB port. All packets returned from the DLP-RF1 simply appear in the receive buffer that
was created when the COM port was opened.
The host application must set the baud rate to 9600 baud if using the DLP-RF1-Z. This baud rate can be
changed by the host application once connection has been made to the RF1-Z. There is no need for the
host application to set the baud rate of the opened COM port to the DLP-RF1.
Since the host application is responsible for “retrying” any command packet that goes unanswered, the
host application must wait an appropriate amount of time for all responses. The amount of time to wait
for a reply is dependant upon several factors so it is best for the user to derive empirically (trial and error)
the appropriate amount of time to wait.
Rev 1.5 (November 2005)
8
DLP-RF1/Z DLP Design, Inc.
4.0 Regulatory Agency Considerations
4.1 Agency Identification Numbers
Compliance with the appropriate regulatory agencies is essential in the deployment of all transceiver
devices. DLP Design has obtained modular approval for this RF product such that an OEM need only
meet a few basic requirements in order to utilize their end product under this approval. Corresponding
agency identification numbers are listed here:
Part Number
DLP RF1
US/FCC
SX9000RF1
CAN/IC
5675A-000RF1
4.2 Integral Antenna
The DLP-RF1 is approved for use with the integral antenna only. Modifying the DLP-RF1’s PCB antenna
or modifying the PCB to use an external antenna will void all agency compliance.
4.3 FCC/IC Requirements for Modular Approval
Any changes or modifications to the DLP-RF2’s printed circuit board could void the user’s authority to
operate the equipment.
4.3.1 Warnings
Operation is subject to the following two conditions: (1) This device may not cause harmful interference,
and (2) this device must accept any interference received, including interference that may cause
undesirable operation.
This device is intended for use under the following conditions:
1. The transmitter module may not be co-located with any other transmitter or antenna.
2. The module is approved using the FCC “unlicensed modular transmitter approval” method.
As long as these two conditions are met, further transmitter testing will not be required. However, the
OEM integrator is still responsible for testing their end product for any additional compliance measures
necessitated by the installation of this module (i.e. digital device emissions, PC peripheral requirements,
etc.).
Note: In the event that these conditions cannot be met (i.e. co-location with another transmitter), then
the FCC authorization is no longer valid and the corresponding FCC ID may not be used on the final
product. Under these circumstances, the OEM integrator will be responsible for re-evaluating the end
product (including the transmitter) and obtaining a separate FCC authorization.
Rev 1.5 (November 2005)
9
DLP-RF1/Z DLP Design, Inc.
4.3.2 OEM Product Labeling
The final end product must be labeled in a visible area with the following text:
“Contains TX FCC ID: SX9000RF1”
4.3.3 RF Exposure
Note: In order to comply with FCC RF exposure compliance requirements, the antenna used for this
transmitter must not be co-located or operating in conjunction with any other antenna or transmitter.
4.3.4 Additional Information for OEM Integrators
The end user should NOT be provided with any instructions on how to remove or install the DLP-RF1.
5.0 Disclaimer
Neither the whole nor any part of the information contained herein nor the product described in this
datasheet may be adapted or reproduced in any material or electronic form without the prior written
consent of the copyright holder.
This product and its documentation are supplied on an as-is basis, and no warranty as to their suitability
for any particular purpose is either made or implied. DLP Design will not accept any claim for damages
whatsoever arising as a result of use or failure of this product. Your statutory rights are not affected.
This product or any variant of it is not intended for use in any medical appliance, device, or system in
which the failure of the product might reasonably be expected to result in personal injury.
This document provides preliminary information that may be subject to change without notice.
6.0 Contact Information
DLP Design, Inc.
1605 Roma Lane
Allen, TX 75013
Phone: 469-964-8027
Fax:
415-901-4859
Email: [email protected]
Internet: http://www.dlpdesign.com
Rev 1.5 (November 2005)
10
DLP-RF1/Z DLP Design, Inc.