background image

6.2.2 GUI software WriteEZ1 for Flash Programming

The GUI software WriteEZ1 for flash programming is required to program the
Nodes with the Sample Programs. To install the WriteEZ1, select the “setup.exe”
program that can be found in the following directory in the CDROM provided:
<CD>\NEC Tools 32\WriteEZ1. The setup dialogues will guide you through the
installation process.

You will also need to install the USB driver required to emulate the UART
communication (which is the only one supported for the flash programming
interface) by the USB communication. Details about the installation procedure can
be found in the section 

"6.3 USB Driver Installation"

 .

6.2.3 Sample Program Installation

To install the sample/demonstration program for the 

V850 ZigBee

TM

 Gateway

Development Platform

 board, select the SETUP program in the directory <CD>

\SamplePrograms\ of the CDROM. The setup dialogue will guide you through the
installation process.

6.3 USB Driver Installation

In order to use the 

V850 ZigBee

TM

 Gateway Development Platform

 board for On-

Chip debugging or FLASH programming, the USB driver needs to be installed on
the host machine. Two different drivers need to be installed:

-

the USB serial converter

-

the USB serial port

Install the drivers according to the following procedure:

Installation on Windows 2000

Installation on Windows XP

6.3.1 Installation on Windows XP

When the 

V850 ZigBee™ PRO Gateway Development Platform

 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 >.

V850 ZigBee Gateway Development Platform, Installation
and Operation

Chapter 6

User's Manual U19026EE3V0UM00

37

Summary of Contents for V850 ZigBee Pro

Page 1: ...User s Manual 32 bit V850 ZigBee PRO Gateway Development Platform Document No U19026EE3V0UM00 Date published October 2009 NEC Electronics 2009 Printed in Germany ...

Page 2: ...f 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 While NEC Electronics endeavors to enhance the quality reliability and safety of NEC Electronics products customers agree and acknowledge that the possibil...

Page 3: ...ronics 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 subs...

Page 4: ...ited Kingdom Branch Cygnus House Sunrise Parkway Linford Wood Milton Keynes MK14 6NP U K Tel 01908 691133 Succursale Française 9 rue Paul Dautier B P 52 78142 Velizy Villacoublay Cédex France Tel 01 30675800 Tyskland Filial Täby 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 5...

Page 5: ...ller 26 3 3 3 Access to the LAN Controller 26 3 4 Temperature Sensor 26 3 5 Power Supply 26 Chapter 4 TK 850 SG2 UZ Data 28 4 1 Parts Layout 28 4 2 RF Board connection figure 29 Chapter 5 Programming the TK 850 SG2 UZ with WriteEZ1 30 Chapter 6 V850 ZigBee Gateway Development Platform Installation and Operation 36 6 1 Hardware Installation 36 6 2 Software Installation 36 6 2 1 IAR Systems Embedded...

Page 6: ...figurable network Parameters 50 8 2 Libraries 50 8 3 Embedded functions in Web Pages 50 8 4 System Initialization 52 Chapter 9 Schematic Diagram TK 850 SG2 UZ 53 Chapter 10 Circuit Diagram of UZ2400 RF Board 57 6 User s Manual U19026EE3V0UM00 ...

Page 7: ...d peripheral circuit are efficiently built in one chip on a single board High speed operation is realized via the 20 MHz internal clock 32 768 kHz sub clock standard equipment The high speed RAM 32 KB and the flash memory 384 KB are built into CPU chip Hardware is ready to accommodate the 2 4 GHz transceiver UZ2400 RF board Accordance with IEEE 802 15 4 ZigBeeTM Specifications for Low Rate Wireles...

Page 8: ...ntents Please verify that you have received all of the parts listed in the package contents list attached to the V850 ZigBee PRO Gateway Development Platform If any parts are missing or seem to be damaged please contact the dealer from whom you received your V850 ZigBee PRO Gateway Development Platform Note Updates for the IAR Embedded workbench for V850 documentation and or utilities for the V850...

Page 9: ...IEEE 802 15 4 MAC libraries ZigBeeTM Stack Unlimited ZigBeeTM license for the 78K0R family GUI Tools SDK Sample programs IAR Embedded Workbench Kickstart Version Article code 78K0R ZIGBEE PREM ZigBeeTM PRO Premium Development Kit for 78K0R 4 x 16 bit ZigBeeTM node boards TK 78K0R KG3 UZ 16 bit USB ZigBeeTM node programmed as Air Sniffer IEEE 802 15 4 MAC libraries ZigBeeTM Stack Unlimited ZigBeeTM...

