background image

 
 

Ti

tle

Siz

e

D

oc

um

ent

 N

um

ber

R

ev

D

at

e:

Sheet

of

62-0158A

1.

0

TK

-78K0R

/K

G3+

U

Z

 M

ot

her Board

A3

33

M

onday

, M

arc

h 19,

 2007

RFV

D

D

RFV

DD1

VD

D

JP

2

F

F

C

-3AM

EP1_x

xx

1

2

3

C2

3

0.

1uF

CN4

TF

M

-110-02-S-D

-A-K-T

R

1

3

5

7

9

11

13

15

17

19

6

2

12

20 18 16

4

14

10 8

R1

7

4.

7K

R1

8

4.

7K

R1

9

4.

7K

R2

0

4.

7K

R2

1

4.

7K

TP

3

VD

D

TP

5

TP

4

NOT 

MOUNT

FIFO

1

CCA

1

FIFO

P

1

SF

D

1

SO

1

SC

LK

1

SI

1

R

ESn

1

CS

n

1

VR

EG_EN

1

R2

3

0

R2

2

0

CN3

TF

M

-110-02-S-D

-A-K-T

R

1 3 5 7 9 11 13 15 17 19

6

2

12

20

18

16

4

14

10

8

(S

hi

el

d)

CN3

CN4

- 123 - 

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

Page 1: ...nual TK 78K0R KG3 UD ZigBeeTM ready Wireless Network Evaluation Board Using the UZ2400 RF chip and the 78K0R KG3 Microcontroller Date published October 2009 Rev 3 0 TESSERA TECHNOLOGY INC 2009 Printed in Japan 1 ...

Page 2: ...ome to the world of TK 78K0R KG3 UD You are now being navigated to the design environment of the 78K0R microcontroller for developing wireless network applications Please follow the tutorial step by step 2 ...

Page 3: ...dge of security safety and reliability TESSERA TECHNOLOGY INC would like to inform that the standard quality assurance procedure s have not been fully applied to this product and its documentation and that TESSERA TECHNOLOGY INC cannot assure the full and error free function and or the standard quality level CAUTION This equipment should be handled like a CMOS semiconductor device The user must ta...

Page 4: ...brary 12 2 1 10 The MAC Sample Program1 Text Chat Program 12 2 1 11 The MAC Sample Program2 LED Control 13 2 2 Installation of Software Development Tools 14 2 2 1 Start up of the installation CD ROM 14 2 2 2 Installation of the software development tools 14 2 2 3 Uninstall 21 2 2 4 File Configuration in PC 22 2 3 USB Driver 23 2 3 1 Install to Windows XP 24 2 3 2 Install to Windows2000 27 2 3 3 Co...

Page 5: ...Terminating integrated debugger ID78K0R QB 62 3 14 The RF Test Program 63 3 14 1 Procedure for one to one transmit receive test 63 3 14 2 PER test receiver 75 3 14 3 Continuous TX Pseudo Noise 75 3 14 4 Continuous TX Raw carrier 75 3 14 5 RX Mode 75 3 14 6 IDLE MODE 75 3 14 7 Standby MODE 75 3 14 8 Deep Sleep mode 76 3 14 9 Power down mode 76 3 14 10 Set RF channel 76 3 14 11 Manually set UZ2400 r...

Page 6: ...le Program2 LED Control 95 5 2 1 Programming to the TK boards 96 5 2 2 Starting up a coordinator 96 5 2 3 Starting up end devices 98 5 2 4 Operation 100 6 TROUBLESHOOTING 101 6 1 If you cannot find USB driver when you connect PC to the kit 101 6 2 Error when you start the debugger 101 6 2 1 Can not communicate with Emulator F0100 or A0109 102 6 2 2 Incorrect ID Code Ff603 102 6 2 3 The on chip deb...

Page 7: ...t delete breakpoints 113 7 3 4 Display global variables 114 7 3 5 Display global variables while programs are running 115 7 3 6 Display local variables 116 7 3 7 Display memory and SFR contents 116 7 4 Erase of flash memory 117 7 5 BOM List Circuit diagram 119 8 MODE SETTING OF THE BOARD 125 7 ...

Page 8: ...t tools and sample programs and installation Chapter 3 Experiences Guide to the basic operations of PM and the integrated debugger using sample programs Chapter 4 Hardware Specifications Explain the hardware of TK 78K0R KG3 UD Chapter 5 IEEE 802 15 4 MAC Sample Programs Learn sample programs which utilize the MAC library Chapter 6 Troubleshooting Describe how to solve troubles you may face such as...

Page 9: ...ademarks or trademarks of Microsoft Corporation in the United States and or other countries Adobe and Acrobat are trademarks of Adobe Systems Incorporated Adobe System Incorporated Other company names and product names that appear in this document are the registered trademarks or trademarks of their respective companies 9 ...

Page 10: ...2 Preparations This chapter introduces the development environment and describes how to install the sample programs The sample program can be tested on this hardware platform of the evaluation kit 10 ...

