Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless...

12
Panasonic PAN802154 Wireless Interface to C-MAX Clock Module 21 June 2007 Application Note (DKAN0011A) Features Panasonic PAN802154HAR00 Communication Module Freescale Codewarrior Development Tools Freescale Beekit Wireless Connectivity Toolkit P & E USB Multilink Debugger/Programmer C-MAX CMMC-8 Radio Controlled Clock Module / Test Board C-MAX CMMC-8 Demo Application (.NET software application) Introduction This application note demonstrates using Panasonic PAN802154 communication modules to implement a 802.15.4 based serial communication link between a PC and C-MAX radio controlled clock module. A PC is connected via RS232 to a Panasonic wireless module (Coordinator) on one side and the C-MAX clock test board is connected through RS232 to a Panasonic wireless module (Endpoint) on the other side. Freescale’s Codewarrior Development tools and Beekit Wireless Connectivity Toolkit are used to develop the 802.15.4 based wireless UART firmware. P&E’s USB Multilink is used to program the firmware into the microcontroller. C-MAX’s CMMC-8 demo application runs on the PC and accesses the clock module over the wireless serial link. Background The Panasonic PAN802154HAR00 module utilizes Freescale’s MC13193 2.4GHz radio and MC9S08GT60 microcontroller (it is based upon the Freescale ZigBee Sensor Application Reference Design (SARD) development platform). Like the SARD, the PAN802154 can utilize a variety of Freescale-provided software such as SMAC (Simple MAC), 802.15.4 MAC and ZigBee Protocol Stack. Page 1 of 12

Transcript of Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless...

Page 1: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

21 June 2007

Application Note (DKAN0011A)

Features • Panasonic PAN802154HAR00 Communication Module • Freescale Codewarrior Development Tools • Freescale Beekit Wireless Connectivity Toolkit • P & E USB Multilink Debugger/Programmer • C-MAX CMMC-8 Radio Controlled Clock Module / Test Board • C-MAX CMMC-8 Demo Application (.NET software application)

Introduction This application note demonstrates using Panasonic PAN802154 communication modules to implement a 802.15.4 based serial communication link between a PC and C-MAX radio controlled clock module. A PC is connected via RS232 to a Panasonic wireless module (Coordinator) on one side and the C-MAX clock test board is connected through RS232 to a Panasonic wireless module (Endpoint) on the other side. Freescale’s Codewarrior Development tools and Beekit Wireless Connectivity Toolkit are used to develop the 802.15.4 based wireless UART firmware. P&E’s USB Multilink is used to program the firmware into the microcontroller. C-MAX’s CMMC-8 demo application runs on the PC and accesses the clock module over the wireless serial link.

Background The Panasonic PAN802154HAR00 module utilizes Freescale’s MC13193 2.4GHz radio and MC9S08GT60 microcontroller (it is based upon the Freescale ZigBee Sensor Application Reference Design (SARD) development platform). Like the SARD, the PAN802154 can utilize a variety of Freescale-provided software such as SMAC (Simple MAC), 802.15.4 MAC and ZigBee Protocol Stack.

Page 1 of 12

Page 2: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

In this application note, Freescale’s 802.15.4 MAC software is utilized. “Coordinator” firmware is developed for the PC side of the connection and “Endpoint” firmware for the clock module side. The C-MAX CMMC-8 radio controlled clock module receives and decodes the WWVB radio signal to maintain a highly accurate clock. WWVB (as defined in Wikipedia) is “a special NIST time signal radio station near Fort Collins, Colorado. WWVB is the station that radio-controlled clocks throughout North America use to synchronize themselves. The signal transmitted from WWVB is a continuous 60 kHz carrier wave, derived from a set of atomic clocks located at the transmitter site. A 1 bit-per-second time code, which is derived from the same set of atomic clocks, is then modulated onto the carrier wave using a technique described as pulse width modulation followed by amplitude-shift keying. The time in this code is given in UTC (Coordinated Universal Time), which the radio-controlled clocks then have to convert to their own local time. A single complete frame of time code lasts one minute.”

