An RF Data Link Using Tango3 and Romeo2 RF Modules

Similar documents
Initializing the TSEC Controller

PQ-MDS-T1 Module. HW Getting Started Guide. Contents. About This Document. Required Reading. Definitions, Acronyms, and Abbreviations

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

etpu Host Interface by:

Genesi Pegasos II Setup

Programming Audio Applications in the i.mx21 MC9328MX21

Local Interconnect Network (LIN) Physical Interface

User Guide. Introduction. HCS12PLLCALUG/D Rev. 0, 12/2002. HCS12 PLL Component Calculator

PowerQUICC II Pro (MPC83xx) PCI Agent Initialization

Point-of-Sale (POS) Users Guide Lech José Olmedo Guerrero Jaime Herrerro Gallardo RTAC Americas

Installation of the MMA955xL CodeWarrior Service Pack Author: Fengyi Li Application Engineer

Windows 7: Using USB TAP on a Classic CodeWarrior Installation (MGT V9.2 DSC V8.3)

Flexible Active Shutter Control Interface using the MC1323x

Blood Pressure Monitor Using Flexis QE128 Gabriel Sanchez RTAC Americas

Understanding LCD Memory and Bus Bandwidth Requirements ColdFire, LCD, and Crossbar Switch

Freescale Embedded GUI Converter Utility 2.0 Quick User Guide

User Interface Design using CGI Programming and Boa Web Server on M5249C3 Board

Using WinUSB in a Visual Studio Project with Freescale USB device controller

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

Data Movement Between Big-Endian and Little-Endian Devices

MPC8245/MPC8241 Memory Clock Design Guidelines: Part 1

Handling Freescale Pressure Sensors

i.mx Applications Processors with Hantro's Multimedia Framework

Performance Monitor on PowerQUICC II Pro Processors

USB HID bootloader for the MC9S08JM60

Getting Started with the Student Learning Kit Featuring the Freescale HCS12 Microcontroller Application Module

Software Real Time Clock Implementation on MC9S08LG32

Improving Embedded Software Test Effectiveness in Automotive Applications

CodeWarrior Development Studio Floating Licensing Quick Start

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

Cyclic Redundant Checker Calculation on Power Architecture Technology and Comparison of Big-Endian Versus Little-Endian

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

IRTC Compensation and 1 Hz Clock Generation

MCF54418 NAND Flash Controller

3-Phase BLDC Motor Control with Hall Sensors Using 56800/E Digital Signal Controllers

VGA Output using TV-Out Extension Solution i.mx21

Hardware Configurations for the i.mx Family USB Modules

MC13783 Buck and Boost Inductor Sizing

Generate Makefiles from Command Line Support in Eclipse-Based CodeWarrior Software

SEMICONDUCTOR TECHNICAL DATA

Processor Expert Software Microcontrollers Driver Suite Getting Started Guide

Quick Start Guide. MRB-KW01 Development Platform Radio Utility Application Demo MODULAR REFERENCE BOARD

Connecting Low-Cost External Electrodes to MED-EKG

Using XGATE to Implement LIN Communication on HCS12X Daniel Malik 8/16-Bit Products Division East Kilbride, Scotland

Using the High Input Voltage Charger for Single Cell Li-Ion Batteries (KIT34671EPEVBE)

How To Control A Motor Control On An Hvac Platform

MSC8156 and MSC8157 PCI Express Performance

Detecting a CPM Overload on the PowerQUICC II

How To Fit A 2Mm Exposed Pad To A Dfn Package

SN54/74LS682 SN54/74LS684 8-BIT MAGNITUDE COMPARATORS SN54/74LS688 8-BIT MAGNITUDE COMPARATORS FAST AND LS TTL DATA 5-603

LOW POWER NARROWBAND FM IF

AN655 R ANGE TEST APPLICATION FOR EZRADIO AND EZRADIOPRO. 1. Introduction. 2. Supported Radio Types

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

Techniques and Tools for Software Analysis