Page 11: ...4 Kbytes It works on MS Windows 2000 or XP 2 1 4 Assembler RA78K0R W1 33 Code size limited version This is a free assembler for the 78K0R microcontrollers The object code size is limited to 64 Kbytes It works on MS Windows 2000 or XP The RA78K0R Assembler Package contains Structured Assembler Preprocessor Assembler Linker Object Converter Librarian and List Converter 2 1 5 78K0R integrated debugge...

Page 12: ...oic chamber 2 1 9 IEEE 802 15 4 MAC Library The IEEE 802 15 4 MAC Library offers an executable object code library of the MAC stack specified in the IEEE 802 15 4 Please refer to the MAC Library manual for further details 2 1 10 The MAC Sample Program1 Text Chat Program The MAC Sample program 1 is developed to provide with a simple example to construct a star network utilizing the IEEE 802 15 4 PH...

Page 13: ...which end device is pressed To use the MAC Sample Program 2 you need to prepare one PC with a USB interface and two TK 78K0R KG3 UD boards or more boards up to 5 The MAC Sample Program 2 is provided in the form of the C source codes If you wish to tailor the sample program to meet your specific needs you can edit the source code re compile it with debug build to generate a load module file then st...

Page 14: ...llation of the software development tools Please insert the CD ROM in the drive The installer will show up automatically If it does not start automatically please initiate it by double clicking the SETUP EXE 1 Readme First The contents of the CD ROM and some notes are available Please read it at first 2 Install Click Install to start installation of development tools For details please refer to th...

Page 15: ...ram Click this button to start the WWW browser for the sample program and the tutorial 5 Link to NEC Electronics Microcontrollers Click this button to start the WWW browser display the link to the NEC Electronics Microcontroller web site http www necel com micro index_e html The NEC Electronics Microcontroller web page provides with the latest product tool information and FAQs 6 Exit Terminate the...

Page 16: ...explanation of the selected product To change the installation destination click Browse When all the settings are completed click Install In this document it is assumed that users install the programs under NEC Electronics Tools directory default installation directory Users can find the tools by selecting Start Menu Programs NEC Electronics Tools 16 ...

Page 17: ... Click OK when Install comfirmation dialog box is opened Read software license agreement and click Yes for continuing the installation To stop the installation click No 17 ...

Page 18: ... Enter the product ID and click Next The product ID is available on the README html the other sheet It starts copying the files 18 ...

Page 19: ...dialog opened When the installation is completed the following dialog opens Click OK NEC Electronics Starter Kit Virtual UART USB driver must be installed on PC before you connect to TK 78K0R KG3 UD Install the USB driver by referring 2 3USB Driver 19 ...

Page 20: ... the directory name where the product is to be installed Note on the version of Windows If the language of the Windows is not English a file transfer error during installation might be observed In this case please abort the installation in the language and re install it in an English version of Windows The identical problem may be observed if a language other than English is specified as the syste...

Page 21: ...ed in Install Uninstall and click Add Remove 3 A dialog box for confirming deletion of files will be displayed Click Yes Deleting of the files will be started 4 When the completion message is displayed click OK Caution Deletion of some files may be asked during uninstallation Normally deletion of these files causes no problem 5 This completes uninstalling this tool 21 ...

Page 22: ...onfiguration in PC Software Development Tools are installed in C Program Files NEC Electronics Tools on default setting When you use the tools please open the tools from Start menu Programs NEC Electronics Tools 22 ...

Page 23: ...ter Kit USB Driver must be installed on the PC If not please refer to 2 2 Installation of Software Development Tools to install the Starter Kit USB Driver first Attention Do not use a USB hub for connecting TK 78K0R KG3 UD Depending on the version of Windows OS the installation will be differed Please check your Windows version and follow the instructions Windows XP 2 3 1Install to Windows XP Wind...

Page 24: ...nected with USB the Found New Hardware Wizard will be started Select No not this time and click Next Select No not this time Click Next 2 Select Install from a list or specific location and click Next Select Install from a list or specific location Click Next 24 ...

Page 25: ...r directory path The path should be C Program Files NEC Electronics Tools TK driver as default installation If the installation directory is not default then select TK driver under the installation directory Click Next Select the driver directory Click Next 4 If the following dialog is opened click Continue Anyway Click Continue Anyway 25 ...

Page 26: ...5 The installation of NEC Electronics Starter Kit Virtual UART driver is completed Click Finish Click Finish 6 Go to 1 3 3 Completion of the installation 26 ...

Page 27: ...2 3 2 Install to Windows2000 1 Once the TK 78K0R KG3 UD is connected with USB the Found New Hardware Wizard will be started Select No not this time and click Next Click 27 ...

Page 28: ...2 Select Search for a suitable driver for my device Click Next Select Search for a suitable driver for my device Click Next 3 Select Specify a location Click Next Select Specify a location Click Next 28 ...