Page 10: ... 78K0 KF2 UZ boards Devices The following parts present firstly the operation of the central board alone and then the operation with the addition of TK 78K0 KF2 UZ boards 2 1 Operational Procedure for the TK 850 SG2 UZ If you intend to execute the sample program without using the debugger set the mode switch as shown below and then make a hardware reset by pushing the reset switch Table 2 1 Operat...

Page 11: ...web browser such as MS Internet Explorer Connect your browser to http 192 168 0 100 You can modify the URL later by going to Configuration Network You should see the following image in your browser You can come back to this image anytime if you select Display Network Configuration A pink line indicates a device is not connected Figure 2 2 Network configuration overview If you select Display Date y...

Page 12: ...onfiguration Date For example if you want to set 9 minutes and 30 seconds past 9pm on April 11th in 2005 please input 20050411210930 Figure 2 4 Configuration of the date To setup networks select Configuration Network Chapter 2 Sample Program 12 User s Manual U19026EE3V0UM00 ...

Page 13: ...configuration is downloaded in the Flash EEPROM Figure 2 5 Configuration of the network parameters You can open the Flash programming window by selecting Configuration Writing Flash EEPROM Click the Execution button to store the current settings Sample Program Chapter 2 User s Manual U19026EE3V0UM00 13 ...

Page 14: ...ollowing table Table 2 2 Flash programming mode settings for the TK 78K0 KF2 UZ SW1 Bit 1 ON Bit 2 ON Bit 3 OFF Bit 4 OFF Bit 5 OFF SW5 UART side Using the Flash programmer WriteEZ3 load and write the file mac78k0 hex which can be found under the following directory on the CDROM CD SamplePrograms SamplePrograms Demo_78K0 or can be found in the directory where they have been installed by the automa...

Page 15: ...un the application you can run it as a stand alone system by setting JP1 to 2 3 pin short and using a 6LR61 9V battery connected to CN2 For further details about the power supply settings please refer to section 3 Hardware specification Apply the relevant power supply source to the target boards If you select Display Network Configuration and if a Device is connected wirelessly you can see the red...

Page 16: ...y the latest status click the Update button The pink line indicates it is not connected The coordinator checks for a device every 30 seconds If you click a connected device double click one of the device green box connected with a red line you can find the following window Chapter 2 Sample Program 16 User s Manual U19026EE3V0UM00 ...

Page 17: ...of status information for the Device Address This is the MAC address of the Device in IEEE 802 15 4 Temperature Measured on the Device SW pressed Indicates which switch was pressed on the Device Time pressed Time stamp of the pressed switch 5 LEDs LED2 LED3 or LED4 can be on and off 6 If the SW3 of the Device is clicked LED1 of the coordinator is on and off The information at the Note 4 SW pressed...

Page 18: ...evice 1 becomes on and off On a TK 78K0 KF2 UZ board By pressing SW3 on a TK 78K0 KF2 UZ board LED1 of the coordinator becomes on and off By pressing SW4 on a TK 78K0 KF2 UZ board LED2 of the coordinator becomes on and off Please note LED s manipulated on the board are not reflected on the Web browser If you click a device not connected with a red line you will see the following window Figure 2 10...

Page 19: ...p External EEPROM State indication LED 2 CAN T H pattern for external connection RF board UZ2400 RF Board Temperature sensor Temperature sensor x 1 LED Red x 4 LED 1 4 Multipurpose Green x 3 LED 5 Power LED 6 LAN LED 7 LINK Multipurpose input 4 bit Slide switch x 1 Push switch x 2 Reset Switch Push switch x 1 N WIRE MiniCube interface Not mounted On board Flash memory writing Possible Power supply...

Page 20: ...RQ 16 PCT1 PCT1 WR1 17 GND GND 18 PDH4 PDH4 A20 19 GND GND 20 PDH5 PDH5 A21 Figure 3 1 Connector CN1 pin configuration Table 3 3 Connector CN3 terminal list CN3 Signal name Terminal CPU name at connection destination Notes 1 GND GND 2 N C 3 VREG_EN P02 NMI Output from CPU 4 N C 5 RESn P03 INTP0 ADTRG Output from CPU 6 FIFO P10 ANO0 Input to CPU 7 N C 8 FIFOP P06 INTP3 Input to CPU 9 N C 10 CCA P11...