How To Build A Project On An Eclipse Powerbook For Anarc (Powerbook) On An Ipa (Powerpoint) On A Microcontroller (Powerboard) On Microcontrollers (Powerstation) On Your Microcontroller 2 (Powerclock

Enhanced Serial Interface Mapping

USB Thumb Drive. Designer Reference Manual. HCS12 Microcontrollers. freescale.com. DRM061 Rev. 0 9/2004

TWR-KV31F120M Sample Code Guide for IAR Board configuration, software, and development tools Rev.0

Freescale Semiconductor, I

PD Storage Temperature Range Tstg 65 to +150 C Junction Temperature TJ 200 C

Building and Debugging a project using Keil MDK-ARM Eclipse plug-in

Software Marketing, Embedded Real-Time Solutions

Using the Performance Monitor Unit on the e200z760n3 Power Architecture Core

Using the Kinetis Security and Flash Protection Features

Real Time Development of MC Applications using the PC Master Software Visualization Tool. 1. Introduction. 2. Development of Motor Control.

Using the HC08 SCI Module

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

Connecting to an SMTP Server Using the Freescale NanoSSL Client

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

AN588 ENERGY HARVESTING REFERENCE DESIGN USER S GUIDE. 1. Kit Contents. 2. Introduction. Figure 1. Energy Harvesting Sensor Node

Using the XGATE for Manchester Decoding Lech Olmedo Guadalajara, Mexico Manuel Alves Austin, USA

MC33064DM 5 UNDERVOLTAGE SENSING CIRCUIT

UART Boot Loader Design on the Kinetis E Series

Prepared by: Paul Lee ON Semiconductor

How To Develop A Toolstick

P D Operating Junction Temperature T J 200 C Storage Temperature Range T stg 65 to +150 C

Freescale Variable Key Security Protocol Transmitter User s Guide by: Ioseph Martínez and Christian Michel Applications Engineering - RTAC Americas

AND8326/D. PCB Design Guidelines for Dual Power Supply Voltage Translators

AND9190/D. Vertical Timing Optimization for Interline CCD Image Sensors APPLICATION NOTE

ITU-T V.42bis Data Dictionary Search on the StarCore SC140/SC1400 Cores

MARKING DIAGRAMS LOGIC DIAGRAM PDIP 16 P SUFFIX CASE 648 DIP PIN ASSIGNMENT ORDERING INFORMATION CDIP 16 L SUFFIX CASE 620

ULN2803A ULN2804A OCTAL PERIPHERAL DRIVER ARRAYS

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

USB to SPI Interface Evaluation Board

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

Adding SDIO Wi-Fi Solution to i.mx Windows CE 5.0/Windows CE 6.0

AND8365/D. 125 kbps with AMIS-4168x APPLICATION NOTE

Freescale Semiconductor. Integrated Silicon Pressure Sensor. On-Chip Signal Conditioned, Temperature Compensated and Calibrated MPX5500.

LOW POWER SCHOTTKY. GUARANTEED OPERATING RANGES ORDERING INFORMATION

USB FM Radio-RD USB FM RADIO USER S GUIDE. 1. USB FM Radio Setup. One-time set-up enables configuration of presets and region specific FM band

Freescale Semiconductor. Integrated Silicon Pressure Sensor. On-Chip Signal Conditioned, Temperature Compensated and Calibrated MPX4080D.

MC14008B. 4-Bit Full Adder

USER GUIDE EDBG. Description

LOW POWER SCHOTTKY. GUARANTEED OPERATING RANGES ORDERING INFORMATION PLASTIC N SUFFIX CASE 648 SOIC D SUFFIX CASE 751B

AT89C5131A Starter Kit... Software User Guide

MED-AFEs Design Reference Manual

Table of Contents. ARM Evaluation Board (AEB-1) Welcome Guide ARM DGI 0005D. Proprietary Notice

AND9015. A Solution for Peak EMI Reduction with Spread Spectrum Clock Generators APPLICATION NOTE. Prepared by: Apps Team, BIDC ON Semiconductor

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Transcription:

Freescale Semiconductor Application Note AN2783 Rev. 0, 8/2004 An RF Data Link Using Tango3 and Romeo2 RF Modules by: John Logan 8/16-bit Division East Kilbride Introduction This document describes the setup and use of a simple RF link using the MC33493 RF transmitter (Tango3) and the MC33591/2/3/4 family of RF receiver ICs (Romeo2) using Tango3 and Romeo2 RF modules, MC9S08RG60 and MC68HC908AP64 Demo Boards, and the Tango/Romeo software drivers described in Application Note AN2707. The demo allows the user to set up a simple RF link between a Tango3/MC9S08RG60 transmitter and a Romeo2/MC68HC908AP64 receiver. The transmitter sends a message to the receiver when the user presses a button. The receiver flashes an LED to indicate correct reception of the message The link can be configured for different frequency bands (315 MHz, 434 MHz, 868 MHz, 915 MHz). Full source code is supplied to allow the user can modify the program or use it as the basis of other projects. The reader should be familiar with the Tango3 and Romeo2 device data sheets. Freescale Semiconductor, Inc., 2004. All rights reserved.

Requirements Figure 1. MC9S08RG60 and Tango3 RF Module Figure 2. MC68HC908AP64 and Romeo2 RF Module Requirements To set up the link, you must have the following hardware and software. MC9S08RG60 Demo Board (part no. DEMO9S08RG60) Tango RF module (part no MC33493MOD315 or MC33493MOD434 others may be available) MC68HC908AP64 Demo Board (part no. DEMO908AP64) Romeo2 RF module (part no MC33591MOD315 or MC33591MOD434 others may be available) 2 Freescale Semiconductor

MetroWerks CodeWarrior version 3.0 or later 'AN2783SW.zip' which contains the software files Programming Demo into the MC9S08RG60 MCU Using MC9S08RG60 Serial Monitor Programming Demo into the MC9S08RG60 MCU Using MC9S08RG60 Serial Monitor The Tango3 demo program must be programmed into the FLASH memory of the MC9S08RG60 Demo Board before it can be used. There are several programming tools available for the HC(S)08 MCU families that can be used for this purpose. This application note describes how to program the Mc9S08RG60 using a free evaluation copy of the CodeWarrior development environment and the MC9S08RG60 Demo Board s built-in serial monitor. To program the MC9S08RG60: 1. Install power select (PWR_SEL) jumpers 1 and 2 on the MC9S08RG60 Demo Board. Both jumpers must be installed. 2. Install all USER jumpers. 3. Connect the serial port connector on the MC9S08RG60 Demo Board to a PC comm. port using a 9-pin straight-through serial cable. 4. Connect 9V power supply or battery to power connector on MC9S08RG60 Demo Board. 5. Install CodeWarrior. NOTE You must have a copy of the CodeWarrior development tool for HC(S)08 installed. A copy of CodeWarrior is supplied with the MC9S08RG60 Demo Board. Follow the instructions supplied with the MC9S08RG60 Demo Board. 6. Unzip file Tango3RG60Demo.zip, which is contained within AN2783SW.zip. This unzips a CodeWarrior project containing the programming file for the monitor. 7. Start CodeWarrior (Start menu->metrowerks->codewarrior->codewarrior IDE). 8. Select File->Open and open the file Tango3RG60Demo.mcp. This opens a CodeWarrior project. 9. Press and hold the reset and SW1 switches on the MC9S08RG60 Demo Board. Release the reset switch while continuing to hold SW1. Then release SW1. This puts the demo board into 'serial monitor mode', ready to receive data from CodeWarrior. 10. In CodeWarrior, click on file 'main.c' in the Target window. Then press key F5 or select Project->Debug from the menu bar. This launches a debugger, which communicates with the MC9S08RG60 Demo Board and attempts to burn the demo program into FLASH memory on the MCU. 11. If the MCU's FLASH memory is blank, the debugger will program the Tango3 monitor into memory. You should see the screenshot shown in Figure 3, when programming is completed. Go to step 14. 12. If the MCU's FLASH memory is not blank, the debugger will report an error. Click OK in any error windows that appear, then select MONITOR-HCS08->Erase Flash from the menu bar. 13. Now select MONITOR-HCS08->Load from the menu bar. Select file 'Tango3RG60Demo.abs' from the project/bin directory. Freescale Semiconductor 3

Programming Demo into the MC9S08RG60 MCU Using MC9S08RG60 Serial Monitor 14. The debugger will now program the monitor into the MCU's FLASH memory. You should see screenshot shown in Figure 3, when programming is completed. 15. The monitor program has now been programmed into the MC9S08RG60 Demo Board. CodeWarrior is no longer required. Shut down all CodeWarrior windows and exit the program. Figure 3. Screenshot of Debugger after Programming Programming Demo into the MC68HC908AP64 MCU If the Romeo2 demo program has already been programmed into the MC68HC908AP64 Demo Board, the user can begin to use the monitor (see section 'Using The Software). Otherwise, the user must follow the programming procedure described below. 1. Install power select (PWR_SEL) jumpers 1 and 2 on the MC68HC908AP64 Demo Board. 2. Install VST_EN jumper. 3. Install MON_EN jumper. 4. Select setting DEBUG on COM_SEL header. 5. Install jumper across pins 1 and 2 of header OSC_SEL. 4 Freescale Semiconductor