Page 29: ...ld be C Program Files NEC Electronics Tools TK driver as default installation If the installation directory is not default then select TK driver under the installation directory Click OK Click OK Select the driver directory 5 Click Next Click Next 29 ...

Page 30: ...6 The installation of NEC Electronics Starter Kit Virtual UART driver is completed Click Finish Click 7 Go to 1 3 3 Confirmation of the installation 30 ...

Page 31: ...is confirmed that NEC Electronics Starter Kit Virtual UART COMx exists The screen above shows that the COM port number is COM8 If ID78K0R QB is not in use you can use this port number for connecting TK 78K0R KG3 UD When you change the USB port connection the COM port number will be changed as well CAUTION Do not do Hardware Modification Scan when you communicate with the target device 31 ...

Page 32: ...xplains the overview and preparation of sample programs You need to install the sample programs on your system first before using them How to install the sample programs and where they should be intalled on your system will be explained 32 ...

Page 33: ...reen does not appear automatically start setup exe from Explorer etc Press the Sample Program button to start the WWW browser and then click the TK 78K0R KG3 UD Sample Programs link The WWW browser starts up Click the TK 78K0R KG3 UD Sample programs link you can also download the User s Manual When TK 78K0R KG3 UD Sample Programs is clicked the following download confimation window appears 33 ...

Page 34: ...Please click the Open button In case of windows 2000 you will see the Security Warning window Please click Run InstallShield wizard for TK Sample Program starts up Please click Next 34 ...

Page 35: ...ase click Finish The sample programs are installded under C now The sample program TK78K0R EXE with self extract file is also intalled When you need to use the original sample programs you can extract the file C TK78K0R EXE When you uninstall the sample program Please use Add Remove Programs in the Control Panel 35 ...

Page 36: ...K0RUD_RF_Test The sample program used in chapter 3 The packet error rate and received signal strength indication are monitored TK78K0RKG3UD_Sample1This sample program uses MAC library The text message is transmitted and it receives it TK78K0RKG3UD_Sample2This sample program uses MAC library Switch information is transmitted it receives 36 ...

Page 37: ...2 4 1Installation of the sample programs is used You use two of 78K0R KG3 One is the stand alone system with USB power supply Another is connected to the debugger and run user programs By building the sample programs and operating with ID78K0R QB you can understand the basic operation of the development tools PM ID78K0R QB and the basics of the project files that you need when you develop applicat...

Page 38: ...workspace project Creating execution format Reviewing Linker Compiler option Debug setting TK board setting Starting integrated debugger ID78K0R QB Executing program Stopping program Operation Terminating integrated debugger ID78K0R QB Terminating PM 38 ...

Page 39: ...3 1 Starting PM In the Windows Start menu select Programs NEC Electronics Tools PM V6 31 PM start up 39 ...

Page 40: ...debugging are managed Also one of more project files is managed together as a workspace Menu bar Tool bar Output window Project window Project window A window in which project names source files and include file are displayed using a tree structure Output window A window in which the build execution status is displayed For details regarding menu bars and tool bars refer to the PM User s Manual 40 ...

Page 41: ...nd debugger to be used have been saved as project information The file name format is ΔΔΔΔprj Project files are created in folders that are set when creating new workspaces What is a project group A project group is a group comprised of a number of projects in an application system The target devices of each project that can be registered to one project group must be the same What is a workspace A...

Page 42: ...4 1Installation of the sample programs For creating a new workspace refer to 7 1Create a new workspace The workspace has information about the build environment for the sample programs Select File on menu bar and Open Workspace Then select C TK78K0R SAMPLE_KG3 UD TK78K0RUD_RF_Test RF_Test prw 42 ...

Page 43: ...Open the folder in which the sample program is located RF_Test prw and then press the Open button Workspace file name RF_Test prw Project group Project The RF_Test prw workspace file is read 43 ...

Page 44: ...in this section because the linker option settings are important for debugging Following three settings are covered specifically Outputs from debugging On chip debug bytes security ID Watchdog timer Select Tools on menu bar then Linker options 3 4 1 Output1 Tab Select Output1 tab on Linker Options window and see following settings 44 ...

Page 45: ...ss area that reserved by on chip debugging 2H 3H CEH D7H From the address set in Start address to the byte set in Size Security ID Check Security ID and enter the security ID which is a unique ID code 10 bytes to authenticate when the debugger is launched The security ID is stored in the flash memory C4H CDH and checked if it is the same as the code entered in Linker options dialog when the debugg...

Page 46: ...ow voltage detector and system reserved memory area The 3 bytes you entered are stored at C0H C2H on flash memory C0H setting for watchdog timer C1H setting for low voltage detector C2H setting for system reserved memory area must be set as FFH This time you disabled the watchdog timer and the default start function of low voltage detector For details refer to the user s manual 78K0R KG3 U17894 46...

