Home
UM 16-bit 78K0R ZigBee PRO Premium Development Kit
Contents
1. IAR project workspace As a next step check some settings of the IAR Embedded Workbench that have to be made for correct operation and usage of the On Board debug function of the TK 78KOR KG3 UZ board Similar settings should also be done in order to flash program the board via the TK interface of IAR First highlight the upper project folder called TK 78KORKG3 MAC sample 1 Debug in the workspace window Then select Project gt Options from the pull down menus Next select the category Debugger Make sure that the driver is set to TK 78 in order to use the On Board debug function of the TK 78KOR KG3 UZ board The device description file must be set to io78f1168_a0 ddf The corresponding COM port where the TK 78KOR KG3 UZ board is connected to the host PC will be detected automatically by the IAR C SPY debugger User s Manual U19054EE2VOUMOO 63 Chapter 6 IAR Sample Session Options for node TK 78KORKG3 UZ MAC sample 1 Category Factory Settings General Options C C Compiler Gen Yesa Options Plugins Assembler Custom Build Build Actions TK 78 TK 78K xxx TK 8KOR xxx Driver V Run to main Setup macros pon Debugger IECUBE MINICUBE Simulator Use macro file TK 78 ERI El Device descriptions Override default AAA cann Cancel Figure 6 3 IAR Debugger options Then it is required to check that the right output file format is selected Select the cate
2. IAR Systems Embedded Workbench for 78K0 78K0S 78K0R including C compiler assembler linker librarian and IAR C SPYdebugger simulator Sample programs IAR Systems Embedded Workbench Installation The IAR Systems Embedded Workbench must be installed on your PC For detailed installation hints refer to the following chapters and to the corresponding documentation of the IAR Embedded Workbench To install the IAR Systems Embedded Workbench for 78K0 78K0S 78KOR including C SPY debugger simulator select the AUTORUN program in the directory lt CD gt VAR of the CDROM The setup dialogues will guide you through the installation process User s Manual U19054EE2VOUMOO 78KOR ZigBeea PRO Premium Development Kit Chapter 5 Installation and Operation 5 2 2 5 3 Note 5 3 1 Figure 5 1 Sample Program Installation To install the sample demonstration programs for the 78KOR ZigBee PRO Premium Development Kit board select the SETUP program in the directory lt CD gt 78KOR SamplePrograms of the CDROM The setup dialogue will guide you through the installation process USB Driver Installation In order to use the 78KOR ZigBee PRO Premium Development Kit board for On Chip debugging the USB driver needs to be installed on the host machine Install the drivers according to the following procedure Installation on Windows 2000 section 5 3 1 Installation on Windows 2000 Installation on Windows XP secti
3. Search for the best driver in these locations Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed C Search removable media floppy CD ROM Include this location in the search C Program Files IAR SystemssEmbedded Workben w Browse Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware Figure 5 11 Search location specification Windows XP As shown below has not passed Windows Logo testing to verify its compatibility with Windows XP is displayed Click Continue Anyway Hardware Installation A The software you are installing for this hardware NEC Electronics Starter Kit Virtual UART has not passed Windows Logo testing to verify its compatibility with Windows lt P Tell me why this testing is important Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing Continue Anyway Figure 5 12 Windows XP Logo Testing Windows XP When the window below is displayed the installation of the USB driver is comp
4. 1 PER test sender My Profile MAC 22 95 78 01 00 00 00 47 Short 0001 PanID 2514 Send to Short addr Send count dec Interval dec msec Set channel to 11 Cmd Prepare to send OK Set channel to 11 Current Request to result OK Results Set channel to 11 Current lt Connected 00 02 25 Auto detect 19200 8 N 1 PER test results PER RSSI indication 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 Channel Setting In the previous example you may have noticed the RF channel used in this test is the Channel 11 The channels are 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 at 2480 MHz Channel 26 To do it please press 9 in the command prompt Then please choose the channel by A B or C In the example below the Channel 23 2465 MHz was selected User s Manual U19054EE2VOUMOO 15 Chapter 2 Sample Applications e Test Transmitter HyperTerminal OX File Edit View Cal Transfer Help Da 33 cB 78K0R UZ Hardware RF Test program 200
5. 2 3 2 MAC Sample Program 2 LED Control The MAC Sample program 2 is developed to provide with another simple example to construct a star network utilizing the IEEE 802 15 4 PHY MAC standard The TK 78KOR KG3 UZ boards of your 78KOR ZigBee Premium Development Kit will come pre programmed with this sample program This LED Control sample program can run with minimum 2 and maximum 5 nodes This sample program can run stand alone without PC Optional it is also possible to connect Hyper Terminal to the development boards and view the association and data transfer as text messages The MAC Sample Program 2 is provided in the form of the C source codes with the MAC library Setting up the boards To begin the demonstration you need to have minimum two TK 78KOR KG3 UZ boards in which the TK 78KORKG3 UZ MAC sample 2 is programmed it is already done in the preprogrammed boards provided in the 78KOR ZigBee Premium Development Kit If your boards are not programmed you need to program each board using the source codes provided For further details about programming the board please read the section 6 AR Sample Session of the present manual When your boards are programmed that is to say ready for the demonstration please set the following switch configuration to all your boards Operation mode switch settings JP1 1 2 short USB side Bitl OFF Bit2 OFF Sw1 Bit3 OFF Bit4 ON Bit5 ON S
6. Open existing project in the start window of IAR Locate the sample project Programs for the TK 78KOR KG3 UZ board By default the installation folder is CMMyDocuments78KORSamplePrograms TK 78KORKG3 UZ Open the file TK 78KORKG3 UZ eww This is the workspace file that contains general information about the demonstration projects and corresponding settings After the workspace has been opened the projects contained in the workspace are displayed You should now select the project on which you want to work with the list box at the top of the workspace window For example you could chose the project TK 78KORKG3 MAC sample 1 Debug then it will appear in bold in the project list Now click on the little sign next to this project filename to show all files that were part of this selected project The screen should now look similar to this User s Manual U19054EE2VOUMOO IAR Sample Session Chapter 6 Figure 6 2 AR Embedded Workbench IDE File Edit View Project Tools Window Help wWuugiSxsmoe s t uEse eli5 OOOO Files B BITK 78K0RKG3 UZ Ha E TK 78KO0RKG3 UZ MAC sample 1 Debug MAC Library Source Output B TK 8K RKG3 UZ MAC sample 2 Debug La BD Tk 78k0PKG3 UZ RF test Debug A Source Output Overview TK 78KORKG3 UZ MAC sample 1 J TK 78KORKG3 UZ MAC sampl 4 Messages g 2 Build Find in Files Debug Log Errors 0 Warnings 0
7. 123456789ABC0001 ommand _ gt S Send Hessage M MLME Associate test C Start Coordinator test Command gt Opening menu Please do exactly the same for all the boards and PCs you want to use Designation of a coordinator Now you must decide which board is a coordinator Go to the PC of the coordinator board and to the HyperTerminal window associated and press C Help S Send Message M MLME Associate test C Start Coordinator test Command Gc gt MLME STRRT request gt MLME STRRT confirm gt Status 00 Command Coordinator selection Now the coordinator has started its operation Network Association For other PCs with other boards please press M on the HyperTerminal window associated User s Manual U19054EE2VOUMOO 25 Chapter 2 Sample Applications 26 Figure 2 16 Figure 2 17 2 2 4 Help S Send Message M MLME Associate test C Start Coordinator test Command M gt MLHE ASSOCIATE request gt MLME ASSOCIATE confirm gt Associated ShortAddr 4321 lt gt Status 00 Command gt Network association of an end device Now this particular board was associated to the network as an end device with the short address of 4321 Please repeat this step for your third fourth and possibly fifth board On the coordinator side you will find the following message if the assoc
8. Figure 6 16 6 4 Options for node TK 78KORKG3 UZ MAC sample 1 Category Factory Settings neraLOnkian C C Compiler Language Optimizations Output List C Preprocessor Dbiagnostic 4 STET Li Custom Build Build Actions Ignore standard include directories TOOLKIT DIRSMNC Linker TOOLKIT_DIRSANCACLIBA Debugger Additional include directories one per line IE 78 PROJ DIR include IECUBE MINICUBE Simulator TK 78 Preinclude file E Defined symbols one per line Preprocessor output to file MAC_ADDR 0x0001 IAR Pre processor options Using of the UART for debugging All the sample programs demonstrates the utilization of the UART serial interface communication via the USB port to send message and give visual information but also to interact with the sample application except in MAC Sample Program 2 where no action is required from the user The TK interface of IAR also uses the USB UART communication for on board debugging purpose Because the TK 78KOR debugging interface and the serial interface used by the application are sharing the same USB UART port they can not be used at the same time So please close the IAR C SPY debugger after the sample program has been downloaded to the board Unplug the USB interface and make the necessary changes on the switches of the board to allow normal serial communication via the USB port that is to say changes the switch settings to switch fr
9. Stop Debugging button 9 and disconnect the board 1 Inthe case you want to program a HEX file into the stick via the TK interface of IAR you should do exactly the same but using the IAR projects dedicated to the Stick and changing the settings of the switch according to Table 4 1 4 1 USB interface setting of SW2 78KOR UZ Stick 2 There are different possibilities to download directly this HEX file into the flash memory of the device the TK interface of IAR as just shown the tool Minicube2 and the QB programmer GUI Please note that Minicube2 is a separate product from NEC Electronics and not included in this 78KOR ZigBee PRO Premium Development Kit but can be purchased from your supplier Setting of different MAC address by Preprocessor command Some settings can be done by pre processor options like in the sample program TK 78KORKG3 UZ MAC sample 1 In the MAC sample program 1 the pre processor options are used to set the MAC address of the board Each board need to be programmed with a different MAC address so before programming the device you have to ensure that the MAC ADDR pre processor option has a unique value Note that you cannot use the same output file to flash program the device because the address will not be unique You need to generate different output file from your project with different pre processor options User s Manual U19054EE2VOUMOO IAR Sample Session Chapter 6
10. 2 1 2 Execution of the Transmit Receive Test 00 00 cece eee eee eee ees 13 2 1 3 Charnnel Setting 425 ob a 15 2 1 4 Adjusting the Output Power sssssssesssesse men 17 2 1 5 PER Test Recelvet cotas ue EVER ERU C See eee 21 2 1 6 Continuous TX Pseudo Noise 0 cece cece n 21 2 1 7 Continuous TX Raw carrier 0 6 ccc ccc hn 21 2 1 8 DS ram 22 2 1 9 IDEE Mode 51 eo ea Eno Sepia dene end dux ane edere as UIS CR 22 2 1 10 Sleep Mode iue eee e eq nete rea eere wd See e e cee RR 22 AS la AAA RE BER Re he dA ees E RAE ES 22 242 SetRr Channel 21 hr ERE RR RU esee ted aep dur IR REA 22 2 1 43 Manually Set UZ2400 Chip Register 00 0 cece 22 2 144 Resetting RE oec er Reed Rx eq e ec e eb RE ure 22 2 2 MAC Sample Program 1 Text Chat L suuusees else sees 22 2 2 1 Setting up the boards to your PC ocoocccccccconcc eee 23 2 2 2 Designation of a coordinator ocoooocccccncrn ne 25 2 2 8 Network Association oooocoocoocooccncc hm rne 25 2 2 4 ager dg E AR Acadia 26 2 3 MAC Sample Program 2 LED Control LLuuuuuselselsselss ees lee es 28 2 3 1 Setting Up the boards ci E ers Seer ode En Ed De y IS dee dn E 28 2 3 2 Starting up a Coordinator sssessseeseseee eee 28 2 3 3 Starting up End Devices aes eners A EEEE enne 29 2 3 4 Op ration zs he a A EA EA 29 2 3 5 Using Terminal Pr
11. 78KOR KG3 UZ LED Signal name Terminal CPU name at connection destination LED2 P62 P62 LED3 P61 P61 SDAO LED4 P60 P60 SCLO LED 2 3 and 4 TK 78KOR KG3 UZ FP1 The connector FP1 allows connecting the Minicube2 On Chip debug emulator to the TK 78K0R KG3 UZ board in order to use On Chip debug function of the 78KOR KG3 device Please note Minicube2 is a separate product from NEC Electronics and it is not included in this 78KOR ZigBee Premium Development Kit MiniCube connector FP1 Power Supply There are two choices to supply power to the board USB or a 6LR614 9V battery via CN2 Please refer to the following table for the jumper setting JP1 Setting for the power supply source USB Power USB 1 2pin short Battery CN2 2 3pin short JP1 Please replace the battery with a new one if the voltage level goes down to 4 8V Below the voltage level of 4 8V functions of the board are not guaranteed The battery voltage can be checked at the port as shown below User s Manual U19054EE2VOUMOO 41 Chapter 3 Hardware specification TK 78KOR KG3 UZ Table 3 14 3 7 Figure 3 10 3 8 Figure 3 11 Table 3 15 42 9V battery checking Terminal CPU name at Signal z connection Notes name QE destination 33 896 of the battery is available at the input of power supply ANI6 For instance If the battery level 9V BT MONI P26 ANI6 The level of the BT MONI 0 338 x 9
12. 78KORKG3 UZ MAC sample 1 Category Factory Settings General Options C C Compiler Output Extra Output tidefine Diagnostics List CDA 4 gt Assembler Custom Build Linker command file IV Override default mmm SPROJ DIRS cNInk78fT 168 a0 xcl H IE 78 IECUBE MINICUBE Override default program entry Simulator e TK 78 C Search paths one per line TOOLKIT_DIRSALIBA Raw binary image File Symbol Segment Align po cc TC TCS Cancel IAR Linker options Now after everything has been setup correctly it is time to compile and link the demonstration project Close the Options menu and select Rebuild All from the Project menu If the project is compiled and linked without errors or warnings it can now be downloaded to the TK 78KOR KG3 UZ board and debugged Before starting a debug session please check that the target board configuration is set according to the settings written in the section On chip debug mode with IAR TK interface Then to start the IAR C SPY debugger select the option Debug from the Project menu or press the Debugger button In the next step the TK 78 Emulator has to be configured before downloading a new application Press the OK button to enter the emulator hardware setup Set the configuration as show in the figure below and start the download by pressing the OK button User s Manual U19054EE2VOUMOO IAR Sample Session Chapter 6 TK 78 Hardwar
13. All other product names are trademarks or registered trademarks of their respective owners Complementary ZigBee Development Platform and Hardware Other evaluation boards and hardware available to develop a ZigBee M network from NEC Electronics e ZigBeelM Starter Kit 2x8 bit ZigBee node boards TK 78K0 KF2 UZ IEEE 802 15 4 MAC libraries Sample programs IAR Embedded Workbench Kickstart Version Flash programmer for 78K0 Article code 78K0 ZIGBEE SK User s Manual U19054EE2VOUMOO 78KOR ZigBeea PRO Premium Development Kit Chapter 1 e ZigBee M Premium Development Kit for 78KO 4x8 bit ZigBee node boards TK 78K0 KF2 UZ 8 bit USB ZigBee M node programmed as Air Sniffer IEEE 802 15 4 MAC libraries ZigBee M Stack Unlimited ZigBee license for the 78KO family GUI Tools SDK Sample programs IAR Embedded Workbench Kickstart Version Flash programmer for 78KO Article code 78K0 ZIGBEE PREM e ZigBee M Premium Development Kit for V850 1x32 bit ZigBee node boards TK 850 SG2 UZ 8 bit USB ZigBee node programmed as Air Sniffer IEEE 802 15 4 MAC libraries ZigBee Stack Unlimited ZigBee license for the V850 family GUI Tools SDK 2 TCP IP Libraries amp Web Server Sample programs IAR Embedded Workbench Kickstart Version E Flash programmer for V850 s Article code V850 ZIGBEE GATE e ZigBee M PRO Premium Development Kit for V850 1x32 bit ZigBee node boards
14. Driver Files Search Results SS The wizard has finished searching for driver files for pour hardware device Y The wizard found a driver for the following device e USB Device Windows found a driver for this device To install the driver Windows found click Next sa c program filesNiar systemstembedded workbench 4 0 78k config nec ie_pe_driver minicube mgb2sall inf lt Back Cancel Figure 5 7 Driver File Search Windows 2000 Click Finish to complete the installation of the USB driver 56 User s Manual U19054EE2VOUMOO 78KOR ZigBeea PRO Premium Development Kit Chapter 5 Installation and Operation Found New Hardware Wizard Completing the Found New Hardware Wizard sy NEC Electronics Starter Kit Virtual UART Windows has finished installing the software for this device To close this wizard click Finish lt Back Figure 5 8 USB Driver Installation Completion Windows 2000 5 3 2 Installation on Windows XP When the 78KOR ZigBee PRO Premium Development Kit board is connected with the host machine the board is recognized by Plug and Play and the wizard for finding new hardware is started Check that Install from a list or specific is selected then click Next gt Found New Hardware Wizard Welcome to the Found New Hardware Wizard Windows will search for current and updated software by looking on your computer on the hardware installatio
15. Release of the project see the structure of the project in the section 7 7 Introduction and Structure User s Manual U19054EE2VOUMOO 69 Chapter 6 IAR Sample Session Name and format of your hex file The name of your output file and its format can be easily customized in the following menu that is shown in the screen below Project gt Options gt Linker Output Options for node TK 78KORKG3 UZ MAC sample 1 Category Factory Settings General Options C C Compiler Cutout ewe Output define Diagnostics List Config Proce 4 gt Assembler an DM Dutput file v Override default Secondary output file TK 8KORKG3 UZ MAC sample 1 None for the selected format Format IECUBE C Debug information for C SPY MINICUBE Simulator TK 78 Oth Output format intel extended Format variant Nome o Module local symbols Include all Figure 6 11 IAR output files settings name and format 70 Programming the Hex file with the corresponding project When you just come to generate the HEX file with IAR from your Release target of a project itis really easy to program it into the board you just need to download it with the button Debug or with the command Project gt Debug When the download is complete you should click the Stop debugging button and disconnect the board But before programming the board you should Select TK 78 in the menu Options Debugger
16. SIO1 8 P42 P42 T104 T004 9 T_RESET Connected to reset circuit 10 P120 P120 INTPO EXLVI 11 GND GND User s Manual U19054EE2VOUMOO Hardware specification TK 78KOR KG3 UZ Chapter 3 User s Manual U19054EE2VOUMOO CN Signal name OT destination Notes 12 GND GND 18 VDD VDD 14 VDD VDD 15 P22 P22 ANI2 16 P21 P21 ANI1 17 P20 P20 ANIO 18 P63 P63 19 P64 P64 RD 20 P65 P65 WRO 21 P66 P66 WR1 22 P77 P77 EX23 KR7 INTP11 23 P06 PO6 WAIT 24 P05 POS CLKOUT 25 GND GND 26 P30 P30 INTP3 RTC1HZ 27 P27 P27 ANI7 28 P54 P54 EX12 29 P55 P55 EX13 30 P17 P17 EX31 T102 T002 31 P15 P15 EX29 RTCDIV RTCCL 32 P12 P12 EX26 SO00 TxDO 33 P11 P11 EX25 SIO0 RxDO 34 P10 P10 EX24 SCK00 35 VDD VDD 36 P110 P110 ANOO 37 P111 P111 ANO1 38 VDD VDD 39 GND GND 40 P153 P153 ANH 1 41 P152 P152 ANI10 42 P151 P151 ANI9 43 P150 P150 ANI8 44 P25 P25 ANI5 45 P24 P24 ANI4 46 P23 P23 ANI3 47 P131 P131 T106 TO06 48 P145 P145 TIO7 TOO7 49 P144 P144 SO20 TxD2 50 P143 P143 S120 RxD2 SDA20 35 Chapter 3 Hardware specification TK 78KOR KG3 UZ Figure 3 1 Connector CN1 pin configuration TK 78KOR KG3 UZ Table 3 8 Connector CN3 terminal list CNS Signal name connection destination No
17. TK 850 SG2 UZ 8 bit USB ZigBee node programmed as Air Sniffer IEEE 802 15 4 MAC libraries ZigBee Stack Unlimited ZigBee license for the V850 family GUI Tools SDK TCP IP Libraries amp Web Server Sample programs IAR Embedded Workbench Kickstart Version E Flash programmer for V850 gt Article code V850 ZIGBEEPRO GATE Additional single boards or modules can be purchased in case the customer needs additional hardware for Premium or Gateway kits TK 78K0 KF2 UZ EE 78K0 UZ Stick EE TK 78KOR KG3 UZ EE 78KOR UZ Stick EE TK 850 SG2 UZ EE User s Manual U19054EE2VOUMOO 10 Chapter 2 Sample Applications 2 1 Table 2 1 With the 78KOR ZigBee Premium Development Kit three different sample programs are offered RF Test program MAC Sample program 1 Text Chat MAC Sample program 2 LED Control The Text Chat and the LED Control sample programs uses the MAC stack provided in this evaluation kit The TK 78KOR KG3 UZ boards are pre programmed with the MAC Sample Program 2 so for a quick start please go the associated section 2 3 MAC Sample Program 2 LED Control RF Test Program The RF test program is a simple program that allows various RF parameters to be configured and test signals generated The features found in this program can be used to provide the software support functions needed for various test requirements In the sample provided a simple termi
18. the message processing of the API layer the procedure SK GetMessage is used to determine the relevant command state and also provides a pointer to any received packet data See the MAC Library Reference Manual for detailed explanations of the MAC commands and the API processing functions SampleApplication SKSTATEADD APL SKSTATEADD APL if SK GetMessage SK LAYER APL amp nResID amp nCmd SK VP J amp pPkt SK E OK case case SK MCPS DATA INDICATION CMD iii aa d v Figure 7 4 API management flow diagram 78 User s Manual U19054EE2VOUMOO Sample Programs Chapter 7 7 3 2 Managing and Actioning of the User Interface The remainder of the procedure reads characters from the user interface and acts as a command parser The command parser will decode the characters and process them so that the correct menu commands and relevant API calls are issued switch gn nLineStatus case case default SAMPLEAPP STATUS HEX SAMPLEAPP STATUS LINE TAM switch gn_nMenuStatus case SAMPLEAPP_STATUS_HEX case SAMPLEAPP_MENU_TOP_WAIT case SAMPLEAPP_SEND_TO if gn aLineBuf 0 0 if gn aLineBuf 0 77 0 switch gn aLineBuf 0 StateEnd APL Figure 7 5 Command parser flow diagram User s Manual U19054EE2VOUMOO 79 80 Chapter 8 Attachments This document contains the following file attachments e Circuit Diagram of the CPU Board e Circuit Diagram of the UZ24
19. 0 3 042 V If the battery level is 6 5V The level of the BT MONI 0 338 x 4 8 1 622 V Universal Area The kit has the universal area Users can use this to develop custom circuit Universal test area Soldering Bridges Additional configuration of the TK 78KOR KG3 UZ board can be done by the soldering bridges With using the soldering bridge to cut the circuit users can customize the circuit To open use cutter to cut the dent part To short put solder on the pad Opened Closed Soldering bridge configuration Soldering bridge connection Soldering bridge name Configuration Connection Closed default 1MO Pull down P150 P153 Opened Associated pin on CN1 is used User s Manual U19054EE2VOUMOO Hardware specification TK 78KOR KG3 UZ Chapter 3 3 9 Temperature Sensor The TK 78KOR KG3 UZ board has a temperature sensor for measuring the ambient temperature of the PWB board It is connected to the analogue input pin P27 ANI7 of the microcontroller e Temperature sensor S 8120C Made by SII Power supply of sensor 3 3 V Linear output voltage 8 20mV C from 20 C to 80 C Please refer to the datasheet for details 3 10 Design Data and Parts Layout User s Manual U19054EE2VOUMOO 43 Chapter 3 Hardware specification TK 78KOR KG3 UZ 3 10 1 Parts Layout CN3 CN4 RF Board I F SPC ST JAA a Li Li WR2 HL FP1 CN1 Expantion I F SW5 Res
20. 00 RF Board e Circuit Diagram of 78KOR UZ Stick Use the Attachments tab to see them User s Manual U19054EE2VOUMOO
21. 7 Skyley Networks PER test sender shift 1 Retry result PER test receiver Continuous TX Pseudo Noise Continuous TX Raw carrier RK Mode IDLE Mode Turn to sleep mode Standby Mode Set RF channel Manually set UZ2400 register Reseting RF Select Channel decrease channel increase channel Enter Set ESC Cancel R812405MHz B12440MHz C12480MHz RF Channel 2465MHz Ch 23 Connected 00 02 25 Auto detect 19200 8 N 1 Figure 2 6 Modification of RF channel used To execute the PER test at the channel 23 press Enter on your keyboard Then choose 1 to initiate the PER test mode Then you may input 1000 packets in 5 msec interval to see the following example Please confirm the channel used is Channel 23 in the display Please note the receiver will learn which channel is to be used for the test automatically 16 User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 Figure 2 7 2 1 4 2 Test Transmitter HyperTerminal File Edit View Call Transfer Help DOS 2535 E Command gt 1 PER test sender My Profilel MAC 22 95 78 01 00 00 00 47 Short 0001 PanID 2514 Send to Short addr Send count dec Interval dec msec ed channel to 11 Cmd EIE Current 0001 0002 Connected 00 37 03 Auto detect 19200 8 N 1 PER test and results at Channel 23 Adjusting the Output Power You may wish to control the outp
22. 74 P74 EX20 KR4 INTP8 LEFT 4 P75 P75 EX21 KR5 INTP9 RIGHT 5 GND GND 6 P76 P76 EX22 KR6 INTP10 DOWN Figure 3 4 Directional switch SW2 TK 78KOR KG3 UZ 3 2 8 SW3 SW4 SW3 and SWA are push switches They are connected to pull up resistors and their outputs go Low when they are pushed Table 3 10 SWS and SW4 terminal list Switch Signal name Terminal CPU name at connection destination SW3 P70 P70 EX16 KRO SWA P71 P71 EX17 KR1 User s Manual U19054EE2VOUMOO 39 Chapter 3 Hardware specification TK 78KOR KG3 UZ Figure 3 5 Switches SW3 right and SW4 left 3 2 4 SW5 SW5 is the reset switch The TK 78KOR KG3 UZ board is reset when SW5 is pushed Figure 3 6 Switch SW5 3 3 Jumper JP1 This jumper switches the power supply of the board Table 3 11 JP1 connection Supply power from USB connected to USB1 Supply power from batteries connected to CN2 1 2pin short JP1 2 3pin short 3 4 LEDs 3 4 1 LED1 The Power LED LED1 is activated when the power supply is turned on Figure 3 7 LED1 as Power LED TK 78KOR KG3 UZ 40 User s Manual U19054EE2VOUMOO Hardware specification TK 78KOR KG3 UZ Chapter 3 3 4 2 Table 3 12 Figure 3 8 3 5 Figure 3 9 3 6 Table 3 13 LED2 LED3 and LED4 LED2 3 and 4 are available for applications To turn on a LED set the output port to Low LED 2 3 and 4 terminal list TK
23. 9 2 Test Transmitter HyperTerminal File Edit View Call Transfer Help Da 53 DH e Command gt 0 Manually set UZ2400 reg Register 203 LReg 2031 00 78K0R UZ Hardware RF Test program 2007 Skyley Networks PER test sender shift 1 Re PER test receiver Continuous TX Pseudo Noise Continuous TX Raw carrier RX Mode IDLE Mode Turn to sleep mode Standby Mode Set RF channel Manually set UZ2400 register Reseting RF Command gt Connected 00 38 46 Auto detect 19200 8 N 1 Setting output power Then you could start the PER test again The minimum output power is set by F8 User s Manual U19054EE2VOUMOO 19 Chapter 2 Sample Applications Test Transmitter HyperTerminal OK Fie Edit View Cal Transfer Help Dam 33m Command gt 0 Manually set UZ2400 reg Register 203 LReg 2031 60 gt 78K0R UZ Hardware RF Test program 2007 Skyley Networks PER test sender shift 1 Retry result PER test receiver Continuous TX Pseudo Noise Continuous TX Raw carrier RX Mode IDLE Mode Turn to sleep mode Standby Mode Set RF channel Manually set UZ2400 register Reseting RF Connected 00 26 29 Auto detect 19200 8 N 1 Figure 2 10 Set minimum output power Then if you try an other PER test with the minimum output power value you may find larger PER value with smaller RSSI value in this case 20 User s Manual U19054EE2VOU
24. MOO Sample Applications Chapter 2 Figure 2 11 2 1 7 e Test Transmitter HyperTerminal TOR Fie Edit View Cal Transfer Help Dc amp sem Send to Short addr 0002 Send count dec 1000 Interval dec msec 5 5 Set channel to 11 Cmd 1 Prepare to send Set channel to 23 Current Request to result OK Results Set channel to 23 Current E Connected 00 35 04 Auto detect 19200 8 N 1 PER test and results at minimum output power Please note this adjustment is applied only to the transmitter The receiver always sends back the test results with the O dB output power default using the channel 11 PER Test Receiver The menu item 2 sets the board to receiver mode in the PER test By using two PCs and two TK 78KOR KG3 UZ boards you can select Transmitter and Receiver board by menu items 1 and 2 If you connect only one TK 78KOR KG3 UZ board to a PC this will be the Transmitter one If the Receiver board is battery powered the receiver selection has to be done by SW1 Bit8 as described in the beginning of this chapter Continuous TX Pseudo Noise The menu item 3 initiates the modulated RF transmission The data carried are pseudo random numbers You can define the channel using the menu 9 and the output power using the menu O Continuous TX Raw carrier The menu item 4 initiates the carrier transmission The output power is O dB as a reset default You can define the chan
25. NEC User s Manual 16 bit 78KOR ZigBee PRO Premium Development Kit Documen t No U19054EE2VOUMOO Date published July 2009 O NEC Electronics 2009 Printed in Germany Legal Notes The information in this document is current as of July 2008 The information is subject to change without notice For actual design in refer to the latest publications of NEC Electronics data sheets or data books etc for the most up to date specifications of NEC Electronics products Not all products and or types are available in every country Please check with an NEC Electronics sales representative for availability and additional information No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Electronics NEC Electronics assumes no responsibility for any errors that may appear in this document NEC Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this document or any other liability arising from the use of such products No license express implied or otherwise is granted under any patents copyrights or other intellectual property rights of NEC Electronics or others Descriptions of circuits software and other related information in this document are provided for illustrative purposes in semiconductor product o
26. PUS TPU4 ea 20 Du SW1 Power Source LED1 4 CN1 MiniCube2 I F Figure 4 8 Top view of 78KOR UZ Stick layout CN2 USB I F Switching CN3 USB I F Y CN2 Expansion I F 8KOR UZ Stic SW1 Power Source Figure 4 9 Top view of 78KOR UZ Stick User s Manual U19054EE2VOUMOO 51 52 Chapter 5 5 1 5 2 5 2 1 78KOR ZigBee PRO Premium Development Kit Installation and Operation The IAR Embedded Workbench including the C SPY debugger allows the user to build and download application programs to the 78KOR ZigBee PRO Premium Development Kit As the communication interface between the PC host system and the 78KOR ZigBee PRO Premium Development Kit board is USB a USB interface line is needed Before you can download and run a program relevant software and hardware must be installed properly CDROM contents IAR Embedded Workbench for 78K0 Kickstart version IEEE 802 15 4 MAC library Sample Programs Documentation Hardware Installation After unpacking 78KOR ZigBee PRO Premium Development Kit connect one of the boards to your host computer using one provided USB interface cable When one of the 78KOR ZigBee PRO Premium Development Kit boards is connected the USB driver needs to be installed on the host machine Please refer to the specific section 5 3 USB Driver Installation Software Installation The 78KOR ZigBee PRO Premium Development Kit package comes with the following software demo packages
27. T POWER uut A nma hn De ted a 49 4 4 2 oW2 USB Int rface iia A A ER ERES 50 4 4 3 LED1 Power Indication i ee ssena ee nPE Ea TE Re 50 4 4 4 LEDZ LEDS and LEDA coi A d Ried 50 4 5 Design Data and Parts Layout 0 02sec ene 51 Chapter 5 78KOR ZigBee PRO Premium Development Kit Installation and Operation ssssuuuL 52 5 1 Hardware Installation ooocooccccccccooo ern 52 5 2 Software Installation 5 22 na used les foe Peed are am pee REED DEED ea belts 52 5 2 1 IAR Systems Embedded Workbench Installation oocoooooooommooo 52 5 2 2 Sample Program Installation 0 0 0 cece ete eens 53 5 3 USB Driver Installation ooooccccccccoccr n 53 5 3 1 Installation on Windows 2000 o oooccccccccccc ere 53 5 3 2 Installation on Windows XP oococccocccococonnnrrnecoonnn In 57 5 3 3 Confirmation of USB Driver Installation 0 00 00 eee eee 60 Chapter6 IAR Sample Session 00 000 cece ee 62 6 1 Loading a Project and Programming the Board luusuuss 62 6 2 Generating and Flash Programming a Hex File 000 0 cece eee eee 68 6 3 Setting of different MAC address by Preprocessor command 72 6 4 Using of the UART for debugging s ssessssseee esee 73 Chapter 7 Sample Programs tt T tt uuuusses 74 7 1 Introducti
28. a single directory which will be called main directory of the sample so we have these different folders associated to the Sample Programs folder MAC Sample 1 folder MAC Sample 2 Note that this sample program has not been develop for the 78KOR UZ Stick because there is no Joystick available on the hardware stick folder RF Test B Sample Programs E E 78KOR UZ Stick H MAC Sample 1 H O RF Test Bo settings A 7BKOR UZ Stick E E TK 78K0RKG3 UZ 5 MAC Sample 1 H MAC Sample 2 H O RF Test ae settings TK 78KORKG3 UZ Global project structure All the Sample Programs use the same directory structure All the C sources files are located in the directory Source The include directory contains all the C header files User s Manual U19054EE2VOUMOO Sample Programs Chapter 7 Figure 7 2 7 2 The folder MAC library contains the IEEE 802 15 4 MAC stack library for the 78KOR The xcl directory contains the default linker control file of the 78KOR Kx3 device which can be modified eventually Each sample program uses the two default targets The first target Debug in the folder of the same name holds all files used for debugging session and the other one Release in the folder of the same name contains the programmable files for programming the 78KOR Kx3 internal Flash memory via the Minicube2 All the configuration files for IAR Embedded Workbench are loca
29. address of the PER test as shown below User s Manual U19054EE2VOUMOO 13 Chapter 2 Sample Applications Figure 2 4 Note 14 e Test Transmitter HyperTerminal File Edit View Call Transfer Help Dg DH 2007 Skyley Networks PER test sender shift 1 Retry result PER test receiver Continuous T4 Pseudo Noise Continuous TX Raw carrier RK Mode IDLE Mode Turn to sleep mode Standby Mode Set RF channel Manually set UZ2400 register Reseting RF Command PER test sender My Profilel MAC 22 95 78 01 00 00 00 47 0001 2914 Connected 00 13 59 Auto detect 19200 8 N 1 Initiate the PER test from the transmitter Now you may input 0002 if the address of your receiver board is set to 0002 Then you will be asked how many packets you wish to consume in the PER test You may input 1000 Then you will be asked the interval of packets in msec You may input 3 Then the PER test will be executed You will see the number of packets sent that is 1000 as you selected the number of the received packets the calculated PER in 96 the maximum and minimum RSSI values in the PER test PER Packet Error Rate RSSI Received Signal Strength Indication User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 Figure 2 5 e Test Transmitter HyperTerminal File Edit View Cal Transfer Help D Command
30. apters aF Ports COM amp LPT A d Communications Port COM1 Communications Port COM2 4 ECP Printer Port LPT1 E NEC Electronics Starter Kit Virtual UART COM3 SB Processors SCSI and RAID controllers 8 Sound video and game controllers S Storage volumes System devices Universal Serial Bus controllers HH A AAA AA F F E t Figure 5 14 Checking the driver installations in the Device Manager User s Manual U19054EE2VOUMOO 61 62 Chapter 6 IAR Sample Session 6 1 Figure 6 1 Loading a Project and Programming the Board When everything is set up correctly the IAR Embedded Workbench can be started To do so start the Embedded Workbench from Windows Start menu All programs gt IAR Systems gt IAR Embedded Workbench Kickstart for NEC 78K IAR Embedded Workbench The following screen appears JAR Embedded Workbench IDE Fil dit View Project Tools Windov Embedded Workbench Startup ie Create new project in current workspace Dl Add existing project to current workspace El Open existing workspace ag Example workspaces Recent workspaces T Do not show this window at startup IAR Embedded Workbench startup menu Then open the workspace of the Sample Programs for the TK 78KOR KG3 UZ board File gt Open gt Workspace or select
31. association and data transfer as text messages If you connect the HyperTerminal with your Coordinator and push the reset button on the Coordinator board the following opening message will appear If not please check COM port setting of your USB connection Test MAC sample program 2 Coordinator HyperTerminal OK Fie Edit View Cal Transfer Help SWITCH for COORDINATOR Sample Application 2 for TK 78K0R KG3 UZ LED test for a star network 2006 Skyley Networks gt MLME STRRT request gt MHLHE START confirm gt Status 00 Connected 00 00 22 Auto detect 19200 8 N 1 Figure 2 20 Coordinator startup Now the coordinator has started up successfully If you start up End Devices as described in the section 2 3 3 Starting up an end devices pressing reset and keeping the directional switch on the UP position the following messages will appear on the HyperTerminal 30 User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 Test MAC sample program 2 End Device HyperTerminal File Edit View Call Transfer Help Dae 523 085 Y SWITCH for END DEVICE Sample Application 2 for TK 8K R KG3 UZ LED test for a star network 2006 Skyley Networks gt MLME ASSOCIATE request gt MLME ASSOCIATE confirm gt Associated Shor tAddr 4352 gt Status 88 Connected 00 05 09 Auto detect 19200 8 N 1 Figure 2 21 Short address assignment End Device 1 A short address of 4352 was assigned
32. clock 32 768 kHz standard equipment e 512 kB FLASH memory and 30 kB RAM memory are built into CPU chip Hardware is ready to accommodate 2 4GHz transceiver chip UZ2400 Accordance with IEEE 802 15 4 ZigBee M Specifications for Low Rate Wireless Personal Area Networks made by Uniband Electronic Corporation http www ubec com tw index html e Attached antenna Titanis made by Gigaant http www gigaant com e A maximum of 40 I O ports are equipped for expanded use with an on board temperature sensor for applications development S 8120C made by SII htto www sili co jp Debugging using on chip debug function can be done e The board itself is quite and easy to handle the CPU board size is 60 mm x 90 mm and the CPU board size with the RF transceiver is 60 mm x 102 mm Please inquire direct to the parts maker about specification of UZ2400 RF board antenna and temperature sensor Package Content The 78KOR ZigBee Premium Development Kit consists of four TK 78KOR KG3 UZ development board and one 78KOR UZ Stick which is configured to act as Air Sniffer hardware Also supplied is the unlimited security User s Manual U19054EE2VOUMOO 7 Chapter 1 78KOR ZigBeea PRO Premium Development Kit 1 3 Host PC Host Interface Package Contents Note Trademarks 1 4 dongle for the 78KOR ZigBee M Stack and ZigBee M Software Developers Kit ZigBee SDK tools The following software is also supplied
33. communication When it is set to SER it enables the serial communication UART connect to the 78KOR UZ Stick to the USB interface after switch setting USB interface setting of SW2 78KOR UZ Stick Normal mode or Minicube2 use SER Debug mode USB interface used for TK interface of IAR DBG sw INS cua 78K0R UZ Stick Top view of SW2 78K0R_UZ_Stick LED1 Power Indication LED1 is a green LED to indicate the availability of power LED1 status 78KOR UZ Stick Status LED Power ON Green Power OFF Off Top view of LED1 layout 78KOR UZ Stick LED2 LED3 and LED4 LED2 LED3 and LEDA are available for applications They emit orange by setting respectively the output pins P62 P61 and P60 of the microcontroller to Low LED2 LEDS and LED4 terminal list 7 C8KOR UZ Stick LED Name MCU pin Port Level LED2 P62 P62 LOW for orange User s Manual U19054EE2VOUMOO Hardware specification 78KOR UZ Stick Chapter 4 LED Name MCU pin Port Level HIGH for OFF LOW for orange LED3 P61 P61 SDAO HIGH for OFF LOW for orange LED4 P60 P60 SCLO HIGH for OFF LED3 LED4 Figure 4 7 Top view of LED2 LED3 and LED4 layout 78KOR UZ Stick 4 5 Design Data and Parts Layout CN2 USB I F Switching CN2 Expansion I F CN3 USB I F TBKOR UZ Stick TPUl C37 SER 0G n ciere S 7 TPU3 TPUZ E la T
34. d depending upon the selection of SW2 following a reset SW2 address selection SW2 UP Position Selected Default Address 1 SW2 CENTER Position Selected Default Address 2 SW2 LEFT Position Selected Default Address 3 SW2 RIGHT Position Selected Default Address 4 SW2 DOWN Position Selected Default Address 5 SW2 DEFAULT Position Selected Default Address 6 Please make sure SW2 is always active in a different position following a reset in order to avoid that end devices will try and associate using the same address Operation The coordinator generates beacon at channel 11 of 2405 MHz An end device makes a network association If successful LED4 on the board is ON When an End device and the Coordinator are successfully associated pressing SW3 on the End Device will cause LED2 to blink on the Coordinator and pressing SWA on the End Device will cause LEDS to blink on the Coordinator The number of times of blink depends on the sequence the End Device joined in the network For instance if an End Device is the third End Device for the network the LED will blink three times Correspondence between End Device action and Coordinator LED on Coordinator SW on End Device LED2 SW3 LED3 SW4 User s Manual U19054EE2VOUMOO 29 Chapter 2 Sample Applications 2 3 5 Using Terminal Program It is also possible to connect HyperTerminal to the development boards and view the
35. ds can be set to transmitter or receiver mode and the short address of each board can be selected Please set the switches on the transmitter and the receiver board according to the tables below Set one board as a transmitter with a short address of 0x0001 and one board as a receiver with a short address of 0x0002 Operation settings for RF Test Program JP1 1 2 short USB side SW5 UART side Bit OFF Bit2 OFF Bit3 OFF Bit4 ON Sw Bit5 ON Bit6 See table below for address choice Bit7 OFF Bit8 OFF for transmitter mode ON for receiver mode Address settings for RF Test Program Short Address 0001 0002 0003 0004 Bit6 OFF ON OFF ON SW1 Bit7 OFF OFF ON ON Then connect each board to a PC with a USB cable and open for each connection the HyperTerminal communication Before opening a HyperTerminal session you need to identify the COM Port number of the USB port on your PC in order to open and set the HyperTerminal with the relevant COM port For the identification of the COM port you can use Control Panel gt System gt Hardware Device Manager gt Ports COM 4 LPT Then start HyperTerminal with settings listed in the section 2 1 RF Test Program Now you will find the following opening menu on your PC screen If not please try the RESET button on the TK 78KOR KG3 UZ board User s Manual U19054EE2VOUMOO Sample App
36. e Setup for 78KOR 78F1168A0 ID code FFFFFFFFFFFFFFFFFFFF ras flash before next ID check Main clock Sub clock fs q External External C je Time unit nsec a8 None MHz None Target power off C Permit Not Permit Flash programming Permit C Not Permit Peripheral break A timer B serial etc Pin mask r TARGET RESET NM T INTERNAL RESET Memory map Start address Lenath Type 0x00000 Ox FFFF Internal ROM 512 Kbytes OxF8700 OxFFEFF Internal RAM 30720 bytes Cancel Default r Target connect TOOLO TOOL1 Internal ROM Y Add Remove Remove All Figure 6 7 TK 78 hardware setup menu Now the debugger is started and the demo project is downloaded to the TK 78KOR KG3 UZ board The progress of downloading is indicated by blue dots in the TK 78 Emulator window Please note downloading of larger executables can take some time After the download was completed all debug features of IAR C SPY debugger are available i e Single Stepping Step Over In Out Go Execution Breakpoints Register Memory view etc To get more details on the debugger configuration and capabilities please refer to the 78K IAR Embedded Workbench IDE User Guide of the IAR installation User s Manual U19054EE2VOUMOO 67 Chapter 6 IAR Sample Session Z IAR Embedded Workbench IDE OBS File Edit View Project Debug Emulator Tools Window Help Deuda e z2 e 5 B 2222
37. ebuild the project by selecting Project gt Options gt Rebuilt all You should see the HEX file in the workspace under the directory Output 68 User s Manual U19054EE2VOUMOO IAR Sample Session Chapter 6 Workspace Release y Files a B TK 78K0RKG3 UZ MAC sample 1 Release Ha MAC Library B stack r26 Ha A Source E hardware_78k0r c F main c Lg A Output E TK 8K RKG3 UZ MAC sample 1 hex L M TK 78KORKG3 UZ MAC sample 1 map Overview TK 78KORKG3 UZ MAC sample 1 TK 78K0RKG3 UZ MAC sample 2 TK 78KORKG3 UZ RF test Figure 6 9 Workspace of the MAC Sample Program 1 Location of your hex file The generated HEX file is located in the output directory chosen for Executable Libraries All output file directory are defined in the Embedded Workbench menu Project gt Options gt General Options Output Options for node TK 78KORKG3 UZ MAC sample 1 Category General Options err Compiler Target Cute Dubra Configuration Library Options Stack Heap 4 Assembler Custom Build Build Actions Dutput file Linker Executable Debugger Library IE 78 IECUBE MINICUBE m Output directories Simulator Executables libraries TK 78 Release E xe Object files Release O bj List files Release List Figure 6 10 JAR output files location In our case the directory of the MAC Sample Program 1 will be found under the folder Exe in the folder
38. ed C Display a list of the known drivers for this device so that can choose a specific driver lt Back Cancel Figure 5 2 Search Method Windows 2000 Check the Specify a location check box only then click Next gt Found New Hardware Wizard Locate Driver Files Where do you want Windows to search for driver files Search for driver files for the following hardware device e USB Serial The wizard searches for suitable drivers in its driver database on your computer and in any of the following optional search locations that you specify To start the search click Next If you are searching on a floppy disk or CD ROM drive insert the floppy disk or CD before clicking Next ptional search locations Floppy disk drives CD ROM drives v Specify a location Microsoft Windows U pdate lt Back Cancel Figure 5 3 Driver File Location Windows 2000 Locate to the folder C Program Files IAR Systems Embedded Workbench 4 0 78K config nec ie_pc_driver MINICUBE User s Manual U19054EE2VOUMOO 78KOR ZigBeea PRO Premium Development Kit Chapter 5 Installation and Operation Locate File 2 x Look in Sy MINICUBE e ck History j Deskto i EN P i 27 03 2006 11 03 My Documents History My Computer i 20 10 2006 07 47 2 c3 3 Floppy A i 27 01 2006 13 48 a amp Local Disk C i 27 01 2006 13 48 Desktop Program Files ON IAR Systems pos Embedded W orkbe
39. ed Replace the original HEX file of the opened project by the one you want to program and give it the same name see the section Location of your hex file and Name of your hex file What is really primordial is to change the option of IAR in order you could program the board with your chosen HEX file putting in the location of this default project You should select Ask in the following menu Tools gt Options Project gt Make before debugging IDE Options Common Fonts Key Bindings gt Language Stop build operation on Never Editor Save editor windows before building Always Save workspace and projects before Always Source Code Control building Debugger Make before debugging Ask X Stack Reload last workspace at startup V Play a sound after build operations IV Generate browse information Cancel IAR environment option setting Now you could program the board with the Debug button or by selecting the command Project gt Debug A window will ask the following question you should answer NO User s Manual U19054EE2VOUMOO 71 Chapter 6 IAR Sample Session 72 Figure 6 14 Notes 6 3 Remark iaridepm 2 J Do you want to Make before debugging Yes C mo Cancel Question before debugging After you board will be programmed it could take more or less time depending on the size of your program When the download is complete you should click the
40. er 4 Table 4 3 Connector CN2 terminal list 7 8KOR UZ Stick Figure 4 3 4 4 4 4 1 Table 4 4 CN2 Signal name connection destination _ Notes 1 GND GND 2 VBAT N C From battery 3 P10 P10 SO00 TxDO 4 P11 P11 SI00 RxDO 5 P141 P141 PCLBUZ1 INTP7 6 P10 P10 SCK00 7 P25 P25 ANI5 8 P23 P23 ANI3 9 P24 P24 ANI4 10 GND GNDN C IADE IN JAPAN 01958 62 0186A e Location of CN2 Top view 78KOR UZ Stick Switches and LEDs SW1 Power Switch SW1 is used for the selection of power source USB power or battery power via CN2 Power supply setting of SW1 78KOR_UZ_Stick USB Power USB CN2 connector expansion for battery interface BAT E sw 8KOR UZ Stick Figure 4 4 Top view of SW1 78KOR UZ Stick Notes 1 The 78KOR UZ Stick module is equipped with a voltage regulator which regulates the source of 4 75 10 0 V to 3 3V User s Manual U19054EE2VOUMOO 49 Chapter 4 Hardware specification 78KOR UZ Stick 50 4 4 2 Table 4 5 Figure 4 5 4 4 3 Table 4 6 Figure 4 6 4 4 4 Table 4 7 2 The power consumption of the module largely depends on the status of the driver of the USB interface One example of measured consumed current is 60 mA in case USB is not connected while 80 mA while USB is connected SW2 USB Interface SW1 is used for selecting the USB interface use Debugging interface or general serial
41. et SW AF 3 Sw3 o Sw Or Op og sw2 Je e we 503 gt 1 E T MT cae 4 St SW1 Mode Setting JE Vibo ce S IN JAP RoHS COMPLIAN CN2 Battery Connector USB1 USB I F JP1 Power Supply Selection Figure 3 12 Hardware overview of the TK 78KOR KG3 UZ board 44 User s Manual U19054EE2VOUMOO Hardware specification TK 78KOR KG3 UZ Chapter 3 3 10 2 RF Board Connection Figure_KOR Figure 3 18 Overview of the connection of the RF board TK 78KOR KG3 UZ User s Manual U19054EE2VOUMOO 45 Chapter 4 Hardware specification 78KOR UZ Stick The 78KOR UZ Stick is an additional module based on the NEC 78KOR KE3 microcontroller This module can be used as either a network node or a dedicated hardware module for interfacing to the Air Sniffer application part of the ZigBee SDK depending upon the flash program loaded on to the module 4 1 Main Features Features of the 78KOR UZ Stick include e The board uses the NEC Electronics 16 bit single chip microcontroller uPD78F1 146 Hardware is compliant with IEEE 802 15 4 ZigBee wireless personal area network Object code of IEEE 802 15 4 PHY MAC is included in the kit and possible to utilize as a library 256 kB of Flash memory available on chip in the 78KOR KE3 microcontroller e The board contents a 2 4GHz transceiver chip UZ2400 Accordance with IEEE 802 15 4 ZigBee Specifications for Low Rate Wireless Personal Area Networks made by Uniband E
42. f your network coordinator and your end device gn PanlD gt Pan ID of the network gn AssocAddr default short address for end device gn_CoordShortID gt default short address of the coordinator System Operation This section provides a brief overview of the operation of the sample programs provided It is recommended that the reader familiarizes themselves with the MAC Library Reference Manual to fully understand the operation and usage of the library The below flow diagram shows the main program initialization and entry points for the MAC sample application 1 Text chat User s Manual U19054EE2VOUMOO Sample Programs Chapter 7 Program Entry Hardware Intialise SK Base Init SK Prinf SK Base Main SampleApplication 0 Figure 7 3 Initialization flow diagram Initialise the CSI Interface and UBEC Device Initialise the stack with the MAC address Notify the user that the application has started Main routine to service the protocol stack this must be called regularly by the application to ensure that no data is lost Main sample application procedure The main part of the program is the SampleApplication procedure the elements of this process are Servicing the SK LAYER API for messages Managing and actionning of the user interface User s Manual U19054EE2VOUMOO 7T Chapter 7 Sample Programs 7 3 1 Servicing the SK LAYER API The following flow chart shows
43. fice in your country to obtain a list of authorized representatives anddistributors They will verify Device availability Ordering information Product release schedule Availability of related technical literature Development environment specifications for example specifications for third party tools and components host computers power plugs AC supply voltages and so forth Network requirements In addition trademarks registered trademarks export restrictions and otherlegal issues may also vary from country to country NEC Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki Kanagawa 211 8668 Japan Tel 044 4355111 http www necel com Santa Clara CA 95050 2554 U S A Tel 408 5886000 http www am necel com Europe NEC Electronics Europe GmbH Arcadiastrasse 10 40472 D sseldorf Germany Tel 0211 65030 http www eu necel com United Kingdom Branch Cygnus House Sunrise Parkway Linford Wood Milton Keynes MK14 6NP U K Tel 01908 691133 Succursale Francaise 9 rue Paul Dautier B P 52 78142 Velizy Villacoublay C dex France Tel 01 30675800 Tyskland Filial Taby Centrum Entrance S 7th floor 18322 T by Sweden Tel 08 6387200 Filiale Italiana Via Fabio Filzi 25 A 20124 Milano Italy Tel 02 667541 Branch The Netherlands Steijgerweg 6 5616 HS Eindhoven The Netherlands Tel 040 2654010 User s Manual U19054EE2VOUMOO Asia amp Oceania NEC Elect
44. gory Linker Select the Output tab and check that the output format will contained the debug information for the C Spy debugger like in the screen below Important Remark When you are working with the TK interface of IAR to debug or to flash program a sample project always ensure that the Debug output file format for the C spy debugger of IAR is selected 64 User s Manual U19054EE2VOUMOO IAR Sample Session Chapter 6 Options for node TK 78KORKG3 UZ MAC sample 1 Category General Options C C Compiler Assembler Custom Build B Dutput file Override default Secondary output file Debugger TK 78K0RKG3 UZ MAC sample None for the selected format IE 78 IECUBE MINICUBE Simulator TK 78 Allow C SPY specific extra output file C Other Module local symbols Include all Cancel Figure 6 4 Debug output file format setting Next the correct linker settings of the demo project will be checked This can be done in the Linker category as shown below Select the Config tab and check that the linker command file Ink78f1166_a0 xcl which is located in the directory xcl of the project is selected This file is used by the linker and contains information on where to place the different sections of code data and constants that may be used within the demo project User s Manual U19054EE2VOUMOO 65 Chapter 6 IAR Sample Session 66 Figure 6 5 Options for node TK
45. gt Setup gt Driver When the microcontroller is part of the family 78KOR you do not need to select the COM port of connection because IAR do that automatically But you need to check that the board is the only one connected to your PC to avoid confusion Disable the item Run to main in the menu Options gt Debugger Setup Disable the load of the stack plugin in the menu Options gt Debugger gt Plugins Set the switch in the right position given by the Table 3 4 3 5 On chip debug mode for the TK 78KOR KG3 UZ User s Manual U19054EE2VOUMOO IAR Sample Session Chapter 6 Figure 6 13 Connect the board via the USB cable provided Programming the Hex file with a default project If you want to program a HEX file in your TK 78KOR KG3 UZ board but you have not the corresponding source project for IAR you could follow these instructions Open any IAR project for the TK 78KOR board RF test MAC sample program 1 or 2 select the Release target Select TK 78 in the Options Debugger gt Setup gt Driver Disable the item Run to main in the menu Options gt Debugger gt Setup Disable the load of the stack plugin in the menu Options Debugger gt Plugins Set the switch in the right position given by the Table 3 4 3 5 On chip debug mode for the TK 78KOR KG3 UZ Connect the board via the USB cable provided and remove any other board connect
46. iation is successful Command gt C gt MLME START request gt MLME START confirm gt Status 00 Command gt gt MLME ASSOCIATE indication gt from 123456789ABCOBB2 associated to 4321 Network association message at the coordinator Text Chat Now the network is prepared for you to start text chat between an end device and the coordinator At first you may start with the coordinator Press S in the HyperTerminal window associated then input the short address of an end device 4321 in this example then input your text message up to 102 bytes Hello in this example User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 Command gt gt MLME ASSOCIATE indication gt from 123456789ABC0002 associated to 4321 Help S Send Message gt EL T gt Send to she address 4321 gt Message Command gt Figure 2 18 Text chat at coordinator device 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 gt gt MCPS DRTR indication gt from 1975 2420 dd m Figure 2 19 Text chat at end device Now you can reply from the end device 4321 to the coordinator 1975 by inputting S then 1975 and your reply text User s Manual U19054EE2VOUMOO 27 Chapter 2 Sample Applications 28 2 3 2 3 1 Table 2 5
47. ication from 123456789ABC0005 associated to MCPS DRTR indication from 4356 2420 gt HCPS DATA indication from 4356 2420 Connected 00 06 33 Auto detect 19200 8 N 1 Figure 2 23 Signal Sent to Coordinator User s Manual U19054EE2VOUMOO 33 34 Chapter 3 Hardware specification TK 78KOR KG3 UZ Table 3 1 General hardware features TK 78KOR KG3 UZ Item Details Part number pyPD78F1168GC Clock Main 20 MHz Subclock 32 768 kHz CPU Internal flash memory 512 kB Internal RAM 30 kB Operation voltage 5 V supply from USB 9 V Supply from a battery minimum 6 5 V USB interface Mini USB x 1 channel RF board UZ2400 RF Board Temperature sensor Temperature sensor x 1 LED LED 1 Power LED 2 4 Multipurpose Multipurpose input 4 directional switch with center push x 1 Push switch x 2 Reset Switch Push switch x 1 OCD MiniCube interface Connector mounted On board Flash memory writing Possible via MiniCube Interface 3 1 Terminal list Following are the terminal tables of CN1 CN3 and CN4 of the TK 78KOR KG3 UZ CPU board Table 3 2 Connector CN1 terminal list TK 78KOR KG3 UZ CN Signal name connection destination __ Notes 1 P142 P142 SCK20 SCL20 2 P141 P141 PCLBUZ1 INTP7 3 P140 P140 PCLBUZO INTP6 4 P47 P47 INTP2 5 P46 P46 INTP1 TIOS TO05 6 P45 P45 SO01 7 P44 P44
48. ings for the TK 78KOR KG3 UZ Bit 1 ON OFF Note Bit 2 ON SW1 Bit 3 ON Bit 4 OFF Bit 5 OFF User s Manual U19054EE2VOUMOO 37 Chapter 3 Hardware specification TK 78KOR KG3 UZ 38 Notes Table 3 6 Note 3 2 1 2 Table 3 7 3 2 1 3 1 ON The microcontroller stays being reset until TK interface is started OFF The microcontroller runs the programs stored in the flash memory as soon as it gets power supply 2 Ifyou use IAR TK interface for debugging it uses P40 and P41 for communicating with host machine Therefore you cannot use P40 and P41 as general purpose serial communication at the same time Torun the programs stored in built in flash memory without using the TK interface of IAR please use following settings and re supply USB power or make a hardware reset You can use the On chip debug function via the Minicube 2 and not by using IAR TK interface In this case refer to the following section with the table 3 7 Normal Operation Mode for the TK 78KOR KG3 UZ Serial communication via USB connector not available Bit 1 OFF Bit 2 OFF SW Bit 3 OFF Bit 4 OFF Bit 5 OFF In this case the serial communication via P40 and P41 will still not be available because these ports are not connected to the USB connector SWI bit 4 and 5 are OFF Normal Operation Mode and Minicube2 Use Please change to the following settings when you execute the progra
49. ipurpose OCD MiniCube interface MINICUBE2 connector CN1 4 2 Block Diagram 9 0V I O I F Lo 3 3V eyes 5 0V POWER SW USB I F USB UART MCU MINICUBE2 I F al Transceiver UZ2400 diu Debug I F VO I F Temperature Sensor S 8120CNB Figure 4 1 78KO0R UZ Stick block diagram 4 3 Interface Connection User s Manual U19054EE2VOUMOO 47 Chapter 4 Hardware specification 78KOR UZ Stick 48 4 3 1 Table 4 2 Figure 4 2 4 3 2 CN1 Minicube Connector CN1 is the Minicube2 connector You need to use the conversion connector SICA1612P when you use the Minicube2 Connector CN1 terminal list 8KOR UZ Stick CN Signal name connection destination __ Notes 1 GND P142 SCK20 SCL20 2 RESET_OUT RESET 3 RXD P40 TOOLO 4 VDD VDD 5 TXD P40 TOOLO 6 N C N C 7 N C N C 8 N C N C 9 N C N C 10 N C N C 11 N C N C 12 N C N C 13 N C N C 14 FLMDO FLMDO 15 RESET_IN N C Reset trigger signal 16 CLK_IN P41 TOOL1 17 N C N C 18 N C N C 19 N C N C 20 N C N C l i 3 3 CNI O EL Location of CN1 Top view 78KOR UZ Stick CN2 Expansion Connector The expansion connector provides one serial I O port UART or CSI one interrupt input port and three analogue input ports It also provides with a connection to a 6LR614 9V battery User s Manual U19054EE2VOUMOO Hardware specification 78KOR UZ Stick Chapt
50. l equipment home electronic appliances machine tools personal electronic equipment and industrial robots Special Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime User s Manual U19054EE2VOUMOO systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems life support systems and medical equipment for life support etc The quality grade of NEC Electronics products is Standard unless otherwise expressly specified in NEC Electronics data sheets or data books etc If customers wish to use NEC Electronics products in applications not intended by NEC Electronics they must contact an NEC Electronics sales representative in advance to determine NEC Electronics willingness to support a given application Note 1 NEC Electronics as used in this statement means NEC Electronics Corporation and also includes its majority owned subsidiaries 2 NEC Electronics products means any product developed or manufactured by or for NEC Electronics as defined above User s Manual U19054EE2VOUMOO 3 America NEC Electronics America Inc 2880 Scott Blvd Regional Information Some information contained in this document may vary from country to country Before using any NEC product in your application please contact the NEC of
51. lectronic Corporation http www ubec com tw index html Board includes an antenna made by Gigaant and a temperature sensor S 8120 CNB made by Seiko http www gigaant com and http www sii co jp Enable to connect an On Chip Debug Emulator MINICUBE QB 78KOMINI or QB MINI2 An optional additional adaptor SICA1012P is required USB connection can be utilized not only for debugging sessions using the IAR TK interface but also for user applications and power supply Real time clock is available on the board Power source can be selectable between USB or battery by a switch e Three orange LEDs are available on board for applications in addition to one green LED for power indication e The size of the module is 82 x 23 mm Note Please inquire direct to the parts maker about specification of UZ2400 RF board antenna and temperature sensor Table 4 1 General hardware features 78KOR UZ Stick Item Details Part number yPD78F1146GB Clock Main 20 MHz CPU Subclock 32 768 kHz Internal flash memory 256 kB Internal RAM 12 kB User s Manual U19054EE2VOUMOO Hardware specification 78KOR UZ Stick Chapter 4 Item Details 5 V supply from USB Ope ration voltage 4 75 10 V Supply from a battery USB interface USB connector type A RF board UZ2400 RF Board Temperature sensor Temperature sensor x 1 LED Green LED Power l Orange LED 1 3 Mult
52. leted Click Finish User s Manual U19054EE2VOUMOO 59 Chapter 5 78KOR ZigBeea PRO Premium Development Kit Installation and Operation Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for E NEC Electronics Starter Kit Virtual UART Click Finish to close the wizard Figure 5 13 USB Serial Port Driver Installation Completion Windows XP 5 3 3 Confirmation of USB Driver Installation After installing the USB driver check that the driver has been installed normally according to the procedure below When using the 78KOR ZigBee PRO Premium Development Kit board in combination with IAR C SPY Debugger the NEC Electronics Starter Kit Virtual UART should be present in the Device Manager tab like in the figure below To check that the drivers are installed normally in the Device Manager go to Windows Start Menu gt Control Panel gt System gt Hardware Device Manager gt Ports COM 4 LPT 60 User s Manual U19054EE2VOUMOO 78KOR ZigBeea PRO Premium Development Kit Chapter 5 Installation and Operation Device Manager File Action View Help MT 9 RA ETC LABOR 4 Computer we Disk drives E Display adapters 4 DVD CD ROM drives 2 Floppy disk controllers JA Floppy disk drives IDE ATA ATAPI controllers 59 Keyboards T Mice and other pointing devices g Monitors Bg Network ad
53. lications Chapter 2 Figure 2 3 2 1 2 Test Transmitter HyperTerminal Test Receiver HyperTerminal File Edit View Cal Transfer Help File Edt View Cal Transfer Help DS 53m YE DS 5305548 78K0R UZ Hardware RF Test program 78KOR UZ Hardware RF Test program 2007 Skyley Networks 2007 Skyley Networks PER test sender shift 1 Retry result PER test sender shift 1 Retry result PER test receiver PER test receiver Continuous TM Pseudo Noise Continuous TM Pseudo Noise Continuous TX Raw carrier Continuous TX Raw carrier RK Mode RX Mode IDLE Mode mE Hoda Turn to sleep mode Turn to sleep mode Standby Mode Standby Mode Set RF channel Manually set UZ2400 register Reseting RF Set RF channel Manually set UZ2400 register Reseting Doo Command gt 2 PER test reciever My Profile MAC 22 95 78 02 00 00 00 47 0002 PanID 2514 Set channel to 11 Cmd Connected 00 00 21 Auto detect 19200 amp N 1 y as Connected 00 05 48 Auto detect 19200 8 N 1 Multiple test menu for the transmitter receiver board As can be seen from the above multiple test modes are available via simple single key operation Execution of the Transmit Receive Test To initiate the Packet Error Rate PER test please press 1 in the menu of the transmitter board You will see My Profile with the short address 0001 Then you asked to enter the destination
54. m normally or when you use the MiniCube2 for programming or On chip debug session Obviously in this case the serial communication via the USB port is available for the application Normal Operation Mode for the TK 78KOR KG3 UZ Serial communication via USB connector enabled Bit 1 OFF Bit 2 OFF Sw1 Bit 3 OFF Bit 4 ON Bit 5 ON General purpose setting port Bit 6 7 and 8 of SW1 are general purpose setting ports The port state is Low because it is connected to GND when the switch is ON The port state is High because it is connected to a 10kQ pull up resistor when the switch is OFF User s Manual U19054EE2VOUMOO Hardware specification TK 78KOR KG3 UZ Chapter 3 Table 3 8 Switch SW1 bit6 8 terminal list TK 78KOR KG3 UZ Terminal CPU name at ud clea Bano connection destination Bit 6 P80 P80 EXO Bit 7 P81 P81 EX1 Bit 8 P82 P82 EX2 3 2 2 SW2 SW is a four directional switch with centre 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 of the uPD78F1168 CPU Table 3 9 Directional switch SW2 terminal list TK 78KOR KG3 UZ SW2 Signal name connection destination Jue 1 P72 P72 EX18 KR2 UP 2 P73 P73 EX19 KR3 CENTER PUSH 3 P
55. n CD or on the Windows Update Web site with your permission Read our privacy policy Can Windows connect to Windows Update to search for software O Yes this time only O Yes now and every time connect a device ON Click Next to continue Figure 5 9 Found New Hardware Wizard 1 Windows XP User s Manual U19054EE2VOUMOO 57 Chapter 5 78KOR ZigBeea PRO Premium Development Kit Installation and Operation Check that Install from a list or specific location Advanced is selected then click Next gt Found New Hardware Wizard This wizard helps you install software for USB Device If your hardware came with an installation CD lt lt or floppy disk insert it now What do you want the wizard to do O Install the software automatically Recommended Click Next to continue Figure 5 10 Found New Hardware Wizard 2 Windows XP Check that Search for the best driver in these locations is selected Select the Include this location in the search check box and then click Browse Enter C Program FilesNAR Systems Embedded Workbench 4 0 78K config nec ie_oc_driver MINICUBE in the address bar After the USB driver has been specified click Next gt 58 User s Manual U19054EE2VOUMOO 78KOR ZigBeea PRO Premium Development Kit Chapter 5 Installation and Operation Found New Hardware Wizard Please choose your search and installation options SS Y
56. n of a network coordinator in a star configuration 2 Text chat between a coordinator and an end device To use the MAC Sample Program 1 you need to prepare at least two PCs with USB interface and two TK 78KOR KG3 UZ boards MAC Sample Program 1 is provided as C source codes with the MAC Library Text chat for one coordinator and up to 4 end devices is supported To demonstrate this program you will again need a simple terminal emulation program like HyperTerminal connected to each node of the network Setting up the boards to your PC Assumption here in this section is you have minimum two or maximum 5 TK 78KOR KG3 UZ boards in which the TK 78KORKG3 UZ MAC sample 1 is programmed with a unique MAC address If your boards are not programmed you need to program each board using the Source codes provided setting a different MAC address for each board For further details about programming the board and setting the MAC addresses please read the section 6 IAR Sample Session of the present manual Please set the following switch configuration on all of your boards Normal operation mode switch settings JP1 1 2 short USB side Bit 1 OFF Bit 2 OFF Swi Bit 3 OFF Bit 4 ON Bit 5 ON Then please connect each TK 78KOR KG3 UZ board to a different PC with the USB cable provided You could connect more than one board to the same PC and you could start more than one HyperTerminal session for tho
57. nal program like HyperTerminal is required to select the relevant mode of operation For all HyperTerminal sessions please use the following settings and relevant serial port HyperTerminal port settings Baud rate 19200 Data bits 8 Parity NONE Stop bits 1 Flow control NONE Local echo OFF Line feed NO User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 COM1 Properties Port Settings Bits per second MEAN Data bits Parity Stop bits Flow control Restore Defaults Apply Figure 2 1 HyperTerminal settings 2 1 4 Procedure for One to One Transmit Receive Test Two TK 78KOR KG3 UZ boards are needed for this test Both boards need to be programmed with the file TK 78KORKGS UZ RF test sample program to have more information about how to program the board go to the section 6 1 Loading a project and programming the board You have to prepare two PCs both with USB interface and hyper terminal to control transmitter and receiver side The receiver sends back the test result to the transmitter where the test results are displayed The receiver could also work without PC battery powered by a 9V Block User s Manual U19054EE2VOUMOO 11 Chapter 2 Sample Applications 12 Figure 2 2 Table 2 2 Table 2 3 TRANSMITTER Short address 0x0001 RECEIVER Short address 0x0002 Transmitter and Receiver configuration By switch settings the boar
58. nch 4 0 My Documents 78k wj CJ config US ie pc driver My y Quer a i amp Local Disk D 2 Compact Disc E MEE 3 Removable Disk F SE My Network Places Figure 5 4 Address specification 1 Windows 2000 Remark Ifthe installation destination folder is changed at the time of IAR Embedded Workbench installation enter lt new folder gt 78K config nec ie_pc_driver MINICUBE The setup information file MQB2ALL inf is automatic selected then click Open to proceed within driver installation Locate File 2 xi Setup Information 27 03 2006 11 03 History 4KB Setup Information 20 10 2006 07 47 E 4KB Setup Information 27 01 2006 13 48 s 4KB Setup Information 27 01 2006 13 48 Desktop My Documents gt My Computer A MOBZALL in Setup Information inf E Figure 5 5 Address specification 2 Windows 2000 gt E Cancel After the location of the USB driver has been specified click OK to proceed User s Manual U19054EE2VOUMOO 55 Chapter 5 78KOR ZigBeea PRO Premium Development Kit Installation and Operation Found New Hardware Wizard Insert the manufacturer s installation disk into the drive OK selected and then click OK Cancel Copy manufacturer s files from C Program FilesMAR Systems E mbedded Workbe Figure 5 6 Address specification 3 Windows 2000 Click Next gt Found New Hardware Wizard
59. nel using the menu 9 User s Manual U19054EE2VOUMOO 21 Chapter 2 Sample Applications 2 1 10 2 1 11 2 1 12 2 1 13 2 1 14 2 2 22 RX Mode The menu item 5 initiates the receiver mode IDLE Mode The menu item 6 sets the UZ2400 RF chip into the IDLE mode Sleep Mode The menu item 7 sets the UZ2400 RF chip into the Deep Sleep mode Standby Mode The menu item 8 sets the UZ2400 RF chip into the Standby mode Set RF Channel The menu item 9 allows you to set the RF channel Manually Set UZ2400 Chip Register The menu item 0 allows you to set the UZ2400 registers Please refer to the datasheet of the UZ2400 RF chip for the definition of registers Resetting RF The menu item A allows you to reset the UZ2400 chip registers MAC Sample Program 1 Text Chat With this sample program it is possible to configure two or more nodes for a wireless text chat application This Sample Program is working on MAC level constructing a network utilizing the IEEE 802 15 4 PHY MAC standard In this MAC Sample Program 1 two or more nodes can form a star network a star network has a central coordinator with several nodes connecting to the coordinator only User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 Figure 2 12 2 2 1 Table 2 4 Node 1 O Coordinator a N Node 2 Node 3 Star network configuration The MAC Sample Program offers 1 Designatio
60. ogram s sasesana ea rr 30 Chapter 3 Hardware specification TK 78KOR KG3 UZ 34 3 1 Terminal list iia AA AA ee ee err hee 34 3 2 OWITCNES Fee 2 e ded nu iu east sn titt MA eid 37 3 2 1 ST Cats ia ra an poc rA A EHE 37 3 2 2 SW ce aun c dats ERE EU e atem t fupe Aretinus t ubi ter 39 3 2 3 SWS SW aa ENT AA AA Ke de Ap plo ip ae eee 39 3 2 4 EEN E A n e DEA SE RECEN PR CE M e ERROR e 40 3 3 Jumper JP1 RR PRESE e ig a a rper Pe c De SUR 40 3 4 LEDS Hu 40 3 4 1 zip 40 3 4 2 LEDA LEDS anid LEDA viii y cec e en rx Rte xe tI Te D Ionen ata ats 41 3 5 la c 41 3 6 Power Supply 2 cebdulse nati ended 41 3 7 Universal Area 02 ise inde da daw s 42 User s Manual U19054EE2VOUMOO 5 3 8 Soldering Bridges 2s rry kr e Canh A ERGO dI RUN RR ee a ed eus 42 3 9 Temperature Sensor coccccc ee n hn 43 3 10 Design Data and Parts Layout occococccccccccnnccn enn 43 3 101 Parts Layout io rar eece pr Rep eee EE ru E UE e Reg 44 3 10 2 RF Board Connection Figure KOR 0 eee ene 45 Chapter 4 Hardware specification 78KOR UZ Stick 46 4 1 Main Features aio e Ad eho ee a Rae PA er M ee eir ae 46 4 2 Block Diagram ii A e ted BARS ng T ED UR e dan d cal 47 4 3 Interface Connection naar aeaaee niea e n hh 47 4 3 1 CN1 Minicube Connector sssssssssssesllsl nnns 48 4 3 2 CN2 Expansion Connector 000 00 nn 48 4 4 Switches and EEDs e cnp REED a RE E ERE VS 49 4 4 1 SW
61. om debugging mode to normal operation mode Plug the USB interface and open a terminal program Configure the serial com port of your terminal program and press the reset button to restart the sample program User s Manual U19054EE2VOUMOO 73 74 Chapter 7 Remark 7 1 Figure 7 1 Sample Programs The 78KOR ZigBee Premium Development Kit is provided with three different sample programs The 78KOR ZigBee Premium sample projects for IAR Systems Embedded Workbench can be found directly in the folder C WyDocuments 78KORSamplePrograms if you chose the default installation folder during the section 5 2 2 Sample Programs Installation If the installation destination folder was changed at the time of Sample Programs installation process you will find them in lt new folder gt 78KORSamplePrograms Introduction and Structure The 3 sample programs are located in the same folder 78KOR Sample Programs but there is one folder for the TK 78KOR KG3 UZ board and another for the 78KOR_UZ_Stick board All the sample programs for the TK 78KOR KG3 board are located in the folder TK 78KORKG3 UZ and the sample programs for the 78KOR_UZ_Stick are located in the folder 78KOR UZ Stick Both folders contain the associated workspace file whose extension is EWW and also the folder settings which contains the configuration files required by IAR for each workspace Each sample program is located in
62. on 5 3 2 Installation on Windows XP The USB driver is part of the IAR Embedded Workbench software package Therefore please install the IAR Embedded Workbench first Installation on Windows 2000 When the 78KOR ZigBee PRO Premium Development Kit is connected with the host machine the board is recognized by Plug and Play and the wizard for finding new hardware is started Click Next gt Found New Hardware Wizard Welcome to the Found New Ms i gt Hardware Wizard This wizard helps you install a device driver for a hardware device To continue click Next lt Back Cancel Found New Hardware Wizard Widows 2000 User s Manual U19054EE2VOUMOO 53 Chapter 5 78KOR ZigBeea PRO Premium Development Kit Installation and Operation 54 The window below is displayed So check that Search for a suitable driver is selected then click Next gt Found New Hardware Wizard Install Hardware Device Drivers SS device driver is a software program that enables a hardware device to work with SY an operating system This wizard will complete the installation for this device e USB lt gt Serial A device driver is a software program that makes a hardware device work Windows needs driver files for your new device To locate driver files and complete the installation click Next What do you want the wizard to do Search for a suitable driver for my device recommend
63. on and Structure ooooccocccco enn 74 7 2 User Configurable Network Parameters ooccccccoccccccnccncccc 75 7 3 System Operation cecinere a oe ig eon RE Rd 76 7 3 1 Servicing the SK LAYER API 00 cece e hn 78 7 3 2 Managing and Actioning of the User Interface 000 c eee eee eee 79 Chapter8 Attachments LLLLtLtLLSSSSttttussosseeeese 80 6 User s Manual U19054EE2VOUMOO Chapter 1 1 1 Note 1 2 78KOR ZigBee PRO Premium Development Kit The 78KOR ZigBee Premium Development Kit is the NEC Electronics 16 bit starter kit specifically designed for the development of wireless networking applications The above platform can be used to design and develop a broad range of wireless networks from simple peer to peer to full mesh networking incorporating all of the features of a fully compliant ZigBee M network The development kit contains the TK 78KOR KG3 UZ evaluation board which includes the 78KOR KG3 a 16 bit single chip microcontroller of NEC Electronics and the UZ2400 RF board of Uniband Electronic Corporation Features of the TK 78KOR KG3 UZ Features of the TK 78K0R KG3 UZ CPU board are as follows e The evaluation board uses the NEC Electronics 16 bit single chip microcontroller uPD78F1168GC All of ROM RAM and circumference circuit are efficiently built in one chip on a single board High speed operation has been achieved with 20MHz clock Sub
64. on the accompanying CDROM IAR Embedded Workbench Kickstart edition 16 kB code size limited IEEE 802 15 4 MAC libraries Different sample application programs for the 78K0R KG3 UZ board Sample program for the Air Sniffer application for 78KOR UZ Stick System Requirements A PC supporting Windows 2000 or Windows XP for the IAR Systems Embedded Workbench Kickstart edition and the 78KOR ZigBee PRO Premium Development Kit Pentium 200 MHz minimum 128 MB of RAM 256 colour display 1024 x 768 mouse CD ROM drive and 200 MB of disk space are required to install the tool packages USB interface that enables communication based on USB Version 1 1 or later Please verify that you have received all of the parts listed in the package contents list attached to the 78KOR ZigBee PRO Premium Development Kit If any parts are missing or seem to be damaged please contact the dealer from whom you received your 78KOR ZigBee PRO Premium Development Kit Updates for the IAR Embedded workbench for 78KOR documentation and or utilities for the 78KOR ZigBee PRO Premium Development Kit if available maybe downloaded from the NEC Electronics web pages at http www eu necel com updates IAR Embedded Workbench visualSTATE IAR MakeApp and C SPY are registered trademarks of IAR Systems AB Microsoft and Windows are registered trademarks of Microsoft Corporation Adobe and Acrobat Reader are registered trademarks of Adobe Systems Incorporated
65. peration and application examples The incorporation of these circuits software and information in the design of a customer s equipment shall be done under the full responsibility of the customer NEC Electronics assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits software and information e While NEC Electronics endeavors to enhance the quality reliability and safety of NEC Electronics products customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely To minimize risks of damage to property or injury including death to persons arising from defects in NEC Electronics products customers must incorporate sufficient safety measures in their design such as redundancy fire containment and anti failure features NEC Electronics products are classified into the following three quality grades Standard Special and Specific e The Specific quality grade applies only to NEC Electronics products developed based on a customer designated quality assurance program for a specific application The recommended applications of an NEC Electronics product depend on its quality grade as indicated below Customers must check the quality grade of each NEC Electronics product before using it in a particular application Standard Computers office equipment communications equipment test and measurement equipment audio and visua
66. ronics China Co Ltd 7th Floor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 P R China Tel 010 82351155 http www cn necel com NEC Electronics Shanghai Ltd Room 2511 2512 Bank of China Tower 200 Yincheng Road Central Pudong New Area Shanghai 200120 P R China Tel 021 58885400 http www cn necel com NEC Electronics Hong Kong Ltd 12 F Cityplaza 4 12 Taikoo Wan Road Hong Kong Tel 2886 9318 http www hk necel com NEC Electronics Taiwan Ltd 7F No 363 Fu Shing North Road Taipei Taiwan R O C Tel 02 27192377 NEC Electronics Singapore Pte Ltd 238A Thomson Road 3112 08 Novena Square Singapore 307684 Tel 6253 8311 http www sg necel com NEC Electronics Korea Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam Ku Seoul 135 080 Korea Tel 02 558 3737 http www kr necel com Table of Contents Chapter 1 78KO0R ZigBee PRO Premium Development Kit 7 1 1 Features of the TK 78KOR KG34UZ ssssseeese een 7 1 2 Package Content oe td AROS CEU a Nerden e d ase 7 1 3 System Requirements ccoccccc e hn 8 1 4 Complementary ZigBee Development Platform and Hardware 8 Chapter 2 Sample Applications 0 0 00005 10 2 1 RE Test Program ioe ck ic ee fe e dete vere ris Ru t EC E RR RR Ren mE RR 10 2 1 1 Procedure for One to One Transmit Receive Test 0000 cee eee eee 11
67. se COM ports obviously if you have enough USB ports available But it could be confusing to have different USB port used and different HyperTerminal sessions opened on the same PC Open for each board connected a HyperTerminal session Before opening a HyperTerminal session you need to identify the COM Port number of the USB port on your PC in order to open and set the HyperTerminal User s Manual U19054EE2VOUMOO 23 Chapter 2 Sample Applications with the relevant COM port For the identification of the COM port you can use Control Panel gt System gt Hardware Device Manager gt Ports COM 4 LPT Then start HyperTerminal with settings listed in the section 2 7 RF Test Program Now you will find the following opening menu on your PC screen If not please try the RESET button on the TK 78KOR KG3 UZ board MAC Sample Program 1 Board 1 HyperTerminal File Edit View Call Transfer Help Sample Application 1 for TK 78K0R KG3 UZ Text chat program 2007 Skyley Networks gt My MAC address is 123456789ABC0001 Command gt _ Connected 00 01 38 Auto detect 19200 8 N 1 Figure 2 13 Board setup Then press Enter on your keyboard 24 User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 Figure 2 14 2 2 2 Figure 2 15 2 2 3 Sample flpplication 1 for TK 78K0R KG3 UZ Text chat program 2007 Skyley Networks gt My MAC address is
68. tarting up a Coordinator Once you have chosen which board will be the coordinator you could connect this board to your PC with one of the USB cables provided To enable this board to be the Coordinator it is necessary to set dip switch SW1 Bit8 to the ON position It is necessary to reset the unit as the SW1 Bit8 is only read following a reset Note that the coordinator will take the default MAC address of the program You must only enable one board to be the Coordinator on the network All other modules must be End Devices so please ensure that all of the other boards have SW1 Bit8 set to the OFF position User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 2 3 3 Table 2 6 Note 2 3 4 Table 2 7 Starting up End Devices You could now connect all the other boards that is to say the End Devices as you could see just after it could be necessary to hold the SW in a different position To ensure that each End Device joins the network reliably it is necessary to associate on to the network with a different network address for each End Device This is achieved by the following process Press the reset switch SW5 and any of the switch positions of the directional switch SW2 Release the reset switch SW5 Wait one second and then release the directional switch SW2 The nodes will then associate to the Coordinator and form a star network The following table shows how the addresses are allocate
69. ted in the folder settings Three other files can be also found in each sample program folder The dependency information file DEP The project setting file EWD The project file EWP HE TK 78KORKG3 4 UZ sc Debug 5 include O MAC Library C3 Release C settings C Source O xd La TK 78KORKG3 UZ MAC sample 1 f TK 78KORKG3 UZ MAC sample 1 dep E TK 78KORKG3 LIZ MAC sample 1 ewd 5 MAC Sample 2 H RF Test H settings A TK 78KORKG3 UZ Er Er ee RR EE Structure of a sample project All output file of the development tools for the corresponding target are generated by default in the directories Debug or Release and more particularly in the sub directory Exe For details of using IAR Embedded Workbench and the IAR C SPY Debugger please refer to the 78K IAR Embedded Workbench IDE User Guide User Configurable Network Parameters Various network parameters will always be user specific and must be tailored to the user application these user configurable parameters can be found in the different files In the header file basic settings h you will find some parameters like the default MAC address or the channel used MAC EXTENDED ADDRESS 1 MAC EXTENDED ADDRESS2 RF CHANNEL User s Manual U19054EE2VOUMOO 75 Chapter 7 Sample Programs 76 7 3 In the file main c you could choose the PanID of your network but also the default short address o
70. tes 1 GND GND 2 N C 3 VREG_EN P50 EX8 Output from CPU 4 N C 5 RESn P51 EX9 Output from CPU 6 FIFO P52 EX10 Input to CPU 7 N C 8 FIFOP P31 T103 TO03 INTP4 Input to CPU 9 N C 10 CCA P53 EX11 Input to CPU 11 N C 12 SFD P16 EX30 T101 TOO1 INTP5 Input to CPU 13 N C 14 CSn P43 SCK01 Output from CPU 15 N C 16 SCLK P04 SCK10 SCL10 Output from CPU 17 N C 18 Sl P02 SO10 TxD1 Output from CPU 19 GND GND 20 SO P03 SI10 RxD1 SDA10 Input to CPU Table 3 4 Connector CN4 terminal list CNA Signal name J er m destination Notes 1 TP5 2 GND GND 3 TP5 4 GND GND 5 TP5 6 GND GND 7 3 3V 8 GND GND 9 3 3V 10 GND GND 11 TP4 12 GND GND 13 TP3 36 User s Manual U19054EE2VOUMOO Hardware specification TK 78KOR KG3 UZ Chapter 3 Figure 3 2 3 2 3 2 1 Figure 3 3 3 2 1 1 Table 3 5 CN4 Signal name connection destination Votes 14 GND GND 15 N C 16 GND GND 17 N C 18 GND GND 19 N C 20 GND GND SPC ST JAA A Connector CN3 left and CN4 right pin configuration Switches SW1 Bit1 2 3 4 and 5 of SW1 are dip switches for Operation Mode setting Bit6 7 and 8 of SW1 are connected to general purpose ports P80 P81 and P82 for multipurpose input Dip Switches SW1 TK 78KOR KG3 UZ On chip debug Mode with the IAR TK interface For using the on chip debug function via the TK interface of IAR use the following settings On chip debug mode sett
71. to the board A short address is assigned sequentially independent from the long address You see the following message on the coordinator side User s Manual U19054EE2VOUMOO 31 Chapter 2 Sample Applications Test MAC sample program 2 Coordinator HyperTerminal OK File Edit View Call Transfer Help Dg os DA SWITCH for COORDINATOR Sample Application 2 for TK 78K0R KG3 UZ LED test for a star network 2006 Skyley Networks MLME STRRT request MLME START confirm Status 00 MLME ASSOCIATE indication from 123456789ABC0002 associated to 4352 Connected 00 04 36 Auto detect 19200 8 N 1 Figure 2 22 Association successful from the Coordinator side The following example shows the association o of the fifth End Device 4356 Then the SWA on this fifth End Device was pushed and then the switch SW3 You will see the LED2 on the Coordinator will blink 5 times and then LEDS will blink 5 times too The default PAN ID of this network is 2420 32 User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 Test MAC sample program 2 Coordinator HyperTerminal TOR File Edit View Call Transfer Help Dg 55 DA E MLME RSSOCIRTE indication from 123456789ABC0002 associated to MLME ASSOCIATE indication from 123456789ABC0007 associated to MLME ASSOCIATE indication from 123456789ABC0004 associated to MLME ASSOCIATE indication from 123456789ABC0006 associated to MLME ASSOCIATE ind
72. ut power in the PER test To do so please select 0 in the menu You will be asked the register number Please input 203 Then you will see LREG 203 00 gt It means the current value at the register 203 is 0x00h which means 0 dB OxOOh is the reset default value User s Manual U19054EE2VOUMOO 17 Chapter 2 Sample Applications e Test Transmitter HyperTerminal TOX File Edit View Call Transfer Help 78K0R UZ Hardware RF Test program 2007 Skyley Networks PER test sender shift 1 Retry result PER test receiver Continuous TX Pse Continuous TX Raw carrier RX Mode IDLE Mode Turn to sleep mode Standby Mode Set RF channel Manually set UZ2400 register Reseting RF Register 203 LReg 2031 00 gt Connected 00 38 46 Auto detect 19200 8 N 1 Figure 2 8 Menu 0 for adjusting output power The output power register bits are defined as follows LREG 203 Bit 7 6 gt large scale tuning 00 0 dB 01 10 dB 10 20 dB 11 30 dB Bit 5 3 gt small scale tuning 000 0 dB 001 1 25 dB 010 2 5 dB 011 3 75 dB 100 5 dB 101 6 25 dB 110 7 5 dB 111 8 75 dB Bit 2 0 gt 000 default value For instance if you wish 15 dB associated to the value 0110 0000 0x60h please input 60 as follows LREG 203 00 gt 60 18 User s Manual U19054EE2VOUMOO Sample Applications Chapter 2 Figure 2
73. z1mzs89 x Debug T variables Fies EE o mpeane c Re static SK gn Extende x 0 var a E TK 78K0RKG3 UZ m static SK UH gn Associddr 0x4321 MAC Library static SK UH gn PanID 0x2420 Ha G Source static SK UH qn CoordShortID 0x1975 E hardware 78k r c SK BOO0L gb_NetworkStarted 0 E main c C3 Output main loop A A M 7 MAIN TYPE main 04482 2222222222222222222 2 22z22222 2 2 Initialization of hardware 04483 FCAB4CO0 a 04487 30BC9 The necessary subroutine of mounting 0448A 1 CSI ReadWrite CSI port readi 0448B 300200 Interrupt processing from UBE 0448E cl A 0448F 307856 The timer is counted at const 04492 323412 04495 FC095300 Hardware Initialize lt vi is off Watch Disassembly Log Tue Nov 20 10 33 37 2007 78KOR MINICUBE Executor W1 02 OCD Control Code V1 00 B 3 Device chipname uPD78F1168_A0 f1168a0 file version V3 00 Build Find in Files Figure 6 8 IAR C SPY Debugger 6 2 Generating and Flash Programming a Hex File The 78K0R KG3 UZ boards will come pre programmed with the MAC sample program 2 application In order to demonstrate the other applications or to develop your own application you should know how to generate and program a hex file into a board Generation of a hex file To generate an output file for flash programming purpose please select the Release target of your project Then r
Download Pdf Manuals
Related Search
Related Contents
Unitarian Universalist Church of Fresno VX222v2 - Digigram Stress Quick Reference Guide Version 2.1 Sony MDS-JB930 User's Manual CLARiSUITE DRY*GRAPH Copyright © All rights reserved.
Failed to retrieve file