USING THE DEMO 6. Install all USER_EN jumpers. 7. Connect the serial port connector on the MC68HC908AP64 Demo Board to a PC comm. port using a 9-pin straight-through serial cable. 8. Connect a 9V power supply or battery to the power connector on the MC68HC908AP64 board. 9. Install CodeWarrior. NOTE You must have a copy of the CodeWarrior development tool for HC(S)08 installed. A copy of CodeWarrior is supplied with the MC68HC908AP64 Demo Board. Please follow the instructions supplied with the demo board to install CodeWarrior. 10. Unzip file Romeo2AP64Demo.zip (contained within AN2783SW.zip). This unzips a CodeWarrior project containing the programming file for the monitor. 11. Start CodeWarrior (Start menu->metrowerks->codewarrior->codewarrior IDE). 12. Select File->Open and open the file Romeo2AP64Demo.mcp. This opens a CodeWarrior project. 13. In CodeWarrior, click on file 'main.c' in the Target window. Then press key F5 or select Project->Debug from menu. This launches the debugger, which communicates with the MC68HC908AP64 Demo Board and attempts to burn the Romeo2 demo program into FLASH memory on the MCU. The Attempting to contact target and pass security window should appear. Please make sure the following options are configured correctly. a. Target Hardware Type: Class 3 b. Serial Port: 1 (Depends on the PC COM Port) c. Baud: 9600 Baud d. Target MCU Security bytes: Check the IGNORE security failure and enter monitor mode check box. 14. Click the Contact target with these settings button and follow the instructions on the screen. When the Erase and Program Flash? window appears, click the Yes button. 15. Follow the on-screen instructions to cycle the MCU power. The CPROG08SZ Programmer window should close after the MCU FLASH is programmed. 16. The demo program has now been programmed into the FLASH memory of the MC68HC908AP64. Shut all CodeWarrior windows and exit the program. USING THE DEMO Tango3 Transmitter Hardware Setup The Tango3 RF module and the MC9S08RG60 Demo Board form an RF transmitter. The hardware should be set up as follows. 1. Connect the Tango3 RF Module to connector J1 on the Mc9S08RG60 Demo Board. Pin 1 on each board must be aligned. 2. Connect an antenna to the Tango3 RF module. Freescale Semiconductor 5