Application First step of the application is to develop the firmware for the 802.15.4 wireless UART interface between the two Panasonic modules. Two firmware modules are developed, one for the “Coordinator” and one for the “Endpoint”. This is accomplished by using Freescale’s BeeKit Wireless Connectivity Toolkit (download from www.freescale.com/zigbee) in conjunction with their Codewarrior development tools. Install and start “Freescale BeeKit”…

Digi-Key Corporation Page 2 of 12

Page 3: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

Under “File” tab “Select Codebase” and set Beekit MAC Codebase for 802.15.4…

Under “File” select “New Project” and choose “MyWirelessApp Demo 06 (Coordinator)”. This template was selected because it provides wireless UART capability. Coordinator firmware is developed first and then the process is repeated to develop the endpoint firmware.

Digi-Key Corporation Page 3 of 12

Page 4: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

When BeeKit Project Wizard starts, under Platform settings select “MC13192-SARD” for Platform type

ontinue through the BeeKit Project, leave default settings for Basic configuration and Application

and “check” UART module enabled..

Cspecific and select Finish.

Digi-Key Corporation Page 4 of 12

Page 5: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

Next “Validate” under Solution tab and then “Export Solution” in preparation to using Codewarrior to

In the directory where the project was exported, select ”MyWirelessApp Demo 06 (Coordinator).xml”.

compile the code and program the Panasonic modules .

Digi-Key Corporation Page 5 of 12

After solution has been successfully exported, start Freescale Codewarrior development tools and select “Import Project” under File tab …

Page 6: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

After the xml file has been imported, name and save the new project.

he “new project demo 6 coordinator.mcp” project has been created.

T

Digi-Key Corporation Page 6 of 12

Page 7: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

There are minor differences between Freescale’s SARD development board and Panasonic’s PAN802514

he second file, “Application/UartUtil/UartUtil.h”, needs to be changed to 9600 baud rate as shown ule.

module so two files need to be modified. For the first file “PLM/Interface/TargetMC1319xSARD.h” change the value of PTCD to “0x5c” as shown below. This change enables the RS232 interface on thePanasonic module.

Change to 0x5c

Tbelow. Baud rate is changed to 9600 to be compatible with the serial interface on C-MAX clock modSave the files and select Make to create the binary file for programming in to the Panasonic module.

Change to 9600

Make

Digi-Key Corporation Page 7 of 12

Page 8: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

Connect power cable and P&E USB Multilink programming cable to the Panasonic PAN802514 module

lug P&E USB Multilink into PC and apply power to the Panasonic module. In Codewarrior, select ware

t this stage the “new project demo 6 coordinator” firmware has been programmed into the Freescale r

he next phase of the application is to repeat the previous step on a second Panasonic module to create an

as shown below.

P&E Multilink ble programming ca

RS232 cable

Power V)

PDebug to start the ICD – Connection Manager and select Connect to erase and program the new firminto the module.

Amicrocontroller on the Panasonic module. This module is configured as a wireless 802.15.4 Coordinatowith an RS232 interface. TEnd device. This accomplished by starting up a new project in Beekit and select “MyWirelessApp Demo 06 (EndDevice)”. Repeat all the same steps in Beekit and Codewarrior on the EndDevice software to program the second module. After programming, the second Panasonic module is configured as a wireless 802.15.4 End device.