Page 47: ...s are useful following two settings are covered specifically in this section Enable C comments Use multiplier and divider Select Tools on menu bar then Compiler options 3 5 1 Extend Tab Select Extend tab and check Enable C Comment This setting allow you to use the C comment using It is useful feature when developing code 47 ...

Page 48: ...3 5 2 Startup Routine Tab Select Startup Routine tab and check Using Library and Using Multiplier Divider The 78K0R KG3 has feature of multiplier divider to increase those calculation speed 48 ...

Page 49: ...3 6 Configuration of Debugger setting Please Choose Tool Debugger Setting at the pull down menu 49 ...

Page 50: ...Check if ID78K0R QB V3 60 78K0R Integrated Debugger is selected on Debugger 50 ...

Page 51: ...1 2 short USB side Bit1 ON Bit2 ON Bit3 ON Bit4 OFF Bit5 OFF Bit6 OFF Bit7 OFF SW1 Bit8 OFF SW1 JP1 After the switch settings are completed connect the PC to USB1 on TK 78K0R KG3 UD with USB cable If the Found New Hardware Wizard is started install USB driver with referring 2 3USB Driver 51 ...

Page 52: ...3 8 Creating execution format Please go back to PM Please re compile the project by clicking the button at the menu bar Build process is executed Build has been completed successfully 52 ...

Page 53: ...lects files that have been updated from the previous build processing and complies and assembles only the relevant files thereby reading the time required for build processing What is rebuild Build compiles and assembles only the source files that have been updated since the previous time whereas rebuild compiles and assembles all the source files When setting such as compiler options have been ch...

Page 54: ... ID78K0R QB Please select the Debug button of PM or in the menu select Build B Debug D If the debug button is not displayed in the menu select Tool Debugger Setting ID78K0R QB V3 60 78K0R Integrated Debugger ID78K0R QB is launched 54 ...

Page 55: ... Configuration dialog is opened Enter FFFFFFFFFFFFFFFFFFFF F x 20 in ID Code then click OK Click Yes when the confirmation dialog for downloading load module file is opened 55 ...

Page 56: ...nloading the program to flash memory When the download is completed the source code will be displayed NOTE Completion of the download does not mean running the programs To run the sample programs go to 3 11 Executing program 56 ...

Page 57: ...the message please confirm the following items 1 Please confirm the switch on the board is set as follows JP1 1 2 short USB side Bit1 ON Bit2 ON Bit3 ON Bit4 OFF Bit5 OFF Bit6 OFF Bit7 OFF SW1 Bit8 OFF 2 Please confirm the power LED1 is lighted After checking the above items start ID78K0R QB again 57 ...

Page 58: ...f the ID code is 0xFFFFFFFFFFFFFFFFFFFF You can set an alternative ID code on the linker option tab If the setting of On Chip Debug Option Byte is Does not erase data of flash memory in case of failures in enabling on chip debugging and if you forget the security ID you need to erase the flash memory completely To erase the flash memory please refer to the section 7 4 Erasing the Flash Memory 58 ...

Page 59: ... displays the internal status of the CPU and controls monitor functions in the main window The initial screen of ID78K0R QB is as follows Main window Status bar Menu bar Window display area Tool bar For more details please refer to the user s manuals of ID78K0R QB 59 ...

Page 60: ...3 11 Executing a program If you click GO the execution of the code will start You can know it by the red bar at the bottom Execute the program While a program is running the status bar will be red 60 ...

Page 61: ...op a program Now you are going to stop the program Press the ID78K0R QB s stop button or in the menu select Run Stop Stop the program When the program stops the status bar changes back to the original color 61 ...

Page 62: ...elect File on menu bar then Exit The Exit confirmation dialog box is displayed If you push the Yes ID78K0R QB is terminated after preserving a present environment If you push the No ID78K0R QB is terminated without preserving a present environment 62 ...

Page 63: ...e with USB interface to the second PC for debugging at the receiver board Execute terminal software Transmitter use as Stand alone Execute ID78K0R QB Receiver Debugger use Short address 0001 Short address 0002 2 Now you designate one TK 78K0R KG3 UD board loaded with the execution code in the previous procedure as a transmitter Another board which is not loaded with the execution code is now desig...

Page 64: ... is for the short address of 0002 There are four ways of the address setting as follows Short Address 0001 0002 0003 0004 Bit6 OFF ON OFF ON SW1 Bit7 OFF OFF ON ON Please connect the receiver board to your first PC with a USB cable Now please repeat the procedures described in the section 3 9 Starting integrated debugger You will see the C source window as shown below 64 ...

Page 65: ...Now please click GO to run the program You will see the red bar at the bottom Now the receiver board is ready 65 ...

Page 66: ...1 This board is designated as the transmitter Then please connect it to your second PC with a USB cable Then please identify the COM port number of the USB in your PC at Control Panel Æ System 4 Hyper Terminal On MS Windows in your PC please select All Programs Accessory Communication HyperTerminal Setting of Hyperterminal Bits per second 115200 Data bits 8 Parity None Stop bits 1 Flow control Non...