USING THE DEMO NOTE Tango3 RF modules are available in a range of frequencies; each is supplied with an appropriate antenna. 3. Install power select (PWR_SEL) jumpers 1 and 2 on the MC9S08RG60 Demo Board. Both jumpers must be installed. 4. Connect a 9V power supply or battery to the power connector on the MC9S08RG60 Demo Board. See Figure 1 for a reference setup. Romeo2 Receiver Hardware Setup The Romeo2 RF module and MC68HC908AP64 Demo Board form an RF receiver. The hardware should be set up as follows. 1. Connect the Romeo2 RF Module to connector J1 on the MC68HC908AP64 Demo Board. Pin 1 on each board should be aligned. 2. Connect an antenna to the Romeo2 RF module. NOTE Romeo2 RF modules are available in a range of frequencies; each is supplied with appropriate antenna. 3. Install power select (PWR_SEL) jumpers 1 and 2 on the MC68HC908AP64 Demo Board. Both jumpers must be installed. 4. Remove VST_EN jumper. 5. Remove MON_EN jumper. 6. Install jumper across pins 1 and 2 of header OSC_SEL. 7. Install jumper on COM setting of COM_SEL header. 8. Install all USER_EN jumpers. 9. Connect 9V power supply or battery to power connector on MC68HC908AP64 board. Refer to Figure 2 for a reference setup. Configuring the RF Link Frequency Band The Tango3 and Romeo2 RF modules are available for various frequency bands (315 MHz, 434 MHz, 868 MHz, 915 MHz). Each module is hard-wired to one frequency band. NOTE Please ensure that the Tango3 and Romeo2 modules used are both for the same frequency band. For the Tango3/MC9S08RG60 transmitter setup, no steps are required to configure the frequency band. The Romeo2/MC68HC908AP64 receiver setup requires an additional configuration step, to set up correctly Romeo2's internal registers. (Romeo2 has a register bit to define carrier frequency.) 6 Freescale Semiconductor