cable (3

Panasonic 4 module PAN80251

Connect

Digi-Key Corporation Page 8 of 12

Page 9: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

Attach the serial cable from the Panasonic “Coordinator” module into the PC’s serial port.

ttach the serial cable from the Panasonic “End device” module into the serial port on the C-MAX

Serial cable connected to PC

PAN802514 module “Coordinator”

ACMMC-8 test board. .

3V battery pack

CMMC-8 clock

module

PAN802154

ice” module “End dev

C-MAX test CMMC-8

board

Note: it is not necessary to have P&E USB Multilink connected to module after being programmed

Digi-Key Corporation Page 9 of 12

Page 10: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

Apply power to both of the PAN802514 modules, a red LED will start blinking. Press the pushbutton first on the Coordinator module and next on the End device module (red LEDs will be on). Now turn power switch on the C-MAX CMMC-8 Test Board to on position (green LED will be on).

enter pushbutton LED

PAN802514

Power

switch

Green

CMMC-8 test board

LED

Digi-Key Corporation Page 10 of 12

Page 11: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

On the PC, run the C-MAX CMMC-8 demonstration program “DemoApplication.exe”.

ith the communication link established, all the various CMMC-8 commands can be executed wirelessly

A Windows XP based laptop PC installed with Freescale’s Codewarrior (v5.0) development tools and C-

This application note demonstrates the ease of creating a wireless serial connection using Panasonic

the

Wfrom the PC.

Depending on the C-MAX module’s location within a building and noise conditions, it may be difficult to synchronize with the WWVB signal. For purposes of demonstrating the wireless communication link in the application it is not necessary to have a successful synchronization.

Capabilities, Limitations, and Alterations

MAX’s CMMC-8 demo application software was used in this application.

Conclusion

PAN802514 communication modules with Freescale’s Beekit Wireless Connectivity Toolkit. The C-MAX radio controlled clock provides a practical demonstration of serial communication to a PC overwireless 802.15.4 link.

Digi-Key Corporation Page 11 of 12

Page 12: Panasonic PAN802154 Wireless Interface to C … Design/Digi-Key...Panasonic PAN802154 Wireless Interface to C-MAX Clock Module In this application note, Freescale’s 802.15.4 MAC

Panasonic PAN802154 Wireless Interface to C-MAX Clock Module

Additional Information Reference material used in this application listed below: Freescale 802.15.4 Media Access Controller (MAC) MyWirelessApp Users Guide Doc: 802154MWAUG BeeKit Wireless Connectivity Toolkit Users Guide Doc: BKWCTKUG BeeKit Wireless Connectivity Toolkit Quick Start Guide Doc: BKWCTKQSG Sensor Applications Reference Design (SARD) Users Guide Doc: MC13192SARDUG Panasonic LR-WPAN Module P/N PAN802154HAR Application Notes C-MAX Time Solutions CMMC-8 Demo Application Manual

Appendix A: C-MAX Demonstration Software. C-MAX CMMC-8 demo application can be downloaded at: http://www.c-max-time.com/downloads/index.php

Disclaimer Digi-Key offers its Technical Assistance and Design Support Services as a convenience to Digi-Key customers. Digi-Key Technical Assistance and Design Support Services personnel strive to provide useful information regarding Digi-Key products. DIGI-KEY DOES NOT GUARANTEE THAT ANY INFORMATION OR RECOMMENDATION PROVIDED IS ACCURATE, COMPLETE, OR CORRECT, AND DIGI-KEY SHALL HAVE NO RESPONSIBILITY OR LIABILITY WHATSOEVER IN CONNECTION WITH ANY INFORMATION OR RECOMMENDATION PROVIDED, OR THE CUSTOMER'S RELIANCE ON SUCH INFORMATION OR RECOMMENDATION. THE CUSTOMER IS SOLELY RESPONSIBLE FOR ANALYZING AND DETERMINING THE APPROPRIATENESS OF ANY INFORMATION OR RECOMMENDATION PROVIDED BY DIGI-KEY TECHNICAL ASSISTANCE AND DESIGN SUPPORT SERVICES PERSONNEL, AND ANY RELIANCE ON SUCH INFORMATION OR RECOMMENDATION IS AT THE CUSTOMER'S SOLE RISK AND DISCRETION. ACCORDINGLY, THE CUSTOMER SHALL RELEASE AND HOLD DIGI-KEY HARMLESS FROM AND AGAINST ANY AND ALL LOSS, LIABILITY, AND DAMAGE INCURRED BY THE CUSTOMER OR ANY THIRD PARTY AS A RESULT OF ANY INFORMATION OR RECOMMENDATION PROVIDED TO THE CUSTOMER OR THE CUSTOMER'S RELIANCE ON SUCH INFORMATION OR RECOMMENDATION.

Digi-Key Corporation Page 12 of 12