Page 21: ...al list CN4 Signal name Terminal CPU name at connection destination Notes 1 TP6 2 GND GND 3 TP6 4 GND GND 5 TP6 6 GND GND 7 3 3V 8 GND GND 9 3 3V 10 GND GND 11 TP5 12 GND GND 13 TP4 14 GND GND 15 N C 16 GND GND 17 N C 18 GND GND 19 N C 20 GND GND Figure 3 2 Connector CN3 top and CN4 bottom pin configuration Hardware specification Chapter 3 User s Manual U19026EE3V0UM00 21 ...

Page 22: ...50ES SG2 microcontroller integrated in the TK 850 SG2 UZ board can be programmed using the attached software WriteEZ1 in your PC if the following switch and jumper settings are made Table 3 5 Flash programming mode settings for the TK 850 SG2 UZ SW1 Bit 1 ON Bit 2 OFF Bit 3 ON Bit 4 ON JP1 USB side 1 2 pin short 3 2 1 2 On chip debug Mode with the IAR TK interface The following setting activates t...

Page 23: ...s when you execute the program normally Select the power source chosen with the JP1 Table 3 8 Normal operation mode settings for the TK 850 SG2 UZ SW1 Bit 1 OFF Bit 2 OFF Bit 3 OFF Bit 4 OFF JP1 USB powered 1 2 pin short Battery powered with CN2 2 3 pin short 3 2 1 5 General purpose setting port Bit 5 6 7 and 8 of SW1 are general purpose setting ports The port state is Low because it is connected ...

Page 24: ...3 SW4 SW4 is the reset switch The TK 850 SG2 UZ board is reset when SW4 is pushed Figure 3 5 Switch SW4 3 2 4 LED5 The Power LED LED5 is activated when the power supply is turned on Figure 3 6 LED5 as Power LED 3 2 5 LED1 LED2 LED3 and LED4 LED1 2 3 and 4 are available for applications To turn on a LED set the output port to Low Table 3 11 LED 1 2 3 and 4 terminal list LED Signal name Terminal CPU...

Page 25: ... LED 1 2 3 and 4 3 3 LAN Controller The TK 850 SG2 UZ board has a LAN controller LAN91C113 made by SMSC 3 3 1 Connection Connection of CPU to LAN controller is below Figure 3 8 V850ES SG2 and LAN controller pin connection Hardware specification Chapter 3 User s Manual U19026EE3V0UM00 25 ...

Page 26: ...odes 3 4 Temperature Sensor The TK 850 SG2 UZ board has a temperature sensor for measuring the ambient temperature of the PWB board It is connected to the analogue input pin P79 ANI9 of the microcontroller Temperature sensor S 8120C Made by SII Power supply of sensor 3 3V Linear output voltage 8 20mV C from 20 C to 80 C Please refer to the datasheet for details 3 5 Power Supply There are two choic...

Page 27: ...on Notes BT_MONI P78 ANI8 About 0 265 times of input power supply For instance If the battery level 6 0V The level of the BT_MONI 0 265x6 0 1 59 V If the battery level is 4 75V The level of the BT_MONI 0 265x4 75 1 25 V Hardware specification Chapter 3 User s Manual U19026EE3V0UM00 27 ...

Page 28: ...Chapter 4 TK 850 SG2 UZ Data 4 1 Parts Layout Figure 4 1 Hardware overview of theTK 850 SG2 UZ board 28 User s Manual U19026EE3V0UM00 ...

Page 29: ...4 2 RF Board connection figure Figure 4 2 Overview of the connection of the RF board TK 850 SG2 UZ Data Chapter 4 User s Manual U19026EE3V0UM00 29 ...

Page 30: ... refer to the section 6 V850 ZigBee Gateway Development Platform Installation and Operation To use WriteEZ1 please set the mode switch on the TK 850 SG2 UZ board as follows Then please connect the board to your PC with a USB cable Table 5 1 Flash programming mode settings for the TK 850 SG2 UZ JP1 1 2 pin short USB side SW1 Bit 1 ON Bit 2 OFF Bit 3 ON Bit 4 ON Bit 5 OFF Bit 6 OFF Bit 7 OFF Bit 8 O...