USING THE DEMO When the MC68HC908AP64 board powers up, it will flash LED1 to show the user the current frequency configuration. The number of flashes determines the selected frequency band (see Table 1). Table 1. Frequency Band Selection Number of Flashes Frequency Band 1 315 MHz 2 434 MHz 3 868 MHz 4 915 MHz The default value is 1 (315 MHz). To change frequency setup to another band: 1. Press and hold the reset button. 2. While holding the reset button, hold down S1. 3. Now release the reset button while holding S1. 4. Let LED flash for number of times required. Release the S1 key during the last flash. For example, if you wish to choose the 868 MHz band, S1 should flash three times. During the 3rd flash, release S1. The frequency band value is held in FLASH memory on the MC68HC908AP64, so it will be kept even after removing power from the board. S1 will flash to indicate the chosen frequency band, each time the board is reset. RF Link Description Pressing switches S1 or S2 on the MC9S08RG60 Demo Board will cause Tango3 to transmit a message. The message uses the 'Header' format described in Application Note AN2707. The message structure is shown in Figure 4. Preamble ID=0x55 Preamble ID=0x55 Preamble Header Length=2 Data Byte Data=0x00 Checksum EOM Preamble+ID repeats ten times RF Signal Length=2 Data Byte Data=0x00 Checksum SPI Output (Romeo2 to MCU) Figure 4. Message Frame Freescale Semiconductor 7

USING THE DEMO The message consists of a stream of ten Preamble and ID fields followed by transmission of Preamble, a Header field, a Length byte (fixed value of 2), two data bytes, a checksum byte, and an EOM field. The ID byte is fixed to 0x55. The first data byte of the message will increment when S1 pressed, decrement when S2 pressed. The second data byte is always 0x00. LED1 on the MC9S08RG60 Demo Board is lit when S1 is pressed; LED2 is lit when S2 is pressed. Romeo2 receives the message, strips the Preamble, ID, Header and EOM fields and passes the rest to the MC68HC908AP64 via its SPI interface. (See Figure 4.) The Romeo software driver then checks the message for errors. If there is no error, the message is passed to the MCU (note, the checksum byte is removed by the driver). The MCU then compares the first data byte in the message with the first data byte received in the previous message. If the values are different, it toggles an LED on port pin PTF0. If the values match, the LED is not toggled. Figure 5 shows the relationship between Tango3, Romeo3, the MCUs and the software drivers. User presses S1 or S2 MCU controls LEDs HC08 CPU RAM Buffer CPU writes message to RAM buffer Tango3 Driver Driver Manchester encodes message. Transmits using Tango3 Tango3 Tango3 sends OOK modulated message Romeo2 decodes message and removes Manchester Encoding Romeo2 Decoded message to MCU via SPI CPU reads message from RAM buffer Romeo2 Driver HC08 CPU RAM Buffer Driver reads message from buffer CPU writes message to buffer Figure 5. Block Diagram of RF Link Modifying the demo The Tango3 demo program uses a simple structure. It uses the software drivers described in AN2707. The Romeo2 demo is a little more complex; it uses Freescale s Standard Software Driver for HC908 0.5 µm Split Gate FLASH to allow storage of the carrier frequency setting in FLASH memory (these drivers and their documentation can be downloaded from www.freescale.com). Full source code is supplied for the demo. It is liberally commented and should be easy to understand. 8 Freescale Semiconductor

References References 1. MC33493 RF Transmitter IC (Tango3) data sheet 2. MC33591 RF Receiver (Romeo2) data sheet Trademarks CodeWarrior is a registered trademark of MetroWerks, Inc., a wholly owned subsidiary of Motorola, Inc. MetroWerks and the MetroWerks logo are registered trademarks of MetroWerks, Inc., a wholly owned subsidiary of Motorola, Inc. Freescale Semiconductor 9

How to Reach Us: USA/Europe/Locations not listed: Freescale Semiconductor Literature Distribution P.O. Box 5405, Denver, Colorado 80217 1-800-521-6274 or 480-768-2130 Japan: Freescale Semiconductor Japan Ltd. SPS, Technical Information Center 3-20-1, Minami-Azabu Minato-ku Tokyo 106-8573, Japan 81-3-3440-3569 Asia/Pacific: Freescale Semiconductor H.K. Ltd. 2 Dai King Street Tai Po Industrial Estate Tai Po, N.T. Hong Kong 852-26668334 Learn More: For more information about Freescale Semiconductor products, please visit http://www.freescale.com Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters which may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including Typicals must be validated for each customer application by customer s technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2004. AN2783 Rev. 0, 8/2004