Page 67: ...Now you will find the following opening menu in the window If not please try the RESET button on the board 67 ...

Page 68: ...e 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 msec Then the PER test will be executed You will see the number of packets sent that is 1000 as you input the number of the received packets the calculated PER in and the maximum and minimum RSSI values in the PER test Note PER Packet Error Rate RSS...

Page 69: ...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 69 ...

Page 70: ...specified by the IEEE 802 15 4 specification The channel 11 is assigned at 2405 MHz You can change the channel in the PER test in 5MHz step to the maximum channel of 26th at 2480 MHz To do it please press A in the command prompt Then please choose the channel by A B or C In the example below the channel 23th 2465 MHz was selected 70 ...

Page 71: ...l used is 23th in the display Please note the receiver will learn which channel is to be used for the test automatically My Profile MAC 22 95 78 01 00 00 00 47 Short 0001 PanID 2514 Send to Short addr 02 Send count dec 1000 Interval dec msec 5 Set channel to 11 Cmd Prepare to send OK Set channel to 23 Current Send 0 Request to result OK Results From 0001 To 0002 Sent 1000 Recieved 1000 PER 0 0000 ...

Page 72: ...l the output power in the PER test For it please select M in the menu You will be asked the register ID Please input 274 Then you will see LREG 203 00 It means the current value at the register 274 is 0xC4h which means 0 dB 0xC4h is the reset default 72 ...

Page 73: ...REG 274 7 6 large scale tuning C4 0 dB 81 8 dB 09 16 dB 01 24 dB LREG 203 7 3 small scale tuning 000000 0 dB 000001 0 1dB 111111 8 00 dB For instance if you wish 8 dB please input 81 as follows LREG 274 C4 81 Then you will start the PER test 73 ...

Page 74: ...arger PER value with smaller RSSI value in this case Please note this adjustment is applied only to the transmitter The receiver always sends back the test results with the 0 dB output power using the channel 11th 74 ...

Page 75: ...ver mode by setting the switch 1 8 3 14 3 Continuous TX Pseudo Noise The Menu 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 0 3 14 4 Continuous TX Raw carrier The Menu 4 initiates the carrier transmission The output power is not 0 dB as a reset default You can define the channel u...

Page 76: ...he Power down mode 3 14 10 Set RF channel The Menu A allows you to set the RF channel 3 14 11 Manually set UZ2400 register The Menu M allows you to set the UZ2400 registers Please refer to the datasheet of the UZ2400 RF chip for the definition of registers 3 14 12 Resetting RF The Menu R allows you to reset the UZ2400 registers 76 ...

Page 77: ...3 15 Terminating PM In the PM menu select File Save Workspace Then select File Close Workspace In the PM menu select File Exit PM PM ends 77 ...

Page 78: ...e USB Mini B connector RF connector SMA Connector of board in surrounding CN1 not mounted Connector for battery 9 0V 4 8V MINICUBE2 connector Power supply voltage 5 0V Supply from USB 9 0V Supply from a battely Min 6 5V Input output for operation check use 7LED x3 Push switch SW3 SW4 Dip switch SW1 Reset switch SW6 Temprature sensor U1 Other hardware Mode switch SW1 Power LED LED1 The name with br...

Page 79: ...4 1 Layout of hardware functions FP1 Universal area USB1 SW1 LED2 LED4 SW4 SW3 CON2 U1 RFVDD1 P150 P153 SW2 SW5 LED1 JP1 CN2 79 ...

Page 80: ...being reset until ID78K0R QB is started OFF The microcontroller runs the programs stored in the flash memory as soon as it gets power supply 2 If you use ID78K0R QB it uses P40 and P41 for communicating with host machine Therefore you cannot use P40 and P41 To run the programs stored in built in flash memory without using ID78K0R QB use following settings and re supply USB power You can use the On...

Page 81: ...e supply power You can use the On chip debug function with connecting a MINICUBE2 SW1 Bit 1 OFF Bit 2 OFF Bit 3 OFF Bit 4 ON Bit 5 ON Bit6 8 are connected to following CPU pins It becomes Low if the switch is pushed and it becomes Open if it separates Please turn on pull up resistor PU8 with built in CPU when using it SW1 Bit 6 P80 Bit 7 P81 Bit 8 P82 81 ...

Page 82: ...zing routine of your program code For more detail please refer to the User s manual U17894 of the μPD78F1168 CPU SW2 terminal list ALPS SKRHADE010 SW2 Signal name Terminal CPU name at connection destination Notes 1 P72 P72 EX18 KR2 UP 2 P73 P73 EX19 KR3 CENTER PUSH 3 P74 P74 EX20 KR4 INTP8 LEFT 4 P75 P75 EX21 KR5 INTP9 RIGHT 5 GND GND 6 P76 P76 EX22 KR6 INTP10 DOWN UP RIGH LEFT DOW SW2 Directional...

Page 83: ...ip pull up resistors PU7 during initializing routine of your program code For more detail please refer to the User s manual U17894 of the μPD78F1168CPU SW3 and SW4 terminal list ALPS SKQMBBE010 Signal name Terminal CPU name at connection destination Notes SW3 P70 P70 EX16 KR0 SW4 P71 P71 EX17 KR1 SW4 SW3 4 2 4 SW5 SW5 is the reset switch CPU can be reset by pushing SW6 83 ...

Page 84: ...2 6 LED1 This is the POWER LED It is lighted when it gets power supply 4 2 7 LED2 LED3 and LED4 LED2 LED3 and LED4 are available for applications To make an LED on please set the output port LOW LED2 LED3 and LED4 Terminal list Signal name Terminal CPU name at connection destination Notes LED2 P62 P62 LED3 P61 P61 SDA0 LED4 P60 P60 SCL0 LED4 L LED3 ED2 84 ...

Page 85: ...ure referring to the conversion formul available in the datasheet of the sensor SII S 80120CNB Please download the datasheet of the sensor from the internet web site of Seiko Instruments 4 3 Universal Area The kit has the universal area Users can use this to develop custom circuit 4 4 Solder short pad With using the solder short pad to cut the circuit users can customize the circuit The solder sho...

Page 86: ... voltage level of 4 8V functions of the board are not guaranteed The battery voltage can be checked at the port as shown below 9 0V Battery check Signal name Terminal CPU name at connection destination Notes BT_MONI P26 ANI6 33 8 of the battery output is available at ANI6 For instance If the battery level is 9 V the level of the BT_MONI 0 338 9 0 V 3 042 V If the battery level is 6 5 V the level o...

Page 87: ...5 The IEEE 802 15 4 MAC Sample Program Two sample implementations utilizing the MAC stack are offered in this evaluation kit 87 ...

Page 88: ... source codes If you wish to tailor the sample program to meet your specific needs you can edit the source code re compile it with debug build to generate a load module file then start the debugger to load the tailored execution code on to the microcontroller for further debugging on the project manager PM In this procedure the Flash programmer is not required However because the USB connection to...

Page 89: ...on menu bar then Compiler options Select Preprocessor tab on Compiler Options window To write programs on the first TK 78K0R KG3 UD enter CPU78K0R DCDC MAC_ADDR 0x0001 on Define Macro For the second and third TK 78K0R KG3 UD enter CPU78K0R DCDC MAC_ADDR 0x0002 and CPU78K0R DCDC MAC_ADDR 0x0003 The number x of MAC_ADDR x must be a unique number Click re build button on PM or select Build Rebuild on...

Page 90: ...st Program Settings of the Hyper Terminal should be set as follows Bits per second 115200 Data bits 8 Parity None Stop bits 1 Flow control None Press SW5 RESET SW once after Hyper Terminal is started The sample application starts after resetting In the same way connect the other TK 78K0R KG3 UD board to PC and start Hyper Terminal If the PC has more than one USB ports you can connect to more than ...

Page 91: ...not please try the RESET button on the board Command My MAC extended address 123412349ABC0001 78K0R UZ Sample Application Skyley Networks Then press Enter Help S Send Message M MLME Associate test C Start Coordinator test Command Please do the same for your other boards and PCs 91 ...

Page 92: ...n For other PCs for other boards please press M Command M MLME ASSOCIATE request MLME ASSOCIATE confirm Associated ShortAddr 4321 Status 00 Command Command C MLME START request MLME START confirm Status 00 Command 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 92 ...

Page 93: ...CIATE indication 5 1 5 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 then input the short address of an end device 4321 in this example then input your text message up to 102 bytes Command MCPS DATA request Send to short address 4321 Message Hello Command S 93 ...

Page 94: ...d device 4321 The sender s short address is 1975 and the PAN ID is 2420 in this example from 1975 2420 Hello Command MCPS DATA indication Now you can reply from the end device 4321 to the coordinator 1975 by inputting S 1975 and your reply text 94 ...

Page 95: ...source code re compile it with debug build to generate a load module file then start the debugger to load the tailored execution code on to the microcontroller for further debugging on the project manager PM In this procedure the Flash programmer is not required However because the USB connection is occupied for the debugging interface the USB connection is not available for applications In this a...

Page 96: ... each TK 78K0R KG3 UD board for the information about how to write programs refer to 3 1 Starting PM through 3 9 Starting integrated debugger ID78K0R QB The address of each board will be set by pressing SW2 when the boards start up when power is supplied Therefore you use the same programs to all boards 5 2 2 Starting up a coordinator By connecting the TK 78K0R KG3 UD which takes the role of Coord...

Page 97: ...nd 115200 Data bits 8 Parity None Stop bits 1 Flow control None 6 After you open the window of the HyperTerminal please push the reset button on the board Now you will find the following opening message in the window If not please reconfirm the COM port number of the USB connection Now the coordinator has started up successfully 97 ...

Page 98: ...TERY side 2 3short and SW1 to all OFF then connect battery You must set the position of SW2 when you supply power to TK 78K0R KG3 UD The TK 78K0R KG3 UD board functions of each SW2 position are described as follows Position of Joy Stick during start up Function Extended Address Default Coordinator 0x1234XXXX9ABC0001 Up End Device 0x1234XXXX9ABC0002 Center End Device 0x1234XXXX9ABC0003 Left End Dev...

Page 99: ...message on the HyperTerminal A short address of 4352 was assigned to the board A short address is assigned sequentially independent from the long address Then if you start up the third board while keeping the Joy Stick center you will see the following message on the HyperTerminal 99 ...

Page 100: ... end device LED3 on the coordinator blinks 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 LED on Coordinator SW on End Device LED2 SW3 LED3 SW4 The following example shows the SW3 on the fifth end device 4356 was pushed You will see the LED2 on the coordin...

Page 101: ...to 1 3 Installation of USB Driver Check Point 4 If above 3 check points are confirmed disconnect the USB cable from PC and re connect again It should show the Found New Hardware Wizard wizard Operate the installation with referring to 1 3 Installation of USB Driver After the installation make sure you go through 1 3 3 Completion of USB Driver Installation to confirm the USB driver installation 6 2...

Page 102: ...ID entry area at the start of debugger Check Point 1 Enter correct security ID and click OK on the configuration window Check Point 2 If you forgot the security ID you have to erase the microcontroller built in flash memory Before erasing check if you actually set the security ID with referring to 3 4Configuration of Linker Option Also remember the code you set for the security ID After this erase...

Page 103: ...ed F0c33 Basically this error occurs when you start download the debugger without doing the settings described at 3 4Configuration of Linker Option Do the same checking processes as 4 2 3 The on chip debug function had been disabled in the device F0c79 103 ...

Page 104: ...tion techniques of development tools and circuit diagram of the kit for developing of user programs 7 1 Create a new workspace project 7 2 Register additional source file 7 3 Debugger tips 7 4 Erase microcontroller built in flash memory 7 5 Circuit diagram 104 ...

Page 105: ...rj of the same name is simultaneously created Folder Specify the folder for saving the workspace file by writing its absolute path This item can be selected from a reference dialog box by pressing the Browse button Project Group Name Specify this item if wishing to manage multiple projects together in function units If nothing is specified this item is the same as the workspace file name Microcont...

Page 106: ...e information setting as follows Workspace file name test C 78K0R 78K0R uPD78F1168_A0 Folder Project Group Name no input Microcontroller Name Device Name Click Next button Click Yes button Click Detail Setting button 106 ...

Page 107: ...Set the version of tools as follows CC78K0R W2 12 RA78K0R W1 33 ID78K0R QB V3 60 Select tools as above screenshot then click OK Click Next 107 ...

Page 108: ...Select ID78K0R QB V3 60 Click Next Click Next Check the project information settings Click Finish 108 ...

Page 109: ...n Additional source files can be registered at any time thereafter For details refer to 7 2 Register additional source file Also you need to do the settings for on chip debug Please refer to 3 4 Set Linker Options 3 5 Set Compiler Options and 3 7 Check Debugger Settings 109 ...

Page 110: ...ditionalsource files of b c and c c with source file a c already registered Place the cursor on a source file in the Project window of PM and select Add Source Files displayed in the right click menu Select source files b c and c c then click Open Multiple source files can be selected by clicking them while keep pressing Ctrl key 110 ...

Page 111: ...Source files b c and c c are added to the project 111 ...

Page 112: ...bar then Debugger Options Check Pictures and Text on setting area With this setting the buttons display the text as well so that it is easier to know what they are 7 3 2 Display source list and function list When you wish to see source file list or function list select Browse on menu bar then Other List to open the list window The information in the windows is synchronized Therefore it is not just...

Page 113: ...Set delete breakpoints Breakpoints are executed by clicking lines in which is displayed B is displayed in the line where a breakpoint is set Breakpoints are deleted by clicking B Click Breakpoint was set 113 ...

Page 114: ...ables There are several ways to register global variables to watch window In this section how to register from source window is described Right click the variable on source window then select Add Watch Add Watch dialog opens Click OK Adding a variable to watch window is completed 114 ...

Page 115: ... Check Specify the sampling interval time of the pseudo real time monitor function The sampling time can be specified from 0 to 65500 with unit of 100ms It will not monitor if it is set to 0 or blank The user program momentarily breaks upon a read Do not use the pseudo real time monitor function while using the memory window It uses the system resources significantly as it monitors the displaying ...

Page 116: ...the button below you can open the local variable window Unlike global variables local variables cannot be displayed when programs are running 7 3 7 Display memory and SFR contents By clicking the button below you can open the memory window By clicking the button below you can open the SFR window 116 ...

Page 117: ...n click Setting Restart the integrated debugger ID78K0R QB Now the ID code is the default value of 0xFFFFFFFFFFFFFFFFFFF Input FFFFFFFFFFFFFFFFFFFF When you could confirm the debugger is working open exk0r32ocfg exe again This time select KEEP flash memory at debugger start up then click Setting Because there is a limit of erasing times for flash memory it is recommended to try not to erase the fl...

Page 118: ...re your original source code However once you modify it then if you forget the security ID or mistakenly over write 0x00 value to the address of 0xC3 the debugger ID78K0R QB is unable to access to the CPU via OCD interface In this case you have to start over from erasing all data in the Flash EEPROM Then you can define the new ID Code You may load your source code from the debugger with a load mod...

Page 119: ...105 KOA 15 1 MR2 resister module CN1J8 103 KOA 16 0 RFVDD1 P150 P151 P152 SS Solder pad P153 17 4 R1 R2 R3 R5 Chip resister 1 2K 18 2 R16 R4 Chip resister 100 19 1 R6 Chip resister 1M 1 20 1 R7 Chip resister 360K 1 21 2 R9 R8 Chip resister 33 22 2 R14 R10 Chip resister 10K 23 2 R11 R15 Chip resister 1 5K 24 2 R13 R12 Chip resister 3 0K 25 3 R18 R20 R21 R17 R19 Chip resister 4 7K 26 2 R23 R22 Chip ...

Page 120: ... Yageo 8 2 C2 C4 Chip ceramic cap C0805ZKY5V6BB106 Yageo 9 1 C3 Chip ceramic cap C0603ZRY5V6BB475 Yageo 10 2 C21 C54 Chip resister C0402JRNP09BN150 Yageo 11 1 XTAL_2 Resonator G5 Series 32 768kHz Ecera 12 1 XTAL_1 Resonator 7M32000044 TXC 13 2 C60 C64 Chip resister C0402JRNP09BN330 Yageo 14 1 C48 Chip ceramic cap C0402JRNP09BN390 Yageo 15 5 C19 C40 C44 C55 C57 Chip ceramic cap CC0402JRNPO9BN470 Ya...

Page 121: ...124 XT2 14 RESET 13 P40 TOOL0 12 P41 TOOL1 11 P42 TI04 TO04 10 P43 SCK01 9 P44 SI01 8 P45 SO01 7 P46 INTP1 TI05 TO05 6 P47 INTP2 5 P120 INTP0 EXLVI 4 P140 PCLBUZ0 INTP6 3 P141 PCLBUZ1 INTP7 2 P142 SCK20 SCL20 1 P143 SI20 RXD2 SDA20 100 P144 SO20 TXD2 99 P145 TI07 TO07 98 P00 TI00 97 P01 TO00 96 P02 SO10 TXD1 95 P03 SI10 RXD1 SDA10 94 P04 SCK10 SCL10 93 P131 TI06 TO06 92 P130 91 P20 ANI0 90 P21 ANI...

Page 122: ...DCU 5 3 8 7 4 USB1 UX60A MB 5ST VBUS 1 D 2 D 3 ID_NC 4 GND 5 FG1 FG1 FG2 FG2 FG3 FG3 FG4 FG4 TPU9 1 TxD6Buf C16 0 1uF 1 2 RxD6 TPU7 1 C13 4 7uF 25V TPU5 1 C21 0 1uF 1 2 C18 0 1uF 1 2 C15 0 1uF 1 2 U5 SN74LVC1G125DCK 2 4 5 1 3 MR2 4 CN1J8 103 4 13 TPU1 1 U7A SN74LVC2G07DCK 1 6 5 2 TPU2 1 TPU4 1 C19 0 1uF 1 2 Y 3 CSTCE16M0V53 R0 C20 0 1uF 1 2 MR2 3 CN1J8 103 3 14 SW1 CHS 08B 16 2 3 4 5 6 7 8 1 15 14...

Page 123: ...P1_xxx 1 2 3 C23 0 1uF CN4 TFM 110 02 S D A K TR 1 3 5 7 9 11 13 15 17 19 6 2 12 20 18 16 4 14 10 8 R17 4 7K R18 4 7K R19 4 7K R20 4 7K R21 4 7K TP3 VDD TP5 TP4 NOT MOUNT FIFO 1 CCA 1 FIFOP 1 SFD 1 SO 1 SCLK 1 SI 1 RESn 1 CSn 1 VREG_EN 1 R23 0 R22 0 CN3 TFM 110 02 S D A K TR 1 3 5 7 9 11 13 15 17 19 6 2 12 20 18 16 4 14 10 8 Shield CN3 CN4 123 ...

Page 124: ... RF board schematic 124 ...

Page 125: ...OFF ON OFF Bit3 OFF ON OFF Bit4 ON OFF ON SW1 Bit5 ON OFF ON 1 ON The microcontroller stays being reset until ID78K0R QB is started OFF The microcontroller runs the programs stored in the flash memory as soon as it gets power supply JP1 Power supply setting 1 2 short supply power from USB connected to USB1 2 3 short supply power from batteries connected to CN2 125 ...

Reviews: