Table of Contents

Advertisement

Quick Links

User's Manual
TK-78K0R/KG3+UD
TM
ZigBee
-ready
Wireless Network Evaluation Board
Using the UZ2400 RF chip
and the 78K0R/KG3 Microcontroller
Date published: October 2009
Rev. 3.0
© TESSERA TECHNOLOGY INC. 2009
Printed in Japan
- 1 -

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TK-78K0R/KG3+UD and is the answer not in the manual?

Questions and answers

Summary of Contents for TESSERA TK-78K0R/KG3+UD

  • Page 1 User’s Manual TK-78K0R/KG3+UD ZigBee -ready Wireless Network Evaluation Board Using the UZ2400 RF chip and the 78K0R/KG3 Microcontroller Date published: October 2009 Rev. 3.0 © TESSERA TECHNOLOGY INC. 2009 Printed in Japan - 1 -...
  • Page 2 Welcome to the world of TK-78K0R/KG3+UD. You are now being navigated to the design environment of the 78K0R microcontroller for developing wireless network applications. Please follow the tutorial step by step. - 2 -...
  • Page 3 TESSERA TECHNOLOGY INC. TESSERA TECHNOLOGY INC. assumes no liability for infringement of patents or copyrights of third parties by or arising from use of a product described herein.
  • Page 4: Table Of Contents

    Contents INTRODUCTION................... 8 PREPARATIONS..................10 Development Tools, Sample Programs, and the MAC Library........11 2.1.1 Integrated Development Environment PM + V6.31 ............11 2.1.2 Device file DF781188 V3.00 ..................... 11 2.1.3 C Compiler CC78K0R W2.12 : Code size limited version..........11 2.1.4 Assembler RA78K0R W1.33 : Code size limited version ..........
  • Page 5 3.4.1 "Output1" Tab ........................44 3.4.2 "Output2" Tab ........................46 Configuration of Compiler Option................47 3.5.1 "Extend" Tab ........................47 3.5.2 "Startup Routine" Tab ....................... 48 Configuration of Debugger setting ................49 TK board setting ......................51 Creating execution format ................... 52 Starting integrated debugger (ID78K0R-QB) ..............
  • Page 6 4.2.4 SW5 ..........................83 4.2.5 JP1............................ 84 4.2.6 LED1 ..........................84 4.2.7 LED2, LED3 and LED4..................... 84 4.2.8 FP1 ........................... 85 4.2.9 CON2 ..........................85 4.2.10 U1 ............................. 85 Universal Area ......................85 Solder-short pad......................85 Power supply ........................ 86 THE IEEE 802.15.4 MAC SAMPLE PROGRAM ........
  • Page 7 7.3.1 Change display of buttons ....................112 7.3.2 Display source list and function list................. 112 7.3.3 Set/delete breakpoints ....................113 7.3.4 Display global variables ....................114 7.3.5 Display global variables while programs are running ............. 115 7.3.6 Display local variables ....................116 7.3.7 Display memory and SFR contents ................
  • Page 8: Introduction

    → Guide to the basic operations of PM + and the integrated debugger using sample programs. Chapter 4 Hardware Specifications →Explain the hardware of TK-78K0R/KG3+UD Chapter 5 IEEE 802.15.4 MAC Sample Programs → Learn sample programs, which utilize the MAC library Chapter 6 Troubleshooting →Describe how to solve troubles you may face, such as errors when...
  • Page 9 Chapter 8 Mode Setting of the Board → Explanation of switch setting. Trademark Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Adobe and Acrobat are trademarks of Adobe Systems Incorporated (Adobe System Incorporated).
  • Page 10: Preparations

    2 Preparations This chapter introduces the development environment and describes how to install the sample programs. The sample program can be tested on this hardware platform of the evaluation kit. - 10 -...
  • Page 11: Development Tools, Sample Programs, And The Mac Library

    Development Tools, Sample Programs, and the MAC Library This section outlines the development tools, sample programs and the MAC library used in this tutorial. 2.1.1 Integrated Development Environment PM + V6.31 This is a project manager, where you work for editing the source code, compiling it, and initiating the debugger.
  • Page 12: Starter Kit Usb Driver

    2). Text chat between a coordinator and an end device To use the MAC Sample Program 1, you need to prepare at least two PC with a USB interface and two TK-78K0R/KG3+UD boards. The MAC Sample Program 1 is provided in the form of the C source codes.
  • Page 13: The Mac Sample Program2 : Led Control

    To use the MAC Sample Program 2, you need to prepare one PC with a USB interface and two TK-78K0R/KG3+UD boards or more boards, up to The MAC Sample Program 2 is provided in the form of the C source codes.
  • Page 14: Installation Of Software Development Tools

    Installation of Software Development Tools 2.2.1 Start-up of the installation CD-ROM The attached CD-ROM contains Development Tools, documents and sample soft ware. You can install it using an installer. 2.2.2 Installation of the software development tools. Please insert the CD-ROM in the drive. The installer will show up automatically. If it does not start automatically, please initiate it by double clicking the SETUP.EXE.
  • Page 15 <3> Documents Manuals of development tools and the evaluation kit are available in PDF files. When this button is clicked, the WWW browser will start. Adobe® Acrobat® Reader is available in the CD-ROM. <4> Sample Program Click this button to start the WWW browser for the sample program and the tutorial.
  • Page 16 Select products that you need to install. ① (as default, all the products that you need to use the demostration kit are selected.) "Explain" area displays an explanation of the selected product. To change the installation destination, click Browse… . When all the settings are completed, click Install…...
  • Page 17 Click OK when "Install" comfirmation dialog box is opened. ② Read "software license agreement" and click Yes for continuing the ③ installation.To stop the installation, click No . - 17 -...
  • Page 18 Enter the product ID, and click Next . ④ * The product ID is available on the “README.html” the other sheet. It starts copying the files. ⑤ - 18 -...
  • Page 19 When the installation is completed, the following dialog opens. ⑦ Click OK . "NEC Electronics Starter Kit Virtual UART" USB driver must be installed on ⑧ PC before you connect to TK-78K0R/KG3+UD. Install the USB driver by referring "2.3USB Driver". - 19 -...
  • Page 20 Notes on the installation authority To install this tool in Windows 2000 or XP, the authority of a administrator is necessary. Therefore, please login as an administrator. Notes on the install-directory Please do not use 2-byte characters, such as umlaut in the directory name, where the product is to be installed.
  • Page 21: Uninstall

    2.2.3 Uninstall <1> Start "Add /Remove Programs" in the Control Panel. (Example here is based on Windows2000) <2> Select the tool that you want to uninstall from the list displayed in "Install/Uninstall" and click [Add/Remove...]. <3> A dialog box for confirming deletion of files will be displayed. Click .
  • Page 22: File Configuration In Pc

    2.2.4 File Configuration in PC Software Development Tools are installed in "C:¥Program Files¥NEC Electronics Tools" on default setting. When you use the tools, please open the tools from [Start menu] -> [Programs]->[NEC Electronics Tools]. - 22 -...
  • Page 23: Usb Driver

    "Starter Kit USB Driver" must be installed on the PC. If not, please refer to "2.2 Installation of Software Development Tools" to install the “Starter Kit USB Driver” first. Attention Do not use a USB hub for connecting TK-78K0R/KG3+UD. Depending on the version of Windows OS, the installation will be differed.
  • Page 24: Install To Windows Xp

    2.3.1 Install to Windows XP Once the TK-78K0R/KG3+UD is connected with USB, the "Found New Hardware 1. Wizard" will be started. Select "No, not this time" and click Next > Select "No, not this time" Click "Next" Select "Install from a list or specific location" and click Next >...
  • Page 25 Select "Search for the best driver in these locations.” , check "Include this location in 3. the search:", and then click "Browse..." to select the driver directory path. The path should be "C:¥Program Files¥NEC Electronics Tools¥TK-driver" as default installation. If the installation directory is not default, then select "TK-driver" under the installation directory.
  • Page 26 The installation of "NEC Electronics Starter Kit Virtual UART" driver is completed. 5. Click Finish . Click "Finish" Go to "1.3.3 Completion of the installation". 6. - 26 -...
  • Page 27: Install To Windows2000

    2.3.2 Install to Windows2000 1. Once the TK-78K0R/KG3+UD is connected with USB, the "Found New Hardware Wizard" will be started. Select "No, not this time" and click Next > Click - 27 -...
  • Page 28 2. Select "Search for a suitable driver for my device". Click Next > Select "Search for a suitable driver for my device" Click "Next" 3. Select "Specify a location". Click Next > Select "Specify a location" Click "Next" - 28 -...
  • Page 29 Select the driver directory path. The path should be "C:¥Program Files¥NEC 4. Electronics Tools¥TK-driver" as default installation. If the installation directory is not default, then select "TK-driver" under the installation directory. Click OK . Click "OK" Select the driver directory Click Next >...
  • Page 30 The installation of "NEC Electronics Starter Kit Virtual UART" driver is completed. 6. Click Finish . Click Go to "1.3.3 Confirmation of the installation". 7. - 30 -...
  • Page 31: Confirmation Of The Installation

    UART(COMx)” exists. The screen above shows that the COM port number is "COM8". If ID78K0R-QB is not in use, you can use this port number for connecting TK-78K0R/KG3+UD. When you change the USB port connection, the COM port number will be changed as well.
  • Page 32: Sample Environment

    Sample Environment This section explains the overview and preparation of sample programs. You need to install the sample programs on your system first before using them. How to install the sample programs and where they should be intalled on your system will be explained.
  • Page 33: Installation Of The Sample Programs

    WWW browser, and then click the [TK-78K0R/KG3+UD Sample Programs] link. The WWW browser starts up. Click the [TK-78K0R/KG3+UD Sample programs] link you can also download the [User's Manual] When[TK-78K0R/KG3+UD Sample Programs] is clicked, the following download confimation window appears. - 33 -...
  • Page 34 Please click the Open button. In case of windows 2000, you will see the [Security Warning] window. Please click Run . InstallShield wizard for TK-Sample Program starts up Please click Next. - 34 -...
  • Page 35 License agreement screen is displayed. Please select "I accept the terms in the license agreement".and click Next. Please click Finish. The sample programs are installded under "C:¥" now. The sample program "TK78K0R.EXE" with self-extract file is also intalled. When you need to use the original sample programs, you can extract the file "C:¥TK78K0R.EXE".
  • Page 36: File Configuration Of The Sample Program

    2.4.2 File Configuration of the sample program The sample programs ware the following folders. TK78K0R SAMPLE_KG3+UD TK78K0RUD_RF_Test The sample program used in chapter 3. The packet error rate and received signal strength indication are monitored. TK78K0RKG3UD_Sample1 This sample program uses MAC library. The text message is transmitted and it receives it.
  • Page 37: Experiences

    3 Experiences Now you are ready to experience the operation of the TK-78K0R/KG3+UD using the integrated development environment, PM +. As a program for the 78K0R/KG3, the RF test program (RF_Test) which you installed in "2.4.1Installation of the sample programs" is used.
  • Page 38 The overall flow is as follows. Starting PM + Loading workspace (project) Reviewing Linker, Compiler option, Debug setting TK board setting Creating execution format Operation Starting integrated debugger (ID78K0R-QB) Executing program Stopping program Terminating integrated debugger (ID78K0R-QB) Terminating PM + - 38 -...
  • Page 39: Starting Pm

    Starting PM + In the Windows Start menu, select [Programs]->[NEC Electronics Tools]->[PM + V6.31] PM + start up - 39 -...
  • Page 40: Introduction To Pm

    Introduction to PM + In PM +, application programs and environment setting are handled as a single Project, and series of actions such as program creation using the editor, source management, build, and debugging are managed. Also, one of more project files is managed together as a workspace. Menu bar Tool bar Project window...
  • Page 41 What is a project? A project is the unit in which PM + executes management, and refers to an application system and environment development based on PM +. PM + complies project information and saves it in a “project file”, from which it is then referenced. What is a project file? A project file is a file to which information such as the source file to be used in the project, the device name, the tool options for complying, and the editor and debugger to be used have been...
  • Page 42: Loading Workspace (Project)

    Loading Workspace (Project) this section, you will use the workspace that you created in "2.4.1Installation of the sample programs" For creating a new workspace, refer to "7.1Create a new workspace". The workspace has information about the build environment for the sample programs. ".
  • Page 43 Open the folder in which the sample program is located. “RF_Test.prw”and then press the Open button. Workspace file name :RF_Test.prw The “RF_Test.prw” workspace file is read Project group Project - 43 -...
  • Page 44: Configuration Of Linker Option

    Configuration of Linker Option The linker options have been set by the project file. However, some option settings will be covered in this section because the linker option settings are important for debugging. Following three settings are covered specifically. - Outputs from debugging - On-chip debug (bytes, security ID) - Watchdog timer Select "Tools"...
  • Page 45 - Load Module File settings Check "Output Symbol Information". This enables to do source level debugging (setting break points, monitoring variables in watch window, etc). Also, you can specify the load module file name. - On-Chip Debug Option Byte Check "On-Chip Debug Option Byte". Enter "85" in "Control value". This setting enables the on-chip debugging function of the microcontroller.
  • Page 46: Output2" Tab

    3.4.2 "Output2" Tab Select "Output2" tab on "Linker Options" window, and see following settings. - User Option Byte Check "User Option Byte", and then enter "00FFFF". Here, you can do the setting of watchdog timer, low-voltage detector, and system reserved memory area.
  • Page 47: Configuration Of Compiler Option

    Configuration of Compiler Option The compiler options have been set by project file. However, because some compiler options are useful, following two settings are covered specifically in this section. - Enable C++ comments - Use multiplier and divider Select "Tools" on menu bar, then "Compiler options". 3.5.1 "Extend"...
  • Page 48: Startup Routine" Tab

    3.5.2 "Startup Routine" Tab Select "Startup Routine" tab, and check "Using Library" and "Using Multiplier/Divider". The 78K0R/KG3 has feature of multiplier/divider to increase those calculation speed. - 48 -...
  • Page 49: Configuration Of Debugger Setting

    Configuration of Debugger setting Please Choose [Tool] -> [Debugger Setting] at the pull-down menu. - 49 -...
  • Page 50 Check if "ID78K0R-QB V3.60 78K0R Integrated Debugger" is selected on "Debugger". - 50 -...
  • Page 51: Tk Board Setting

    TK board setting Please set the switches on the TK-78K0R/KG3+UD board as follows. 1-2 short (USB side) Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7 Bit8 After the switch settings are completed, connect the PC to USB1 on TK-78K0R/KG3+UD with USB cable.If the "Found New Hardware Wizard" is started, install USB driver with referring "2.3USB Driver".
  • Page 52: Creating Execution Format

    Creating execution format Please go back to PM +. Please re-compile the project by clicking the button at the menu bar. Build process is executed Build has been completed successfully. - 52 -...
  • Page 53 What is build ? Build is a function that creates an executable file, etc., from a source file registered to a project. PM + automatically performs compiling, linking, and other processing actions. On the second and subsequent build, PM + also automatically delects files that have been updated from the previous build processing, and complies and assembles only the relevant files, thereby reading the time required for build processing.
  • Page 54: Starting Integrated Debugger (Id78K0R-Qb)

    Starting integrated debugger (ID78K0R-QB) Please select the Debug button ,of PM +, or in the menu, select [Build(B)] →[Debug(D)]. If the debug button is not displayed, in the menu, select [Tool]→[Debugger Setting...]“ID78K0R-QB V3.60 78K0R Integrated Debugger” ID78K0R-QB is launched - 54 -...
  • Page 55 "Configuration" dialog is opened. Enter "FFFFFFFFFFFFFFFFFFFF" (F x 20) in "ID Code", then click OK . Click Yes when the confirmation dialog for downloading load module file is opened. - 55 -...
  • Page 56 ID78K0R-QB starts and downloading the program to flash memory. When the download is completed, the source code will be displayed NOTE: Completion of the download does not mean running the programs. To run the sample programs, go to "3.11 Executing program". - 56 -...
  • Page 57 Normally, if communication with the CPU fails, the following error messages are output. If you observe the message please confirm the following items. 1. Please confirm the switch on the board is set as follows. 1-2 short (USB side) Bit1 Bit2 Bit3 Bit4...
  • Page 58 If the ID code is wrong, you may find the following messages on the display. The following "Configuration" screen is displayed when OK is pushed and input a correct ID code, please. The default setting of the ID code is ”0xFFFFFFFFFFFFFFFFFFFF”. You can set an alternative ID code on the linker option tab.
  • Page 59: Introduction Of The Integrated Debugger(Id78K0R-Qb)

    3.10 Introduction of the integrated debugger(ID78K0R-QB) ID78K0R-QB displays the internal status of the CPU and controls monitor functions in the main window. The initial screen of ID78K0R-QB is as follows. Menu bar < Main window> Tool bar Window display area Status bar For more details, please refer to the user’s manuals of ID78K0R-QB.
  • Page 60: Executing A Program

    3.11 Executing a program If you click “GO” , the execution of the code will start. You can know it by the red bar at the bottom. Execute the program While a program is running, the status bar will be red. - 60 -...
  • Page 61: Stop A Program

    3.12 Stop a program Now, you are going to stop the program. Press the ID78K0R-QB’s stop button , or in the menu, select [Run]→[Stop]. Stop the program When the program stops, the status bar changes back to the original color. - 61 -...
  • Page 62: Terminating Integrated Debugger (Id78K0R-Qb)

    3.13 Terminating integrated debugger (ID78K0R-QB) Select "File" on menu bar, then "Exit". The Exit confirmation dialog box is displayed. If you push the “Yes”, ID78K0R-QB is terminated after preserving a present environment. If you push the “No”, ID78K0R-QB is terminated without preserving a present environment.
  • Page 63: The Rf Test Program

    The RF Test Program 3.14.1 Procedure for one to one transmit/receive test 1). Assumption here in this section is, you have two TK-78K0R/KG3+UD boards, in one of which the execution code for the “RF_TEST” was programmed by the debugger. You also prepare two PCs or one PC with more than one usb interface.
  • Page 64 1-2 short (USB side) Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 ON for address setting Bit7 OFF for address setting Bit8 ON for the receive mode The above example is for the short address of 0002. There are four ways of the address setting as follows, Short Address 0001 0002...
  • Page 65 Now, please click “GO” to run the program. You will see the red bar at the bottom. Now the receiver board is ready. - 65 -...
  • Page 66 3). Please set the transmitter board as follows, 1-2 short (USB side) Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 OFF for address setting Bit7 OFF for address setting Bit8 OFF for the Hyperterminal mode This example is for the short address of 0001. This board is designated as the transmitter.
  • Page 67 Now you will find the following opening menu in the window. If not, please try the RESET button on the board. - 67 -...
  • Page 68 5). Execution of the Transmit/Receive Test To initiate the PER, Packet Error Rate, test, please press “1” in the menu. You will see [My Profile], then, be asked for the destination of the PER test, as shown below. Now, you may input “0002”. Then, you will be asked how many packets you wish to consume in the PER test.
  • Page 69 RSSI is expressed in the hexagonal value of 256 levels, which indicates the signal strength in the received signal. For more details of the RSSI value, please refer to the datasheet of the UZ2400 RF chip. Please note the PER and the RSSI are measured at the receiver side. The receiver does not send back the test packets, but only the test result.
  • Page 70 6). Channel setting In the previous example, you may have also found the RF channel used in this test is the Channel 11. The channel is specified by the IEEE 802.15.4 specification. The channel 11 is assigned at 2405 MHz. You can change the channel in the PER test in 5MHz step to the maximum channel of 26th at 2480 MHz.
  • Page 71 To execute the PER test at the channel 23, press [Enter] in your keyboard, then, choose “1” to initiate the PER test mode. Then, you may input 1000 packet in 5 msec interval to see the following example. Please confirm the channel used is 23th in the display.
  • Page 72 7). Adjusting the output power You may wish to control the output power in the PER test. For it, please select “M” in the menu. You will be asked the register ID. Please input “274”. Then you will see, “LREG[203] : 00 >”. It means the current value at the register [274] is 0xC4h, which means 0 dB.
  • Page 73 The register bits are defined as follows, LREG[274]: [7:6] -> large scale tuning C4: 0 dB 81: -8 dB 09: -16 dB 01: -24 dB LREG[203]: [7:3] -> small scale tuning 000000: 0 dB 000001: -0.1dB 111111: -8.00 dB For instance, if you wish -8 dB, please input “81”, as follows, “LREG[274] : C4 >...
  • Page 74 You may find larger PER value with smaller RSSI value in this case. Please note this adjustment is applied only to the transmitter. The receiver always sends back the test results with the 0 dB output power using the channel 11 - 74 -...
  • Page 75: Per Test / Receiver

    3.14.2 PER test / receiver The Menu 2 sets the board to the receiver in the PER test. If you have two PCs, you can connect two boards to each of two PCs, then, you will apply this mode to one of them. In your current case, your receiver board is now being connected to the debugger.
  • Page 76: Deep Sleep Mode

    3.14.8 Deep Sleep mode The Menu 9 sets the UZ2400 into the Deep Sleep mode. 3.14.9 Power down mode The Menu 0 sets the UZ2400 into the Power down mode. 3.14.10 Set RF channel The Menu A allows you to set the RF channel. 3.14.11 Manually set UZ2400 register The Menu M allows you to set the UZ2400 registers.
  • Page 77: Terminating Pm

    3.15 Terminating PM + In the PM + menu, select [File]→[Save Workspace]. Then, select [File]→[Close Workspace]. In the PM + menu, select [File]→[Exit PM +]. PM + ends. - 77 -...
  • Page 78: Hardware Specifications

    4 Hardware Specifications In this chapter, the hardware of TK-78K0R/KG3+UD will be explained. Microcontroller μPD78F1168 ※78K0R/KG3 External main system clock: 20MHz Clock Subsystem clock: 32.768KHz Internal high-speed oscillation : 8MHz USB (Mini B connector) RF connector (SMA) Connector of board in surrounding...
  • Page 79: Layout Of Hardware Functions

    Layout of hardware functions CON2 RFVDD1 Universal area P150~P153 LED1 USB1 LED2~LED4 - 79 -...
  • Page 80: Hardware Functions

    Hardware Functions 4.2.1 SW1 Bit1-5 of SW1 is Dip switch for operation mode setting. Bit6-8 are the Dip switch for general-purpose ports that connected to P80-P82. ● For the use of ID78K0R-QB, use following settings. ON/OFF ※1 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5...
  • Page 81 ● For use of P13 (TXD3) and P14 (RXD3) connecting to μPD78F0730 as general-purpose ports without using ID78K0R-QB, set SW1 as follows and re-connect the USB to re-supply power. You can use the On-chip debug function with connecting a MINICUBE2. Bit 1 Bit 2 Bit 3...
  • Page 82: Sw2

    4.2.2 SW2 SW2 is a 4 directional switch with center push. If it is directed or pushed, the input is set to GND. Otherwise the circuit is open. Therefore please set the on-chip pull-up resistors (PU7) during initializing routine of your program code. (For more detail, please refer to the User’s manual(U17894) of the μPD78F1168 CPU.) SW2 terminal list ( ALPS SKRHADE010)
  • Page 83: Sw3,Sw4

    4.2.3 SW3,SW4 SW3 and SW4 are tact switches. The port inputs are short-circuited to ground, while they are being pushed, and kept open otherwise. Therefore please set the on-chip pull-up resistors(PU7) during initializing routine of your program code. (For more detail, please refer to the User’s manual(U17894) of the μPD78F1168CPU.) SW3 and SW4 terminal list (ALPS SKQMBBE010) Signal...
  • Page 84: Jp1

    4.2.5 JP1 This switches the power supply for CPU. 1-2 short supply power from USB connected to USB1 2-3 short supply power from batteries connected to CN2 4.2.6 LED1 This is the POWER LED. It is lighted when it gets power supply. 4.2.7 LED2, LED3 and LED4 LED2, LED3, and LED4 are available for applications.
  • Page 85: Fp1

    4.2.8 FP1 The connector for MINICUBE2. MINICUBE2 switch setting M1, T 4.2.9 CON2 Usually the jumper is short-circuited. If you want to measure the current consumed on the RF boards, you can measure it here. 4.2.10 U1 U1 is a temperature sensor. The temperature sensor is being connected to the MCU pin of "P27/ANI7".
  • Page 86: Power Supply

    Power supply There are two choices to supply power to the board, USB or a 006P battery via CN2. Please refer to 2.5 JP1 for the jumper setting. Please replace the battery with a new one, if the voltage level goes down to 4.8V.
  • Page 87: The Ieee 802.15.4 Mac Sample Program

    5 The IEEE 802.15.4 MAC Sample Program Two sample implementations utilizing the MAC stack are offered in this evaluation kit. - 87 -...
  • Page 88: The Mac Sample Program 1 :Textchat

    PM +. As a general remark, please respect your local regulation of electro-magnetic emission. In general, it is suggested to use the TK-78K0R/KG3+UD board in a radio anechoic chamber. It supports text chat for one coordinator and 4 end devices.
  • Page 89: Programming To The Tk Boards

    Click re-build button on PM+ or select "Build" -> "Rebuild" on menu bar to rebuild. Start the debugger from PM+, then write different programs to each TK-78K0R/KG3+UD (for the information about how to write programs, refer to "3.1 Starting PM+" through "3.9 Starting integrated debugger (ID78K0R-QB)").)
  • Page 90: Setting Up The Board To Your Pc

    Press SW5 (RESET SW) once after Hyper Terminal is started. The sample application starts after resetting. In the same way, connect the other TK-78K0R/KG3+UD board to PC, and start Hyper Terminal. If the PC has more than one USB ports, you can connect to more than one TK-78K0R/KG3+UD boards, and you can start more than one Hyper Terminals for those COM ports on each board.
  • Page 91 4). Hyper Terminal Now you will find the following opening menu in the window. If not, please try the RESET button on the board. << 78K0R+UZ Sample Application: Skyley Networks >> My MAC extended address = 123412349ABC0001 Command? > Then, press Enter, [Help] ------------------------- S: Send Message M: MLME Associate test...
  • Page 92: Designation Of A Coordinator

    5.1.3 Designation of a coordinator Now, you must decide which board is a coordinator. Go to the PC of the coordinator board, and press C. Command? >C > MLME-START.request > MLME-START.confirm > Status:00 Command? > Now the coordinator has started. 5.1.4 Network Association For other PCs for other boards, please press M.
  • Page 93: Text Chat

    On the coordinator side, you will find the following message, if the association is successful. > MLME-ASSOCIATE.indication > from 123400019ABC0001 associated to 4321 [Help] ------------------------- S: Send Message -------------------------------- Command? > 5.1.5 Text Chat Now the network is prepared for you to start text chat between an end device and the coordinator.
  • Page 94 You will find the following message on the end device, 4321. The sender’s short address is “1975”, and the PAN ID is 2420 in this example. Command? > > MCPS-DATA.indication > from 1975/2420 Hello! Now, you can reply from the end device “4321” to the coordinator “1975” by inputting S, 1975, and your reply text.
  • Page 95: The Mac Sample Program2 : Led Control

    PM +. As a general remark, please respect your local regulation of electro-magnetic emission. In general, it is suggested to use the TK-78K0R/KG3+UD board in a radio anechoic chamber.
  • Page 96: Programming To The Tk Boards

    (you can monitor the output itself with LED without PC). When you wish to connect PC, set the TK-78K0R/KG3+UD as follows. Then, connect USB cable to PC. Confirm the power LED is lighted after connecting the USB cable.
  • Page 97 Start Hyper Terminal with referring to "3.14The RF Test ". Program Settings of the Hyper Terminal should be set as follows. Bits per second 115200 Data bits Parity None Stop bits Flow control None 6). After you open the window of the HyperTerminal, please push the reset button on the board.
  • Page 98: Starting Up End Devices

    Bit6 Bit7 Bit8 When you wish to use TK-78K0R/KG3+UD as itself, set JP1 to BATTERY side (2-3short) and SW1 to all OFF, then connect battery. You must set the position of SW2 when you supply power to TK-78K0R/KG3+UD. The TK-78K0R/KG3+UD board functions of each SW2 position are described as follows.
  • Page 99 If you start-up a board while keeping the Joy Stick up, you will see the following message on the HyperTerminal. A short address of “4352” was assigned to the board. A short address is assigned sequentially, independent from the long address.
  • Page 100: Operation

    5.2.4 Operation The coordinator generates beacon at channel 11 of 2405 MHz. LED4 on the board is ON. An end device makes a network association. If successful, LED2 on the board is ON. If you push SW3 on an end device, LED4 on the coordinator blinks. And, if you push SW4 on an end device, LED3 on the coordinator blinks.
  • Page 101: Troubleshooting

    6 Troubleshooting This chapter describes how to solve troubles you may face. If you cannot find USB driver when you connect PC to the kit Check Point 1 If you use USB hub, do not use it. (USB hub is not supported) Check Point 2 Check if you installed "Starter Kit USB Driver"...
  • Page 102: Can Not Communicate With Emulator

    6.2.1 "Can not communicate with Emulator..." (F0100 or A0109) Check Point 1 If you use USB hub, do not use it. (USB hub is not supported) Check Point 2 Check if the settings of the switch on the kit are correct with referring "1.3 Installation of USB Driver".
  • Page 103: Disabling The On-Chip Debug Function Is Prohibited." (F0C33)

    6.2.4 "Disabling the on-chip debug function is prohibited." (F0c33) Basically, this error occurs when you start (download) the debugger without doing the settings described at "3.4Configuration of Linker Option". Do the same checking processes as"4.2.3 The on-chip debug function had been disabled in the device. (F0c79)".
  • Page 104: Other Information

    7 Other Information This chapter explains some useful operation techniques of development tools and circuit diagram of the kit for developing of user programs. 7.1 Create a new workspace (project) 7.2 Register additional source file 7.3 Debugger tips 7.4 Erase microcontroller built-in flash memory 7.5 Circuit diagram - 104 -...
  • Page 105: Create A New Workspace

    Create a new workspace Now, create a new workspace and project. PM+ allows you to create a new workspace with following "New WorkSpace" dialog. Select "File" on PM+ menu bar, then "New Workspace...". "New WorkSpace" dialog opens <Description of items> Workspace File Name: ->...
  • Page 106 Input the workspace information setting as follows. Workspace file name test → Folder → C:¥78K0R Project Group Name → (no input) Microcontroller Name 78K0R → Device Name uPD78F1168_A0 → Click Next > button Click button Click Detail Setting button - 106 -...
  • Page 107 Set the version of tools as follows. CC78K0R:W2.12 RA78K0R:W1.33 ID78K0R-QB:V3.60 Select tools as above screenshot, then click Click Next > - 107 -...
  • Page 108 Click Next > Select ID78K0R-QB V3.60 Click Next > Check the project information settings Click Finish - 108 -...
  • Page 109 Project “test" was registered. This completes workspace and project creation. Additional source files can be registered at any time thereafter. For details, refer to "7.2 Register additional source file". Also, you need to do the settings for on-chip debug. Please refer to "3.4 Set Linker Options",...
  • Page 110: Registration Of New Source Files

    Registration of new source files Now, we learn how to register new source files. The following example shows how to register two additionalsource files of “b.c” and “c.c” with source file “a.c” already registered. Place the cursor on a source file in the Project window of PM+, and select [Add Source Files…] displayed in the right-click menu.
  • Page 111 Source files "b.c" and "c.c" are added to the project. - 111 -...
  • Page 112: Debugger Tips

    Debugger tips This section describes some useful techniques for the debugger (ID78K0R-QB). 7.3.1 Change display of buttons Execution controls (run, stop, step-in debugging, reset, etc) and opening functional window can be made by below buttons. However, it could be difficult to know which button does what.
  • Page 113: Set/Delete Breakpoints

    7.3.3 Set/delete breakpoints Breakpoints are executed by clicking lines in which " * " is displayed "B" is displayed in the line where a breakpoint is set. Breakpoints are deleted by clicking "B". Click Breakpoint was set - 113 -...
  • Page 114: Display Global Variables

    7.3.4 Display global variables With using Watch Window, you can display global variables. There are several ways to register global variables to watch window. In this section, how to register from source window is described. ①Right-click the variable on source window, then select "Add Watch..." ②Add Watch dialog opens.
  • Page 115: Display Global Variables While Programs Are Running

    7.3.5 Display global variables while programs are running RAM, general-purpose register, and SFR can be referred by the pseudo real-time monitor function even when the programs are running. Select "Option" on menu bar, then "Extended Option...". Configure the settings for "RAM Monitor And DMM". Check Specify the sampling interval time of the pseudo real-time monitor function.
  • Page 116: Display Local Variables

    7.3.6 Display local variables Local variable window is used to display local variables. By clicking the button below, you can open the local variable window. Unlike global variables, local variables cannot be displayed when programs are running. 7.3.7 Display memory and SFR contents By clicking the button below, you can open the memory window.
  • Page 117: Erase Of Flash Memory

    Erase of flash memory If the On-Chip Debug Option Byte is set to "Do not erase data of flash memory in case of failures in enabling on-chip debugging" and if you forget the security ID, you need to erase the flash memory completely. To erase the flash memory, please follow the steps below.
  • Page 118 ※ ID Code The ID Code is a mechanism to prevent an unwelcome third party from accessing your source code by initiating the debugger. Therefore, it is recommended to modify the ID Code from the default value to secure your original source code. However, once you modify it, then, if you forget the security ID or mistakenly over-write 0x00(value) to the address of 0xC3, the debugger ID78K0R-QB is unable to access to the CPU via OCD interface.
  • Page 119: Bom List & Circuit Diagram

    BOM List & Circuit diagram Here is the BOM List & circuit diagram of the evaluation kit. ● CUP board BOM list Mount Mount Parts Reference Unmount Parts Reference Type Parts No Maker Note Quantity Connecter HIF3H-50DA-2.54DSA HIROSE Mounted Connecter S2B-ZR-SM3A-TF CN4,CN3 Connecter...
  • Page 120 ● RF board BOM list Mount Quantity Mount Parts Unmount Parts Type Parts No Manufacturer Reference Reference C37,C43 Chip ceramic cap C0402CRNP09BNR50 Yageo Chip ceramic cap CC0402CRNPO9BN1R8 Yageo C1,C53 Chip ceramic cap C0402ZRY5V5BB105 Yageo L3,L5 Chip ceramic inductor LQG15HN5N1S02 Murata AL02BT5N1M Viking Chip ceramic inductor...
  • Page 121 ● CUP board schematic - 121 -...
  • Page 122 - 122 -...
  • Page 123 - 123 -...
  • Page 124 ● RF board schematic - 124 -...
  • Page 125: Mode Setting Of The Board

    8 Mode setting of the board The combination table of the switch of this board is shown. Usage case Normal Debug Debug (MINICUBE2) OFF/ON ※1 Bit1 Bit2 Bit3 Bit4 Bit5 ※1 The microcontroller stays being reset until ID78K0R-QB is started. OFF: The microcontroller runs the programs stored in the flash memory as soon as it gets power supply.

Table of Contents