Page 31: ...ace of the Flash programmer WriteEZ1 Please select the Setup button in the menu bar or Device Setup Then select the PRM File Read button Programming the TK 850 SG2 UZ with WriteEZ1 Chapter 5 User s Manual U19026EE3V0UM00 31 ...

Page 32: ...RM files in the CDROM in the following directory CD NEC Tools 32 PRM 70F3288_V111 Please select the following PRM file CD NEC Tools 32 PRM 70F3288_V111 70F3281_CSI0 prm Figure 5 3 Choice of the parameter file PRM for the V850ES SG2 microcontroller Chapter 5 Programming the TK 850 SG2 UZ with WriteEZ1 32 User s Manual U19026EE3V0UM00 ...

Page 33: ...s OK Figure 5 4 Setting the parameters for the flash programming session Next load the HEX file that you want to program to WriteEZ1 Click Load to open the file mac_app hex which you created in the section 7 4 Generating a Hex file for flash programming When successfully loaded Success read HEX file is displayed Programming the TK 850 SG2 UZ with WriteEZ1 Chapter 5 User s Manual U19026EE3V0UM00 33...

Page 34: ...s by clicking Auto procedure When Auto procedure is clicked it processes the Erase and Program commands Figure 5 6 Starting the Auto Procedure to erase and program the Flash memory Chapter 5 Programming the TK 850 SG2 UZ with WriteEZ1 34 User s Manual U19026EE3V0UM00 ...

Page 35: ...g has successfully completed The programs are successfully written to the Flash memory of the V850 SG2 integrated in the board TK 850 SG2 UZ Disconnect the USB cable from TK 850 SG2 UZ board Programming the TK 850 SG2 UZ with WriteEZ1 Chapter 5 User s Manual U19026EE3V0UM00 35 ...

Page 36: ...able When V850 ZigBeeTM Gateway Development Platform is connected the USB driver needs to be installed on the host machine Please refer to the specific section 6 3 USB Driver Installation 6 2 Software Installation The V850 ZigBeeTM Gateway Development Platform package comes with the following software demo packages IAR Systems Embedded Workbench for V850 including C compiler assembler linker libra...

Page 37: ...opment Platform board select the SETUP program in the directory CD SamplePrograms of the CDROM The setup dialogue will guide you through the installation process 6 3 USB Driver Installation In order to use the V850 ZigBeeTM Gateway Development Platform board for On Chip debugging or FLASH programming the USB driver needs to be installed on the host machine Two different drivers need to be installe...

Page 38: ...firmation of USB Driver Installation After installing the two types of drivers check that the drivers have been installed normally according to the procedure below When using the board in combination with WriteEZ GUI the information to be checked here is needed By clicking the Device Manager tab check that the drivers are installed normally Chapter 6 V850 ZigBee Gateway Development Platform Instal...

Page 39: ...ith the target device Remark In the flash programming WriteEZ GUI port list box the same communication port as COMxx of the USB Serial Port in this case COM3 as shown in above screenshot needs to be selected V850 ZigBee Gateway Development Platform Installation and Operation Chapter 6 User s Manual U19026EE3V0UM00 39 ...

Page 40: ... installed by the automatic process of the CDROM see section 6 2 3 Sample Program Installation The sample projects are using the following folder structure Figure 7 1 Sample Programs project structure Below is the detailed structure of the V850 ZigBeeTM Gateway Sample Project Figure 7 2 Sample project structure Below is the detailed structure of the Web page file that can be found in the directory...

Page 41: ... set up correctly the IAR Embedded Workbench can be started To do so start the Embedded Workbench from Windows Start menu Programs folder IAR Systems IAR Embedded Workbench Kickstart for V850 The following screen appears Figure 7 4 IAR Embedded Workbench startup screen Now select the option Open exiting workspace from the File menu and locate the V850 ZigBeeTM Gateway sample program in the folder ...

Page 42: ...ncing a TK interface debugging session ensure that the USB driver has been correctly installed The V850 ZigBeeTM Gateway Development Platform uses a monitor program for debugging purposes The communications between the starter kit and the IAR C Spy debugger running on the PC is done via a standard UART USB connection The monitor program is automatically downloaded to the starter kit during connect...

Page 43: ...itor program and cannot be used by the user program Table 7 2 Monitor interupt vectors Device Interrupt Vector Adress Function V850ES SG2 μPD70F3281Y 0x0060 0x0063 DBTRAP debug interrupt vector 0x02C0 0x02C3 UARTD0 receive interrupt vector 0x02B0 0x02B3 UARTD0 status interrupt vector Monitor Reset Vector When a user program is downloaded by using the IAR C SPY debugger the reset vector address 0x0...

Page 44: ...ommunication to the V850 ZigBeeTM Gateway Development Platform board can be established Other limitations The watchdog timer can not be used Please be sure to set the option bytes of the V850ES SG2 device accordingly to allow the watchdog timer disable The forcible break debugger stop command can not be used when the global interrupts were disabled by the user program DI instruction Debug sessions...

Page 45: ...your PC Then you have to check the used communication port of the TK V850 interface is set to the correct communications port setting All debug targets use port COM3 but this may be different on other PC s To check the actual used communication port please open the Windows Device Manager Figure 7 8 Checking the port used in the Device manager of Windows If necessary please select the correct commu...

Page 46: ...ssion by selecting Project Debug or pressing the debugger button in the menu bar Now the debugger is started and the demo project is downloaded to the TK 850 SG2 UZ board The progress of downloading is indicated by blue dots in the TK V850 Emulator window Please note that the download of larger executables can take some time Chapter 7 IAR Sample Session 46 User s Manual U19026EE3V0UM00 ...

Page 47: ...he target device After the download is 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 IAR Sample Session Chapter 7 User s Manual U19026EE3V0UM00 47 ...

Page 48: ...bfolder V850 doc of your Embedded Workbench installation directory e g C Program Files IAR Systems Embedded Workbench 4 0 V850 doc EWV850_UserGuide ENU pdf EWV850_HWDebugUserGuide ENU pdf 7 4 Generating a Hex file for Flash programming To generate a Hex File for the FLASH programmer please select the Target Release and rebuild the project The generated Hex File is located in the directory for Exec...

Page 49: ...Figure 7 13 Settings to generate an HEX file output IAR Sample Session Chapter 7 User s Manual U19026EE3V0UM00 49 ...

Page 50: ...rious system configuration utilities Driver R85 Library for the Ethernet device driver NEC R85 NEC Utilities and applications library Sellib R85 Flash Self programming library Stack R85 IEEE 802 15 4 MAC stack library Webpages R85 Library containing the web pages the web pages are also supplied as source code so that the user can modify the web pages Care must be taken to use the same names for th...

Page 51: ...p def h include api fsdata h pragma constseg WEBPAGES New line at the top of the fsdata c file pragma constseg default New line at end of the fsdata c file Sample Program Chapter 8 User s Manual U19026EE3V0UM00 51 ...

Page 52: ...8 4 System Initialization Chapter 8 Sample Program 52 User s Manual U19026EE3V0UM00 ...

Page 53: ...Chapter 9 Schematic Diagram TK 850 SG2 UZ Figure 9 1 V850 ZigBee Gateway board schematics 1 4 User s Manual U19026EE3V0UM00 53 ...

Page 54: ...Figure 9 2 V850 ZigBee Gateway board schematics 2 4 Chapter 9 Schematic Diagram TK 850 SG2 UZ 54 User s Manual U19026EE3V0UM00 ...

Page 55: ...Figure 9 3 V850 ZigBee Gateway board schematics 3 4 Schematic Diagram TK 850 SG2 UZ Chapter 9 User s Manual U19026EE3V0UM00 55 ...

Page 56: ...Figure 9 4 V850 ZigBee Gateway board schematics 4 4 Chapter 9 Schematic Diagram TK 850 SG2 UZ 56 User s Manual U19026EE3V0UM00 ...

Page 57: ...Chapter 10 Circuit Diagram of UZ2400 RF Board Figure 10 1 UZ2400 RF board schematics User s Manual U19026EE3V0UM00 57 ...

Page 58: ...Chapter 10 Circuit Diagram of UZ2400 RF Board 58 User s Manual U19026EE3V0UM00 ...

Page 59: ......

Reviews: