Home
User`s Manual
Contents
1. main c 22 main 0298 Ons E 25 ID78K0 QB SAMPLE KE2C prj File Edit View Option Run Event Browse Jump Window Help i m Ris el Sigiel ala aa sl E Source main c Sie El lt gt while lt 1 gt lt Count down start value ve TM888 mask 7 7 INTP int F clr PMKB 8 INTP unmask uhita g_start LED brink LODO ar qu C MN H x wn us wn INTP1 mask RTC int mask RTCI int F clr RTCI int 31 25ms unmask INTP4 int F clr INTP4 unmask nd yg start ve start amp spining TNTP4 mask When programs are running the status bar will be red 45 TK 78K0 KE2C User s Manual Check that the 7segment LED on TK 78K0 KE2C is lighted SW1 SW2 U2 7segLED 00010 00000000000000000 6 ox d30000490 20020 08 0 00 010 SA magr 2 6 n SE Nur ere Chi GH Tm 3 jl e HART e Ll TEBI TON A 5 ga E zs EN ETZ umm TI E 2 ai WS qs P i pud A E Hi 2 A T 1148 P Fa a i G E e SHINN T Ee T L Er EE h rx di ES VW I UI K PEST Pee Ri a bir dE E Adams h En L Elani MO 2 ON Be e me a POWER When you press SW1 the segment of the7segLED rotates When you press SW2 number is displayed on the 7segLED after a while Ab You could confirm the sample program is working 46 TK 78K0 KE2C User s Manual 2 11 Stop Programs Now you are going to stop the program Click the stop button II
2. or select Run on menu bar then Stop 25 ID 8KO OB SAMPLE KE2C prj d dit View Option Run Event Browse Jump Window Help V ajja EI lt gt while 4154 g start og led s CROGA TMMK666 Count down start value TM888 mask PIF INTP int F clr PMKG INTP unmask nares g_start gt lt LED brink HOOO wn us wn A wn Bx E 5 B H INTP1 mask RTG int mask RICI int F clr RICI int 31 25ms unmask INTP4 int F clr INTP4 unmask A 7 start amp spining ve INTP4 mask Stop the program 25 ID 8KO OB SAMPLE KE2C prj File Edit View Option Run Event Browse Jump Window Help i me gt m a e aa area Oase Source main c Sele h_initial gt while lt 1 gt lt Count down start value TM888 mask ve INTP int F clr INTP unmask 8 8 0040 1 Bx H 5 INTP1 mask RTC int mask RTCI int F clr RTCI int 31 25ms unmask INTP4 int F clr INTP4 unmask yg start 1 ve start amp spining Jd TNTP4 mask E main c 34 main 0481 im 47s 298ms Manual Break A Ld When the program stops the status bar changes back to the original color 47 TK 78K0 KE2C User s Manual 2 12 Close Debugger ID78K0 QB Select File on menu bar then Exit amp ID7BKO OB SAMPLE KE2C prj mim Edit View Option Run Event Browse Jump Window Help Open Ctra Save As Close Download
3. E OutPut C Program Compilation C Program Compilation C Program Compilation C Program Compilation C Program Assembly complete C Program Link complete C Program Object Conversion Complete Y Build Total Y ut a E X E x A Files NEC Electronics Tools CC78K0 W4 00 complete O error s and O warning sz Files NEC Electronics Toolsi CC78K0 W4 00XEk complete O error s and O warning s Files NEC Electronics ToolsCC78K0 W4 00Xk complete 0 error s and O warnindi s Files NEC Electronics Toolsi CC78K0 W4 00XE complete O error s and O warningi s Files NEC Electronics ToolsiRA7S8KO0W4 01Xk O error s and O varning s Files NEC Electronics ToolsiRA7SKOW4 01 Xk O error s and O warning s fol Files NEC Electronics Toolsi RA78K0O W4 01 XEk O error s and o error s O Total varning s O 4 Download C TE78KOY SAMPLE KE2C a lmf to the debugger 49 ree DIS Maa TK 78K0 KE2C User s Manual In this chapter the hardware of TK 78K0 KE2C will be explained u PD78F0765 3 lt 78K0 KE2C External main system clock 20MHz Clock Subsystem clock 32 768KHz Internal high speed oscillation 8MHz Mini B USB USB1 Interface Expansion connector 50Pin socket x2 CN1 2 pad only MINICUBE2 connector FP1 pad only 5V USB Jsegl ED U2 Input output for Push switch SW1 SW2 operation check use Dip switch SW3 5 6 7 8bit Reset switch SW5 Mod
4. 3 Confirmation 4 850 Microcontrollers Only 4 6 Detail Setting Please select the Tools from NEC Electronics to be used Click New WorkSpace Step 7 9 Setup Source Files Please setup Source Files Source File Name 1 Workspace Information 2 Select Tools 7 Setup Source Files 8 Select Debugger 3 Confirmation 4 850 Microcontrollers Only 4 6 You can also add source files by specifying the list file or the folder You don t need to specify all the files here and you can setup source files using Project gt Project Settings later Click 64 TK 78K0 KE2C User s Manual New WorkSpace Step 8 9 Select Debugger 1 Workspace Information Please select the Debugger S G e ct D 18 KO Q B V3 E 2 0 2 Select Tools Integrated Debugger 3 Select Real Time OS 4 Startup File t 5 Register Mode H C Program Files NEC Electronics ToolslD 78K0 QB V3 20NDINN e SS Directive Filefth 7 Setup Source Files File name Option gt gt 8 Select Debugger EH 3 Confirmation 4 4850 Microcontrollers Only 4 5 rou can change the selected Debugger using Tool gt Select Debugger Click New WorkSpace Step 9 9 Confirmation Create the workspace and the project as follows 1 Workspace Information 2 Select Tools 3 Select Real Time US C ATK78KO test 4 Project Group Name test 5 Register Model Microcont
5. FIT zl be A T bad Source main c Search E AE gt Watch Quick Jee Ref oid maint EI amp while amp 1 54 Aal 4 nr ctart d 71 TK 78K0 KE2C User s Manual 5 3 4 Display global variables With using Watch Window you can display global variables There are several ways to register global variables to watch window In this section how to register from source window is described Right click the variable on source window then select Add Watch YS B X Source common c Search zx EK Watch Quick Refresh 9 Close char g_led char qg count g led z Add Watch Symbol U d WW Break when Access to Radix Proper Hex Dec C Oct C Bim C String Size e Adaptive Bute C Word Double word Humber ow Cancel Restore Help 3Adding a variable to watch window is completed El Watch SEE Add Delete Up E xib 72 TK 78K0 KE2C User s Manual 5 3 5 Display global variables while programs are running Global variables can be referred by the pseudo real time monitor function even when the programs are running Select Option on menu bar then Extended Option Configure the settings as Use MINICUBE Extended Function and RRM Setting Extended Option Iv Use MINICUBE Extend
6. The installation of NEC Electronics Starter Kit Virtual UART driver is completed Click Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software Far E MEL Electronics Starter Kt Sirtual UAA T Click Finish Click Finish ta close the wizard 7 Goto 1 3 3 Completion of USB Driver Installation 18 TK 78K0 KE2C User s Manual 1 3 2 Installation on Windows 2000 1 2 Once the TK 78K0 KE2C is connected with USB the Found New Hardware Wizard will be started Select No not this time and click Found New Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps you install a device driver Far 4 hardware device Click Next To continue click Next Back Imm Cancel Select Search for a suitable driver for my device Click Install Hardware Device Drivers device driver i a software program that enables a hardware device to work with an operating system This wizard will complete the installation for this device o USB Device device driver ls a software needs driver files for your nev device installation click Nest Select Search for a suitable driver for my Click Next Cancel What do vou want thg lzard to do Ce Search for a suitable driver for my device recommended C Display a list of the known drivers for thi
7. Upload Project Environment Debugger Reset Count down start value IR mask e INTPH int F clr ge INHTPH unmask IMTP1 mask RIC int mask RIGI int F clr RICI int 31 25ms unmask INTP4 int F clr INTP4 unmask g_start 1 ff start amp spining THTP4 mask The exit confirmation dialog is displayed main c 34 main 0481 dm 47s 298ms Manual Break E ID 7 8K0 0B This will end your Debugger session Do you want to save the settings in the project File Yes No Cancel If you click it saves the settings in the project file and then closes the ID 8KO QB It is recommended to save the settings as it saves the window you used window size layout etc If you click it does not save the settings and closes the ID78K0 QB 48 TK 78K0 KE2C User s Manual 2 13 Quit PM Select File on menu bar then Exit PM cm Ac PM SAMPLE_KE2C prw OutP ut NEM Edit New Open Ctrl N Ctrl O Debug Build Close New Workspace Open Workspace Save Workspace Close Workspace Save As Print Preview Print Ctrl P mmm Exit PM ES Exit PM and prompt to save the files PM is closed The experiences section ends now You can find more information how to use the development tool and information about other useful features in Chapter 5 Other Information _ aoa Find Layer View Project Build Tool Window Help Ww 3
8. etc and opening functional window can be made by below buttons However it could be difficult to know which button does what LILSLSESEILUES RS ERES Q Al eos In this case select Options on menu bar then Debugger Options Check Pictures and Text on setting area Tool Bar Pictures e Pictures and Text Pictures only With this setting the buttons display the text as well so that it is easier to know what they are i ee mal pnm E ala e E x ReGo Go Go Ret Step Over Res Open Load Sro Asm Mem Wech Reg SFR Loc Stk 5 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 gt List to open the list window The information in the windows is synchronized Therefore it is not just for referring to the list but it is useful when you wish to update files or functions Source main c EE x Search gi EK Watch Quick oid main gt E EI amp hile 154 Aalt 4 nn cd AL 70 TK 78K0 KE2C User s Manual 5 3 3 Set delete breakpoints Breakpoints are executed by clicking lines in which is displayed B is displayed in the line where a breakpoint is set Breakpoints are deleted by clicking B E Source main c Search Hn ne gt watch Quick Les Ref maint gt EI amp while 154
9. Electronics Tools CC78KO W4 00 r amp 3 Include Files 0 error s and O warnind is amp C Project Related Files Electronics Tools CC78K0VW4 00k C Other Files T 0 error s and O warnind s Electronics ToolsYRA7SKO0W4 01Xk 0 error s and 0 warning s Electronics Tools RA78KO U4 01 r rror s and O warning s fol Electronics Toolsi RA78KO 14 011tx 13500 Build completed normally Object Conversion Complete 0 error s and D A Build Total error s O Total warning s O EOF Build has been completed successfully 9 TK 78K0 KE2C User s Manual 38 TK 78K0 KE2C User s Manual 2 Check Debugger Settings After the build you should configure the debugger settings The debugger settings have been set by the project file as well However because those settings are important for debugging some settings are covered in this section Select Tools on menu bar then Debugger Setting cor 40 PM SAMPLE KE2C prw OutPut File Edit Find Layer View Project Build BEWA Window Help D G Y amp i Compiler Options Structured Assembler Options SAMPLE KE2C SAMPLE KE2C v Debu Assembler Options Linker Options ProjectWi ndow Object Converter Options m iz E List Converter Options Files Memo a ilesXNEC Electronics Toolsi CC78K0 14 001 ze ES O error s and O varning s Rs SAMPLE_KE2C 1 Project s rr e Electronics To
10. If not install the driver Check Point 3 Check if the settings of SW3 4 on the kit are correct with referring 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 4 2 Error when you start the debugger There could be several reasons to make errors happen The solving processes differ depending on errors Please check the error message first The solving processes for each error are as follows 58 TK 78K0 KE2C User s Manual 4 2 1 Can not communicate with Emulator F0100 or A0109 Check Point 1 If you use USB hub do not use it USB hub is not supported Check Point 2 Check if the settings of 3 4 on the kit are correct with referring 1 3 Installation of USB Driver Check Point 3 Confirm the USB driver installation with referring to 1 3 3 Completion of USB Driver Installation Check Point 4 If above 3 check points are confirmed close the debugger and disconnect the USB cable from PC Re connect USB cable properly to both the PC and the kit and then re start the debugger 59 TK 78K0 KE2C User s Manual 4 2 2 Incor
11. NEC Electronics Tools gt PM V6 30 7 PM No Workspace OutPut File Edit Find Layer View Project Build Tool Window Help e Dee x jI lIlp gt dO aisle 2 de ProjectWindow Ox output DAR Files Memo qnx No Workspace For Help press F1 29 TK 78K0 KE2C User s Manual 2 2 What is PM In PM application programs and environment setting are handled as a single project and series of actions such as program creation using the editor source management build and debugging are managed Also one of more project files is managed together as a workspace Menu bar Tool bar so PM No Workspace OutPut File Edit Find Layer View Project Build Tool Window PHelp amp ET ProjectWindow Belg E OutPut Files Memo Epy No Workspace For Help press F1 NN Project Window Output 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 Ep For details regarding menu bars and tool bars refer to Help menu in PM Help on menu bar then PM Help 30 TK 78K0 KE2C User s Manual What is a project A project is the unit that is managed by PM A project refers to an application system and environment development based on PM PM saves project information in a project file What is a project file A project
12. Name Device Name 78K0 z uPD78F0500 30 8 Select Debugger 9 Confirmation Device Install t 850 Microcontrollers Only 4 6 will set up the basic information about the workspace and the project e pem zs 7 Setup Source Files Folder gt 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 button Project Group Name gt 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 Microcontroller Name gt Specify the name of the microcontroller to be used Device Name described on the following pages 62 TK 78K0 KE2C User s Manual New WorkSpace Step 1 9 Workspace Information Input the workspace information setting as follows Workspace File Name Me gt gt 1 Workspace Information 2 Select Tools Work space file name See Create Blank Workspace 3 Select Real Time 0S test CATK78KONtest Browse Project Group Name Folder Microcontrollers Name Device Name 8 Select Deb GCXTK78KO0Xtest Ee gt Iesse elect Debugger 9 Confirmation Device Install 4 850 Microcontrollers Only 4 5 7 Setup Source Files Project Group Name no input Microcontroller Name 78K0 This will set up the basic information abo
13. R Zdl tdl ASZ JhL v Ho KR 69 LAANVZ 9 44 HZLLLOd OND ddA qm aang adna ose vu da 0 9 10 07v003H ENO aa asn 2uJa X3 J01e n38y Jeidepy 9v c gsn c l jndu 103e n39y Ld3i Ng91 2434 NI 510 NI 13S3H viva H eed 0 0 0 01 xl 2 S SI NI NIN u ka Ka NI 29 3 3 NIJ D S ua a ajo Ny Cd Ga Po 2 o ico o o ro ro ro ro ro ro ro ro ro ro 89 0487 Qdn IRS S oo INI jo o as 5 co oo Ju 81 TK 78K0 KE2C User s Manual OOA o CIUUUUUUUUUUUUUUTU WDOSOONNNNNNNNGQDDDD RASSANGRADNGONAGS EE OsOOUMAOOODGZIVOCO COSC ROZZANT EE 1385802353 32238 xol SE o 9 eu 3 2193203 I y 0L N a A Led lt lt VIGOO zdlNI Ied Q v LEd ZOOLL OSd Q A Ha VE Z0OLZLOIL LSd d d SE zod ada aona X ecu 2934 L I M d LdLNI O d v0Q90 IX LZLd Qed s OSOL OSIL Z bd 80000 P19X3 exiez kd W vo EBEN PUNON SON a Sc SdINI THOL 9I d oana Es oana e 2401 Jdor Ze 0HOL SLd uxiezid L pe qn z vid gt Hd H SCKRHE id SEI LIX z Eldo Els Sc 9OXL ELd lasas 5 Elx lt 13s38 z SL ee 0LOS ZLd ZHLOLu Ln0939 0rd lt E woe wise ote Ge OOXH OLIS E Ld 199914 M10914 N1939 tbd L Otd ix Lid ge 0QXL 0D4OS 0Ld rd r rd gt Old Ze HAN d r Ge SSAV ZIAWKS OdLNI 0Z bd d J3YUAV Sr ES 0zld 01 X B aan J3YAV v Se La Q O 880 SHO Sp ES U0 0 00D fac ac e E 6 v0d anyo RRE S EE 8 EMS SL
14. file contains project information that includes the source files device name tool options for compiling editor and debugger information The file name format is xxxxx prj Project files are created in the directory you specifies when you create a new workspace What is a project group A project group is a group comprised of a number of projects in an application system The target device of each project must be the same within a project group What is a workspace A workspace is the unit used to manage all the projects and project group required for one application system A workspace file contains one or more project files The file name format is xxxxx prw 31 TK 78K0 KE2C User s Manual 2 3 Load Workspace project In this section you will use the workspace that you created in 1 4 Sample Programs For creating a new workspace refer to Chapter 5 Other Information The workspace has information about the build environment for the sample programs Select File on menu bar and Open Workspace Then select SAMPLE KE2C prw under the directory TK78KO SAMPLE_KE2C so PM No Workspace OutPut ES Edit Find Layer View Project Build Tool Window Help New CuHN a ga J4 I a Open CHO H KE nsert File Eoo el y ZS Close New Workspace BEE OutPut x Save As e Sou d Save All S e Files Print Preview Print Ctrl P
15. files 66 TK 78K0 KE2C User s Manual Linker Options Output Output Library Others Checks are put in On Chip Debug and SIZE Then input a default value of 512 into the SIZE A check is put in Security ID Load Module File a Output File Name Browse W Output Symbol Information g The actualities of FFFFFFFFFFFFFFFFFFFF are taken if there is no problem in the Create Error List File e L p sees Iw On Chip Debug 90 W SIZE 512 bytes value of ID in security W Security ID gi ID FFFFFFFFFFFFFFFFFFFF Command Line opp na Imf qo512 qillFFFFFFFFFFFFFFFFFFFFh pa map bel Wi bet lib 4 E 5Pregram Files MEC Electronics Tools CC Z0KIMWA DO MIB SK 4 a TEC Push the OK button Next please add the following option asm file and set the method of attesting security ID as the setting of the option byte Please refer to the user s manual of the device for details of the option byte Refer to 78K0 Kx2C user s manual for the details of the security ID option asm please the file must be included in the sample program and copy this file and use it Please refer to Registering additional source file of next page for the method of adding the file OPT CSEG AT 0080H OPTION DB OOH DB OOH DB OOH DB OOH DB 03H TMP CSEG AT OFEDFH ttmp DS 1 END Example for the Option asm 67 TK 78K0 K
16. following device y USB Device Windows found a driver for this device To install the driver Windows found click Next ce program files nec electronics Eaols tk drreersmabzsall inf Click Next Back Ce Cancel 6 The installation of NEC Electronics Starter Kit Virtual UART driver is completed Found New Hardware Wizard Completing the Found New Hardware Wizard gt MEL Electronics Starter Kit Virtual LAAT Windows has Finished installing the software for this device Click Finish To close this wizard click Finish feel Cancel 7 Goto 1 3 83 Completion of USB Driver Installation 21 TK 78K0 KE2C User s Manual 1 3 3 Completion of USB Driver Installation Confirm the USB driver is installed on PC Start Device Manager and find NEC Electronics Starter Kit Virtual UART without mark under the Ports COM amp LPT Device Manager L Computer Management QA mi Fie Action View Window Help le e mm SG m x d zu OPTZIUL 4 Computer is Disk drives E Display adapters 5 DVDICD ROM drives 43 Human Interface Devices ic IDE ATA ATAPI controllers cx Keyboards Mice and other pointing devices Find NEC Electronics Starter Kit 7 Monitors Virtual UART COMx BEI Network adapters 4 Ports COM amp LPT EE Pork COMI Computer Eegen Local ih System Tools Event viewer iJ Shared Folders Performance
17. preceding License Agreement If you choose Ma the setup will clase To install FA ZSEKD WA 01 vou must accept this agreement 6 Enter the product ID and click The product ID is available on the other sheet InstallShield Wizard Please enter the product ID of the product Enter Product ID Product ID is written on the case or in the accompanying documents Product ID Back C mee D Cancel 7 It starts copying the files 12 TK 78K0 KE2C User s Manual Click when Select Files installation wizard dialog opened Install Wizard Kind of File Select the kind of installation file W Device File For BK EC2 C W Device File For BK KE2 C Cow Canes 9 When the installation is completed the following dialog opens Click INSTALL NEC Electronics Starter Kit Virtual UART USB driver must be installed on PC before you connect to TK 78K0 KE2C Install the USB driver by referring 1 3 Installation of USB Driver 13 TK 78K0 KE2C User s Manual Notes on the installation authority To install this tool in Windows 2000 or XP the authority of an administrator is necessary Therefore please login as an administrator Notes on the install directory Please do not use 2 byte characters such as umlaut in the directory name where the product is to be installed Note on the version of Windows If the language of the Windows is not English a file transf
18. 7 Display memory and SFR contents By clicking the button below you can open the memory window sal Memory Search EX gt gt Refresh DMM 1 2 3 4 5 6 7 Close B 9 75 TK 78K0 KE2C User s Manual 5 4 Erase microcontroller built in flash memory WriteEZ5 can erase the flash memory when you forgot the security ID or you set unexpected value By erasing the flash memory you can reset the security ID to FFFFFFFFFFFFFFFFFFFF DStart WriteEZ5 from NEC Electronics Tools E write EZ5 File Device View Help gm Ver amp gt FlashOpenning Flash Open CK Set TK 78K0 KE2C switches and then connect the PC SW3 SWA4 ffi Name Firmware Parameter file Name E Werslon Load file Mame Date Ghksum rea Connection to device Port Speed Range Freq Multiply m HUN TK 78K0 KE2C User s Manual 3 Click the setup button Device m FlazhOpe Wi Flash Open OK Name Firmware Parameter file Mame Version Connection to device Port Speed Range Freq Multiply Click PRM File Read button E Device Setup Standard Advance Parameter File Host connection Supply oscillator Port m Frequency Speed Multiply rate Operation Mode Chip C Black Area Target Reset Message 7 TK 78K0 KE2C User s Manual 5 Please select 78F0765
19. DESESSS 335 LO EA A A A A AA oscm 880 SHO SSNZ O 7 ed zaa asn 880 SHO Laa asn 3 20d Te aa asn UU RRR RIR R u ur De RARA SASSER RR 880 SHO s 2l3 St fj 00d Mj junow 1oN junow JON S EMS Bed 0013 VSQvS Z V Q05 HEJIH VSQvS Z VO0S HEJIH ld Zid Sid S d ld Her 04d pe 8ALOE V1 Ed Feet ZSI 8PLNO m in S ZMS Sd Dep Qld Id1NI Od Od d LOd 00d I tld 0 amp d E aana Old Ebd LL SENONS ZEd Obld ue a AAA LMS 2d l d IS Od1NI 0Sd eb 3d 92d JMO 00 13 S2d bed DEL Ld 02d TK 78K0 KE2C User s Manual OLOZ OL Sunf Aepsinuj 8zE00SOL SL JequinN 1ueunooq RESEIOKE D JE EI L HEMS MOL EIN N ks E aaaasn aaaasn 9dd endl endL S d K E AS Y LIH noqwi Z I E O O 4ndL endL jnro 919 001 aa a E NOASZLDZOATHLNS 9LH 880 SHO pM i 13s3u lt SS 0 E 5 gon Y EMS ds aa a end OF 2nda OT nd OF NDASZLDZIATPLNS Eist 9 Z von 9 lo 3001 YSL EN i LLY adaa 3 001 amna NOaSZLOZOATPLNS Olu VIQOO Jsi 6H v EMS D anyo T aa a E NOASZLOZOATPLNS g80 SHO He 3 oand K ST oz c E ZEMS ven Y joo 001 adna Su 00 88WOxS oa qm gt gt Zed 13530 L asnoaxu lt Sid L bey SMS ESMIAXL i MS 13938 oogezzSsss vMS qoo uldy Din uidi dan anyo GO ADOSZLOLOATPLNS anyo MS ZH anyo anyo 619 819 029 aaaasn aaqaasn S OIN0 038 Qdn T E ALGOO EdLNI Zed Agen BEE E D n S05 Od Wa ISS ANVON YLODO ZALNI LEd e qu
20. E2C User s Manual 5 2 Register additional source file Now register additional source files The following example shows the additional registration of source files b c and c c with source file a c already registered Place the cursor on the source file in the Project window of PM and select Add Source Files displayed in the right click menu ny PM test prw ProjectWindow SEE File Edit Find Layer View Project Build Tool Window Help Add the source File to the project Add Source Files test Look in E test eE File name cc l Files of type Source Eileslt c a asm Cancel Help Add Files from Folder Multiple source files can be selected by clicking them with pressing key 68 TK 78K0 KE2C User s Manual i PM test prw ProjectWindow File Edit Find Layer View Project Build Tool Window Help amp ng S ew i s i al MB ProjectWindow Files Memo Hrs test 1 Project s E test cy Source Files ac b c E e c Include Files E Project Related Files Other Files Source file be and c c are additionally registered to the project For Help press F1 69 TK 78K0 KE2C User s Manual 5 3 Debugger tips This section describes some useful techniques for the debugger ID78K0 QB 5 3 1 Change display of buttons Execution controls run stop step in debugging reset
21. EC Eieeeroniea ToolsiCCc TERO 84 00 Compilarion complere D error s and O varningi CiMPEOGgEARm Files HEC Electronica TaolayCOCcTBRED M4 DOE Compilation completes D error a and D wearning s St Progam FilesiNEC Electronics ToolsCCTBEED NW4 D0 E Compilation complete D ercor a and D warning 2 Ei Program FilesiNEC Electronics TaalsVcCcT EDAW4 O0AE Compilation complete D erroris and warkning s CiVPEOgram Files WEC Electronics ToolanEk7DEO 4 0115 Assembly complere D error s and D warnings C Peogram Filesi NEC Eleceronies Tools RATED 44 011 E Link complere D error s and D warning ms foi CilPEOugrgAm Filesi HEC Electronica Topla RATERO 44 014 A Object Conversion Complete errar s and D Build Total errar s Total warning s O EOT keem s o090000000000000000909096060 0000 0000 0 0000 0 00 o y TK 78K0 KE2C User s Manual Overview Reader Purpose This manual consists of the following contents Read chapter 1 and 2 first for installing the development tools and using the sample programs Read chapter 3 5 for customizing the sample programs and the hardware Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Preparations Install the development tools Experiences Experience the basic operations of integrated development environment PM and integrated debugger ID78K0 QB with using sample programs Hardware Specifications Explain the hard
22. Exit PM Open an existing workspace qa E 1 Open Workspace Look in SAMPLE KE2C nn 9AMPLE KE2C prw File name SAM PLE KE2C prw Files of type Workspace File prv Y Select SAMPLE KE2C prw then click 32 TK 78K0 KE2C User s Manual Workspace name SAMPLE KE2C prw TE PM SAMPLE KE2C prw OutPut Ea je File Edit Find Layer View Project Build Tool Window Help NE i wll amp el Es EIS Load the workspace file SAMPLE KE2C SAMPLE KE2C v Debug Build ll amp amp SAMPLE KE2C prw ProjectWindow PEE KJ OutPut Files Memo Project group 3 Source Files Include Files J Project Related Files 1 Other Files 3 Project L i Bae 1 Y i E The workspace file SAMPLE KE2C prw contains one project called SAMPLE KE2C You will use this project SAMPLE KE2C CAUTION Please ignore when you get a prompt saying files could not be found This may occurred when the installation directory is not a default 33 TK 78K0 KE2C User s Manual 2 4 Set Linker Options The linker options have been set by the project file However some option settings will be covered in this section because the linker option settings are Important for debugging Following two settings are covered specifically Outputs from debugging On chip debug Disable Enable security ID Select Tools on menu bar then Linke
23. Logs and Alerts i Device Manager iy storage Removable Storage Disk Defragmenter Disk Management s Services and Applications GE Je ee doe TS IET IIS I e Sound video and game controllers M System devices Universal Serial Bus controllers The screen above shows that the COM port number is COM8 If ID78K0 GB is not in use you can use this port number for connecting TK 78K0 KE2C When you change the USB port connection the COM port number will be changed as well Select this COM port number when you use WriteEZ5 CAUTION Do not do Hardware Modification Scan when you communicate with the target device 22 TK 78K0 KE2C User s Manual 1 4 Sample Programs This section explains the overview and preparation of sample programs 1 4 1 Preparation of Sample Programs D Insert the CD ROM disk in the CD ROM drive of your PC The NEC Electronics Microprocessor Development Tools Setup screen automatically appears if this screen does not appear automatically start setup exe from Explorer etc 2 NEC Electronics Microcomputer Development Tools E Welcome to the NEC Electronics Microcomputer development tools setup program Before vau execute this installer please exit all windows programs TE SK KE2L T1 00 June 2070 Copyright E NEC Electronics Corporation 2010 Readme First Install Sample Program Unkto NEC Baier Microcomputer 2
24. Manual 3 3 Solder short pad label With using the solder short pad to cut the circuit users can customize the circuit The solder short pad looks like the picture below To open use cutter to cut the dent part To short put solder on the pad Solder short pad Solder short pad Open Short You can use CN3 and Jl Note All ground signals are each connected 56 TK 78K0 KE2C User s Manual 3 4 Operation by external power supply The power supply of the AC adaptor connected with CN3 is connected only with the power supply terminal of the connector of the board in the surrounding 10 12 and 16pin of CN1 The AC adaptor can be made a power supply by the connection of the AC adaptor of 5V to CN3 and connect JP2 jumper short and JP1 2 3 short Moreover it is also possible to connect the stabilizing supply etc in the lead line instead of the AC adaptor because CN3 is connected with J1 of a through hall Acceptable jack CN3 HEC0470 01 630 by Hosiden Corp not mounted Acceptable plug 2 1mm DO jack center plus Current capacity 100mA or more b TK 78K0 KE2C User s Manual This chapter describes how to solve troubles you may face 4 1 If you cannot find USB driver when you connect PC to the kit Check Point 1 If you use USB hub do not use it USB hub is not supported Check Point 2 Check if you installed Starter Kit USB Driver in 1 2 Installation of Development Tools
25. PM V6 30 The IDE works on Windows operation system Users can develop a system efficiently by using the editor with idea processor function compiler and debugger Q C Compiler CC78KO W4 00 code size limited version C compiler for the 78K0 microcontrollers The object code size is limited to 32 Kbyte This compiles C code for 78K0 and ANSI C code program into assembler code This produces object code and linker If you access the extended function register with CC78K0 W4 00 then configure below Example Define the EFR define RMGPLS volatile unsigned char 0xfa44 void funcOl RMGPLS 0x12 Q Assembler RA78KO W4 01 code size limited version Assembler for the 78KO microcontrollers The object code size is limited to 32 Kbyte This convert the assembler code for 78K0 into object program The object program will be used for debugger If you access the extended function register with RA78K0 V4 01 then configure below EFRNM EQU OF898H C1 CSEG MOV A 12H MOV EFRNM A END O 78KO Integrated Debugger ID78K0 QB V3 20 This is the tool for debugging the object program generated by C compiler and assembler The debugger enables to do C source level debugging With the debugger you can debug the code easily and efficiently by refering and changing variables using step in debuging function and so on TK 78K0 KE2C User s Manual OWriteEZ5 This is the tool to write HEX file on microcontroller built in memory with
26. Press the Sample Program button to start the WWW browser 23 TK 78K0 KE2C User s Manual c Sample Programs Windows Internet Explorer DADOCISAMPLE E HTML File Edit View Favorites Tools Help P Favorites sample Programs v Page z Safety v Tools m e sample Programs Welcome to TK 78K 0 K E2C world The purpose of sample programs is to experience TK 78K0 KE2C sample programs consist of the following items e TK78KO o SAMPLE KE2C a SAMPLE KE2C prw Sample program described in the TK 8K0 KE2C evaluation lat tutorial guide Click the link of TK 78K0 KE2C sample program link Jand install the sample programs e TE 78K0 KE2 sample program e TK 8KO KE2L evaluation kit User s manual Refer to the User s manual about usage d My Computer g Ri00 Done 3 Click the TK 78K0 KE2C Sample Programs link the following download confimation window appears File Download Security Warning Do you want to run or save this file Mame TK78KD EXE Type Application 34 3KB From Ds kyouyuu TK f8KO_KE2C_1T100 S54MPLE Click the butten 24 TK 78K0 KE2C User s Manual Save As Savein Se Local Disk IC t EP EJ Sy dell Documents and Settings Mu Recent Lj drvrtmp Documents jProgram Files E WINDOWS d Desktop Mu Documents Mu Computer y ei File name Mu Network Save as hype Application v 5 Afte
27. The on chip debug function had been disabled in the device FOc 79 60 TK 78K0 KE2C User s Manual This chapter explains some useful operation techniques of development tools and circuit diagram of the kit for developing of user programs 5 1 Create a new workspace project 5 2 Register additional source file 5 3 Debugger tips 5 4 Erase microcontroller built in flash memory 5 5 Circuit diagram 61 TK 78K0 KE2C User s Manual 5 1 Create a new workspace Now create a new workspace and project PM allows you to create a new workspace with following New WorkSpace dialog Select File on PM menu bar then New Workspace zo PM No Workspace OutPut jie Edit Find Layer View Project Build Tool Window Help CN Ctri o New Workspace DOE m Y OutPut Mee ee Print Preview Print Ctrl P Exit PM New WorkSpace dialog opens Create a new workspace lt Description of items gt Workspace File Name gt Specify the name of the workspace file that manages the project files prw is automatically suffixed as the file type A project file prj of the same name is simultaneously created New WorkSpace Step 1 9 Workspace Information Workspace File Name i gt gt 1 Workspace Information 2 Select Tools N Create Blank Workspace 3 Select Real Time 0S Folder Browse Project Group Name p Microcontrollers
28. User s Manual TK 78K0 KE2C Date published June 2010 Rev 1 0 TESSERA TECHNOLOGY INC 2010 Printed in Japan TK 78K0 KE2C User s Manual Windows and Windows XP are registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries The information is subject to change without notice No part of this document may be copied or reproduced in any form or by any means without prior written consent of TESSERA TECHNOLOGY INC TESSERA TECHNOLOGY INC assumes no responsibility for any errors that may appear in this document TESSERA TECHNOLOGY INC 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 TESSERA TECHNOLOGY INC 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 TESSERA TECHNOLOGY INC or others Descriptions of circuits software and other related information in this document are provided for illustrative purposes in semiconductor product operation 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 TESSERA TECHNOLOGY INC assumes no responsibility for any losses incurred by customers or
29. ailsetting gt then select ID78K0 QB 40 TK 78K0 KE2C User s Manual 2 8 Check Board Settings Before connecting the PC and the TK 78K0 KE2C with USB you should check the setting of JP1 2 SW3 4 on the board Set the JP1 2 SW3 4 of the TK 78K0 KE2C as follows 75 000000000000000000600660600025 EE EN SE SW4 NERY usBvo02 e TOU spin d SL e les THU OK IR EI d 7 Resslator gt nPut I SB gt a Mm Kl rr m In mi b SW3 4 Ween Z RoHS t GE 5 247 compliant Eet or ett el HQ External 4 TK 78K0 KE2C Y2 I5 C3 wj Hie IS 105003 8 2 e EVDD O0O000000 0 1 F JO 0 Ue To QOO OO Of Ek TECHNOL OG FP GN gt TESSERA e ooo oclooc 000000000 POWER i After the switch settings are completed connect the PC to USB1 on TK 78K0 KE2C with USB cable is started install USB driver with referring 1 3 Installation of USB O D 2 000 If the Found New Hardware Wizard Driver 41 TK 78K0 KE2C User s Manual 2 9 Start Debugger ID78K0 QB Click the debug button Fr or select Build on menu bar then Debug If you do not see the debug button go to 2 7 Check Debugger Settings for changing the settings The steps to start the debugger will be explained below MU PM SAMPLE KE2C prw OutPut File Edit Find Layer View Project Build Tool Window Help t IEH SRA 95 FA Pro
30. an find the tools by selecting Start Menu gt Programs gt NEC Electronics Tools dl Tool Installer W DeviceFile Install DeviceFile DF780765 41 00 78 0 x2 L Search iv Tool Install Tools Product Size RHATSED WA 07 T ABOE E HABEO V4 01 Documents 14 6286 P V6 30 17 46DK B P 6 30 Documents 1z B3BKB LCTSKO WA OD 13 000K B CCYeEO 4 00 Documents 14 0006 BS78 0 2 00 5 HOR B5 OU Y2 00 Documents 1 824KB E plain Drive Available Space 30 526 5U0B8KB Destination Required Space C Program Files NEC Electronics Tools Browse 133 830KB 4 Click when Install comfirmation dialog box is opened INSTALL Cancel 11 TK 78K0 KE2C User s Manual 5 Read software license agreement and click for continuing the installation To stop the installation click InstallShield Wizard License Agreement Please read the following license agreement carefully Press the PAGE DOWN key to see the rest of the agreement USER LICENSE AGREEMENT IMPURTANT READ CAREFULLY This User License Agreement LILA is a legal agreement between vou either a natural person ar an entity and NEC Electronics Corporation NEC far the SOFTWARE PRODUCT As used herein SOFTWARE PRODUCT means the NEC s computer software products provided with this ULA which includes computer software and may include associated media printed Do you accept all the terms of the
31. anual 1 3 1 Installation on Windows XP 1 Once the TK 78K0 KE2C is connected with USB the Found New Hardware Wizard will be started Select No not this time and click l Found New Hardware Wizard Welcome to the Found New Hardware Wizard Windows will search for current and updated software by looking an Your computer on the hardware installation CD or on the Windows Update Web site with pour permission Read our privacy policy TET an Windows connect to Windows Update to search for Select No not this time software CO Yes this time only CO Yes now and every time connect a device Mo not this time Click Next cue ee Click Next ta continue 2 Select Install from a list or specific location and click Found New Hardware Wizard This wizard helps pon install software Far USB Device Select MEA eI SDOPBpSelUC If your hardware came with an installation CD location 2 or floppy disk insert it now What do vou want the wizard to do Install the software automatically Recommendaz Install from a list or specific location Adva Click Next Click Next ta continue sl er 16 TK 78K0 KE2C User s Manual 3 Select Search for the best driver in these locations check Include this location in the search and then click Browse to select the driver directory path The path should be C XProgram Files NEC Elec
32. as chat al EUC ze Treat lang as int zl t Mene zn iv Enable C Comment Ignore from A4 Till End of Line zp Comment Can Mest zc Not Expand Argument and Return aluel 2b Command Line Options 36 TK 78K0 KE2C User s Manual 2 6 Create Load Module Files After developing the source code you have to create load module files by compiling assembling and linking This process is called build Click the build button ES or select Build on menu bar then Build F PM SAMPLE KE2C prw OutPut File Edit Find Layer View Project Build Tool Window Help u SRA tsela vile gt mat SAMPLE KE2C SAMPLE KE2C v Debug Build Di YA KAS 0 m ProjectWindow Files Memo E SAMPLE KE2C 1 Project s E SAMPLE KE2C E Source Files 4 Include Files E Project Related Files Other Files For Help press F1 o PM SAMPLE KE2C prw OutPut File Edit Find aver View Project Build indow Help ayer Vies Tool W Da A Swe wl sell e gt SAMPLE KE2C SAMPLE KE2C v Debug Build sell amp zm A SIS m ProjectWindow Files Memo C Program Files NEC Electronics Tools CC78KO 14 001 Compilation complete D error s and D warning Ep SAMPLE_KE2C 1 Project s C Program Files NEC Electronics ToolsXCC78K0VW4 00 k SAMPLE KE2C Compilation complete D error s and 0 warnindg s C Source Files C Program Files NEC
33. ccsssssscssesscsssscssessssssssesessssescsesessessaesescsessesssesesseseacsestsseseacscssseasacstsneseasataeseeseas 32 Z4 oe la ON ON EE 34 ZAM OUtpubl Jasmine node etie ad arcad ipti tl Fide dE 34 2 9 SEOANE OA o eLo O 36 E E 36 25 Create Load Module Files ui AAA AAA A EROR 37 2 1 Check WE DUS SE REN 39 EE Board EIERE 41 29 Start Debugger ID 78K0 O B catis npe Ert det tieu qeu had DARET 42 ZO RUIN PFO o m 45 ZAS ODPO ra EEN 47 2 42 Olose DebuessrEXIDZ8K0 OB saei o tad emere e tro d ceat Pado 48 E ren GE E 49 CHAPTER 3 HARDWARE ASBECIFIGATIONS u dco tite Ee 50 Sal Eayo ut Or hardware VE e Ee 51 32 HardWare ENEE 52 SS IWS WA 52 SS RE 54 BZ OW CRE EE 54 SE MN EE 94 O IO AAA 94 8 7G WED ROWER A 54 IAr US LED ai 99 A E 00 Sas pen ME QI I e 00 TK 78K0 KE2C User s Manual d SOE I short pad Din NTC IPM 56 With using the solder short pad to cut the circuit users can customize the circuit 56 9 4 Operation DY external DEED 57 Ee RER ROBE Sr TINE aaa 08 4 1 If you cannot find USB driver when you connect PC to the Kit eee 58 42 Error when you start the debug SCR ees 58 4 2 1 Can not communicate with Emulator F0100 or A0109 59 4 2 2 Incorrect ID Code FOODS sitet dieere e dace ede tii 60 4 2 3 The on chip debug function had been disabled in the device F0c79 60 4 2 4 Disabling the
34. e switch SW1 1 2 3 4bit Other hardware Power LED LED1 The name with bracket is the name printed on the board 50 TK 78K0 KE2C User s Manual 3 1 Layout of hardware functions P50 P53 P10 P12 CN3 J1 SW SW2 p SW4 USBVDD1 2 CN1 AVREF USB 330 OOO 0 O O 0 yp 00000 GY 50 Oriolo o o o oio 9o o 0 JQ9 o oO o 9 o CX E GIS Pu pia AOL 7 o USBvDD1 oos Ke Lach r p TITETITTTTHTTD iO PA Sh Um r i Desa U7r Dale m 123 SS 77 Al EN c dai Chie bi e Rees tor lt Input ERO eg we del Adapter gt a p_e mm o e mm mm NH p eoe c om seh 4l RoHS nor Cap mPllam egulator D US 1 Jpen DN oM External H TK T8n vc Y2 i5 ra 9 EZ Td A KZ ud eee dcm mm TECHNOLOG 20000000 TESSERA 7 i ee CN 2200000000000 LtASAAASAASAS CON ay e JP1 JP2 LED1 EVDD Yl FP1 U2 SW5 SW3 CN2 51 TK 78K0 KE2C User s Manual 3 2 Hardware Functions 3 2 1 SW3 SW4 The bit 1 4 on SW3 are for mode settings and bit 5 8 are DIP switches for general purpose ports that connected to POO PO2 P04 pins in microcontroller For the use of ID78KOR QB use following settings SW3 Bt2 ON 0 Bits ON Bt4 ON SW4 OCD side 1 OFF The microcontroller stays being reset until ID7 8KOR GB is started ON The microcontroller runs the programs stored in the flash memory as soon as it gets power supply 2 If
35. ed Fung HAM Monitor Break When Readout e ARAM Setting C Off Redraw Interval 500 Mec alt break 6 Hard break On Mouse Click Iw Break Sound Clear Register When Cancel Iw Verify Check Restore Help 3Add a global variable to watch window Right click the global variable on watch window then select RRM Setting BI Watch Add Delete Up Down Refresh start dw Break when Access to this Variable Break when Write bo this Variab Break when Read From this7afiable Clear RRM Setting 73 TK 78K0 KE2C User s Manual Click the Set then Close the RRM Setting window REM Setting Address Size Symbol Dm M e Bytes hi l Bytes 000 Restore pO l Entes OS Clear a Bytes EE Delete AA Bytes Je A A Bytes gt Hot O tes TT nei Size Total 1 Z 16 Bytes This completes the settings Note The user program momentarily breaks upon a read lt is recommended to close the memory window when you use the pseudo real time monitor function 74 TK 78K0 KE2C User s Manual 5 3 6 Display local variables Local variable window is used to display local variables By clicking the button below you can open the local variable window Unlike global variables local variables cannot be displayed when programs are running 3 Local Variable Pu E E Close 5 3
36. er 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 system language in the Regional Settings Properties tab Assembler RA78K0 and C compiler CC78KO limit the object size to 32 Kbyte 14 TK 78K0 KE2C User s Manual 1 3 Installation of USB Driver NEC Electronics Starter Kit Virtual UART USB driver must be installed on PC before you start using the TK 78K0 KE2C Please follow the instruction below to install the driver Starter Kit USB Driver must be installed on the PC If not please refer to 1 2 Installation of Development Tools to install the driver first CAUTION Do not use a USB hub for connecting TK 78K0 KE2C O 6 0 0 00 00006 ox ero room oC o T eeh g Y mu 2 Li ab o EII Regulate HOI yw d Ex AUTO Ter fon e Be Be ke Le Me ge he s tre s Ree Le LR Ga LC KKK Momo Momo Mo Momo MoM Momo RR Depending on the version of Windows OS the installation will be differed Please check your Windows version and follow the instructions Windows XP gt 1 3 1 Installation on Windows XP Windows 2000 gt 1 32 Installation on Windows 2000 After the installation go to 1 3 3 Completion of USB Driver Installation 15 TK 78K0 KE2C User s M
37. gt Watch Quick Refresh Close will be displayed EIQ while 4154 Count down start value ve TM 66 mask INTP int F clr INTP unmask Lee cw ou x wt Dan wn as wan TMMKOHA PI F PMKG ae g_start LED brink eo wn wn INTP1 mask RTC int mask RTCI int F clr RTCI int 31 25ms unmask INTP4 int F clr INTP4 unmask g start 7 start amp spining 1 INTP4 mask main c 22 main 0298 Ons A NOTE Completion of the download does not mean running the programs Therefore it does not make anything happened To run the demonstration see 2 10 Run Programs 44 TK 78K0 KE2C User s Manual 2 10 Run Programs Now you are ready to run the program Click the restart button Li or select Run on menu bar then Restart The sample program runs 27 ID78K0 QB SAMPLE KE2C prj LL View O ption Run Event Browse Jump Window Help LI EI lt gt while lt 1 gt lt g_start 8 g_led_s CROGA B8x80840 Count down start value TMMKBBB 1 TM888 mask INTP int F clr H INTP unmask LED brink while g_start gt Run the sample program INTP1 mask RTCMK 1 RIC int mask RICIIF 8 ve RICI int F clr RTCIMK 8 RICI int 31 25ms unmask PIF1 8 INTP4 int F clr PMK1 8 INTP4 unmask nares g_start A 7 start amp spining INTP4 mask
38. jectWindow UE OutPut Files Memo 5 SAMPLE_KE2C 1 Project s E SAMPLE KE2C zs LI Source Files Include Files E Project Related Files Other Files ID78K0 QB is launched For Help press F1 42 TK 78K0 KE2C User s Manual Configuration dialog opens Set the settings shown below and then click OK ID Code Enter FFFFFFFFFFFFFFFFFFFF F x20 Configuration Chip Name uPD Internal ROM RAM Internal ROM KBytes Restore Project jer x spot Intemal high speed RAM Bytes Help Internal Extend RAM r Bytes Main Clock C e System 4 00 d Peripheral Break Monitor Clock r Target Power Off C Break e System C Permit Non Break C User Not Permit Mask E TARGET RESET J INTERNALRESET Memory Mapping Memory Attribute Mapping Address Add Target D Delete Click when the confirmation dialog for downloading load module file is opened A v WE SO Do veu wank to download Load Module File 43 TK 78K0 KE2C User s Manual Download CATKZBRINSAMPLE RKE2CSa Imf object loading ID78KO QB starts and downloading the program to flash memory Cancel 2 ID78KO OB SAMPLE KE2C prj File Edit View Option Run Event Browse Jump Window Help if me e m e 2 mel BS Emir S Ola El Bl al When the download is Source main c completed the source code Search X
39. ols CC78K01 W4 00 k P SAMPLE KE2C n tt O error s and O varning s Source Files zo 4 1esANEC Electronics Tools CC78KO W4 00 r C Include Files l tomplete O error s and O warning s Project Related Files l iles NEC Electronics Tools CC78K0 W4 00 k 3 Other Files File Compare ome rid Device File Installer omplete O error s and O varning s ilesXNEC Electronics Toolsi RA 8KO0 14 011k PM Settings ilete O error s and O warning s Font iles NEC Electronics ToolsiRA78KO0YW4 01 E Customize P O error s and O varning s fol iles NEC Electronics Tools3RA7SKOW4 01 XEk Record the Key Operations sion Complete O error s and o Load the Macro File rror s O Total varning s O EOF Play Back the Macro File Register the Macro Files ES Change debugger settings 39 TK 78K0 KE2C User s Manual Check if ID78KO QB V3 20 78KO Integrated Debugger is selected on Debugger Debugger Settings Select Debugger FORO QB v3 20 780 Integrated Debugger File Mame C kProgram Files NEC Electronics Tool D 8EU QBNV3 20 Optior Debug Target Debug Target File LATE TSK SSAMPLE EE 20a lmt 4 Esecute Sumbal Iw Execute CPU Reset after Download Debug Options If you cannot select ID78K0 QB V3 20 78K0 Integrated Debugger select Project on menu bar Project settings gt Tool version settings gt Det
40. on chip debug function is prohibited F0c33 60 CHAPTER 5 OTHER HN LEHNEN 61 5i Greate a new EE 62 DZ Register ad altional Source EE 68 go ebusset dl titi 70 5 3 ef RE Ee E Of DU ir 70 5 3 2 Display source list and function MSU E 70 5 33 Set delete breakpoints 1522 e tete i i b i d tete em edite 71 33 4 Display global varlables in tein eiecit toic Ete o ee eei ceo Em cete 72 9 3 9 Display global variables while programs are running 73 5 3 0 Display loeal variable terii te eei breiter eite ete rte hr etr tete leis 715 9 97 Display memory and SER age E 715 5 4 Erase microcontroller built in flash memory eene nne nnns 76 o O OIFOHIEIaSE dI n ELM LUE o E M E Ue 80 TK 78K0 KE2C User s Manual TK 78K0 KE2C is the evaluation kit for development using 78K0 Kx2 NEC Electronics 8bit all flash microcontroller The user only needs to install the development tools and USB driver and connect the host machine with the target board to start the code development build monitoring the output and debugging code This demonstration kit uses the on chip debug feature from the microcontroller itself without emulator connection Configuration for Debugging pe PM SAMPLE KF24 pre OutPut Ps ER Find Layer View Project B i Tool Wikies Help a 04 0 80 Da a si lma t SAMPLE_RFIA SAMPLE ROA Deta Bud DECHE EECH Project Winco olx E AnP ME Program Filesi N
41. out using the debugger ID78K0 QB TK 78K0 KE2C User s Manual 1 2 Installation of Development Tools 1 2 1 Installation Package The attached CD ROM includes the development tools and documentations Users can use the installer to install those development tools and documentations 1 2 2 Installation of Development Tools D 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 2 NEC Electronics Microcomputer Development fools A Welcome to the NEC Electronics Microcomputer development tools setup program Before vau execute this installer please exit all windows programs TE FBEU KEZC T1 00 June 2070 Copyright E NEC Electronics Corporation 2010 Readme First Install Documents Sample Program Link to MEC Electronics Microcomputer Eat 2 Click button 10 TK 78K0 KE2C User s Manual 3 Tool Installer dialog box is opened Select products that you need to install as default all the products that you need to use the TK 78K0 KE2C are selected Explain area displays an explanation of the selected product To change the installation destination click 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 c
42. prm in the directory of PRM in the CD ROM Select the COM port that TK 78K0 KE2C is connected E Device Setup Standard Advance Parameter file 78F0765 prm PAM File Read Host connection Supply oscillator Y Frequency 20 00 Speed Multiply rate 11 00 Operation Mode Block sm E NL I SR Target Reset Message 18 TK 78K0 KE2C User s Manual DClick Erase button ES WriteEZ5 Fie Device View Help San EN d Ya gt Flash penning Flash Open OK Mame gt gt ParameterFile Reading Firmware Success Head ParameterFile gt gt COMMAND Device Setup PAM File Read OF Device Parameter file Mame ZE UE Version 41 00 Load file Name Date Lhksum Area Connection ta device Port COM4 Speed 115200 Range Chip Freg 20 00 Multiply 1 00 m SS wrriteEZ5 Fie Device View Help D ges gt gt COMMAND Erase Flash Blank Checking Mame 5 rm Firmware C chip erase finish Parameter file Mame ZE UE Version 41 00 Load file Name Date Chkzum Area Connection to device Fort COM4 Speed 115200 Range Chip Freg 0 00 Multiply 1 00 o 79 TK 78K0 KE2C User s Manual 9 9 Circuit diagram From following page it shows the circuit diagram of the demonstration kit 80 8zE00SOL SL JequinN 1ueuin2oq UaMOd O963 038774L junou JON 91 dda Cl ASZ Jn0L a
43. r options 2 4 1 Output1 Tab Select Output1 tab on Linker Options window and see following settings Linker Options Output Output Library Others Load Module File a Erarput File M ame w Output Symbol Information g Create Error List File e W On Chip D ebua qo iw SIZE 512 bytes W Security ID qi ID FFFFFFFFFFFFFFFFFFFF Command Line Erat oa Init g051 2 giJFFFFFFFFFFFFFFFFFFFFH pa map bell lib bclOR lib C Frogram Piles MEC Electronics Tool ACC FSR OVW DU 8k 0 s Cancel Help 34 TK 78K0 KE2C User s Manual Load Module File settings Check Output Symbol Information This enables to do source level debugging setting break points monitoring variables in watch window etc Also you can specify the load module file name On Chip Debug Option Byte Check On Chip Debug Option Byte This setting enables the on chip debugging function of the microcontroller These settings reserve the memory address area for the monitor program the flash memory area that the debugger uses for on chip debugging Address area that reserved by on chip debugging 2H 3H From 8FH 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 85H 8EH and checked if i
44. r specifying the download destination folder click the button 6 The self extraction sample program set TK78K0 exe is copied to the specified folder The folder that the TK78KO folder is made when this file is executed and the sample program is stored under the folder in addition is made 25 TK 78K0 KE2C User s Manual 1 4 2 Overview of Sample Programs The sample programs consist of following directories SAMPLE KE2C SAMPLE KE2C prw Work space file main c Source file 26 TK 78K0 KE2C User s Manual In this chapter you will experience how to use the development tools with using the sample programs The development tools are Integrated Development Environment IDE PM Integrated Debugger ID78K0 QB You will use the programs that you prepared in 1 4 Sample Programs as the sample programs for TK 78K0 KE2C You will be able to understand how to use the development tools and the concept of project files which you need for producing application programs 2 TK 78K0 KE2C User s Manual The overall steps are as follows 2 1 Start PM 29 Load Workspace 2 4 Set Linker Options 2 5 Set Compiler Options 2 6 Greate Load Module Files un Programs 2 9 Start Debugger 28 TK 78K0 KE2C User s Manual 2 1 Start PM Let s start using the development tools First start the PM Select Windows Start Menu gt Program gt
45. rect ID Code Ff603 This error occurs when the security ID stored on microcontroller built in flash memory is different from the ID code you entered at the start of debugger Security ID entry area at the start of debugger ID Cade 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 2 4 Set Linker Options Also remember the code you set for the security ID After this erase the flash memory with referring to 5 4 Erase microcontroller built in flash memory 4 2 3 The on chip debug function had been disabled in the device F0c79 This error occurs when the value at address C3H On chip debug option byte in microcontroller built in flash memory is incorrect You need to erase the flash memory Check Point 1 Check if you actually set the correct on chip debug option byte with referring to 2 4 Set Linker Options If it is not correct then set correctly Check Point 2 Erase the flash memory with referring to 5 4 Erase microcontroller built in flash memory 4 2 4 Disabling the on chip debug function is prohibited F0c33 Basically this error occurs when you start download the debugger without doing the settings described at 2 4 Set Linker Options Do the same checking processes as 4 2 3
46. rollers Name Startup File f 6 Link Directive File t Device Name 7 Setup Source Files uPD 78F0765 64 Tool Set Name 8 Select Debugger EC iGo pecie J78K0 Software Package V4 00 E Mid p CC 8K0 w4 00 4 4850 Microcontrollers RA78KO w 4 01 Only 4 6 ID78K0 0B 3 20 Debugger ID78K0 0B V3 20 78K0 Integrated Debugger C Program Files NEC Electronics ToolsD 7 8K OBNV Source Files lt Back me Cancel Click Finish 065 TK 78K0 KE2C User s Manual PM test prw OutPut File Edit Find Layer View Project Build Tool Window Help s DSHS trea zi s Iua e test test y Debug Build DH se Ee ProjectWindow Sel OutPut Files Memo Dal test 1 Project s e B cre Project test was registered Include Files Project Related Files Other Files Make file created successfully This completes workspace and project creation Additional source files can be registered at any time thereafter For details refer to 5 2 Register additional source file Next on chip debug function can be used Tool Linker Options is selected pe Pike best pre DutPut F e Ede Pind Layer Wise Project Budd RR window ek S O8 S KE Los 1 Propect e i est E Source Files Include Fira 2 Propet Relaled Fikes Other Fira Record Ehe key Oneratinns Load the Macro File Play Deck the plscro Fide Bester thee Macro
47. s device so that can chod driver 19 TK 78K0 KE2C User s Manual 3 Select Specify a location Click Found New Hardware Wizard Locate Driver Files Where do you want Windows to search for driver files Search for driver files Far the following hardware device y USB Device bes for suitable drivers in its driver database on your computer and in optional search locations that you specify Select Specify a location lick Nest IF you are searching on a floppy disk or LD DOUM drive or CO before clicking Next Click Next Optional search locations Floppy disk drives CD ROM drives v Specify a location Microsoft Windows Update Cancel 4 Select the driver directory path The path should be C YProgram Files NEC Electronics ToolsYTK driver as default installation If the installation directory is not default then select TK driver under the installation directory Click Found Mew Hardware Wizard Insert the manufacturer s Installation disk into the drive OK selected and then click OR Cancel Select the driver directory Click OK Copy manufacturer s files from JC Prograrn Files MEC Electronics Tools TK drrver sl 20 TK 78K0 KE2C User s Manual 5 Click Driver Files Search Results The wizard has finished searching Far driver files for your hardware device The wizard found a driver for the
48. s lus GE PPA3 PPA Lo T ss ss T fel Foi 3n y 0 EN ASZ 302 p LSOL ISILL EEd 9938 hy L TSi Ke EA OSOL OSIL Z Ld v0090 1X 1ZLd vio E El z T LHOL 9L d 80090 M1X3 2X 221d ae NN Std oana 201 Siu SN 9 noawi3 z 90XH eLd 13s3u ao riu 9QXL L d OdLNI 0ZLd EN m aa asn y Kap E d OLOS ZLd 0001L 00d M uen F PI OLIS LLd 00OL OLOLL LOd pes I gg ODIOS 01d LALNI OEd ro z z 139381 i Zn EL asn 3 5 eld aa a jni o eLo aaaasn aa a 300 0020ATFLNS z asnoaxu YOO Di 9 BE ven fej 8H adna aa asn adA3 82
49. stor refer to 78K0 Kx2C User s Manual lt U19822 gt SW1 SW2 Port Port function P120 PIZ INTPEXLVI o O P30 INTP I 3 2 3 SW5 RESET SW SW5 is the reset switch You can reset the microcontroller by pressing this switch 3 2 4 JP I JP1 is the jumper short pin to select power supply 1 2 Short Use USB power supply from the USB1 connector 2 3 Short Use CN3 J connector power supply 3 2 5 JP2 JP2 is the jumper short pin for CPU power supply Use regulator output to the internal power open Separate regulator output to the internal power You can use other power supply to the internal power 3 2 6 LED1 POWER LED1 is the POWER LED It is lighted when it gets power supply 54 TK 78K0 KE2C User s Manual 3 2 7 U2 7seg LED U2 is general purpose 7SegLED LED is lighted when each port outputs Low SegLED segment connection U2 P50 P11 Pol P12 P10 P52 P53 ei The figure of 0 9 can be displayed by writing the following values in P1 P5 register Example of displayed figure and set data 0 oro OFC 6 ors ore 8 oro ore 9 ore on 3 2 8 FP1 The connecter for MINICUBE2 The connecter was not installed HONDA TSUSHIN KOGYO CO LTD FFC 16BMEP 1 3 2 9 CN1 CN2 The connecter for CN1 CN2 expansion connection The connecter was not installed HIROSE ELECTRIC CO LTD HIF 3H 50DA 2 54DSA hh TK 78K0 KE2C User s
50. t is the same as the code entered in Linker options dialog when the debugger is launched The debugger will not be launched when the security ID is unmatched By using this function you can secure the programs from leaks If you do not need to set the security it is recommended to set the security ID FFFFFFFFFFFFFFFFFFFF as this is the initial code If you forget about the security ID stored in the address of 85H 8EH or if you set wrong on chip debug option byte you will not be able to use the debugger ID78K0 QB In this case you can erase 78KO built in flash memory with WriteEZ5 to connect with ID78KO QB For details refer to 5 4 Erase microcontroller built in flash memory 35 TK 78K0 KE2C User s Manual 2 5 Set Compiler Options The compiler options have been set by project file However because some compiler options are useful following two settings are covered specifically in this section Enable C comments Select Tools on menu bar then Compiler options 2 5 1 Extend Tab Select Extend tab and check Enable C Comment This setting allow you to use the C comment using JA It is useful feature when developing code Compiler Options Preprocessor Memory Model Data Assign Optimize Debug Output Extend Others Startup Routine Change Source Regulation Kanji Code of Source Disable Extensions ANSI Standard Onlyl za re SJIS zs Treat int and short
51. third parties arising from the use of these circuits software and information CAUTION Do not give any physical damage to this equipment such as dropping Do not superimpose voltage to this equipment Do not use this equipment with the temperature below 0 C or over 40 C Make sure the USB cables are properly connected Do not bend or stretch the USB cables Keep this equipment away from water Take extra care to electric shock This equipment should be handled like a CMOS semiconductor device The user must take all precautions to avoid build up of static electricity while working with this equipment All test and measurement tool including the workbench must be grounded The user operator must be grounded using the wrist strap The connectors and or device pins should not be touched with bare hands TK 78K0 KE2C User s Manual Contents CEDAPTEERAPRERBARATIOBN EE 7 1 1 Development Tools SOPA F iia 8 1 2 Installauom ot Development Tool Set A aa 10 ZA Installation Packard 10 1 2 2 Installation of Development Tol ia 10 1 9 Installation ot USB DAVE E 15 1 9 J Installation on WIHOdOWS EE 16 L3z Installation or Windows 2000 ER 19 3 3 Gompletion of USB Driver Instala Mirando 22 tA Sample Prostatitis 23 k4 Preparation f Sample BEOSFAF S nodo tic ii 23 1 42 Overview ok Sample ee LEE 26 ie ee eee aN Ce idein mno lianas 27 e stare EEN 29 22 Wat IS NAAA AA 30 2 3 Load Workspace project ou
52. tronics ToolsYTK driver as default installation If the installation directory is not default then select TK driver under the installation directory Click Found New Hardware Wizard Please choose your search and installation options e Search for the best driver in these locations Use the check boxes below to limit or expand the deta paths and removable media The best driver Found will Select the driver directory Search removable media floppy CD ROM Include this location in the search C Program Files WEC Electronics Tools TK drtve Don t search will choose the driver to install Choose this option to select the device driver fram a list Windows does y m the driver you choose will be the best match for your hardware Click Next d MET 4 If the following dialog is opened click Hardware Installation The software vou are installing for this hardware MEL Electronics Starter Kit Virtual UART has not passed Windows Logo testing to verify its compatibility with Windows P Tell me why this testing ls important Continuing your installation of this software may impair or destabilize the correct operation o zuztem either immediately ar in the future j a i Click Continue Anyway recommends that you stop this inst contact the hardware vendor for so passed Windows Logo testing Continue Anyway STOP Installation 17 TK 78K0 KE2C User s Manual 6
53. ut the workspace and the project Device Name uPD78F0765 64 Circ SE Help Click button A 02011 CATE Fak Ostest This folder cannot be found Do pon wish to create iE Click button New WorkSpace Step 2 9 Select Tools Tool Set 1 Workspace Information Selected 1 78K Software Package MA 00 Enaglish Version v gt gt 2 Select Tools Tool Versions Tool Version CC78KO 144 00 SK78K0 143 00 BS78KO v2 00 7 Setup Source Files 8 Select Debugger 3 Confirmation 4 850 Microcontrollers Only 4 6 Iw Select only Installed Tools HENCE Please select the Tools from NEC Electronics to be used The following tools have been excluded from selection because they are not installed RA78KD ID78K0 NS ID78KO QB SM78K0 SM for 78KO corcel ap Click Detail Setting button 63 TK 78K0 KE2C User s Manual Tool Version Detail Setting C mm Unused wilinused Unused w Undsen Set the version of tools as wA A mo T follows CC78K0 W4 00 RA78K0 W4 01 ID78K0 QB V3 20 78KO Software Package V4 00 English Version New WorkSpace Step 2 9 Select Tools Tool Set 1 Workspace Information Changedl SelectedO1 J78K0 Software Package Y4 00 Enalish V gt gt 2 Select Tools Save let Tool Versions 1 St Tod Version CC78K0 w4 00 RA78KO 44 01 SK78K0 Unused 7 Setup Source Files ID78K0 QB 3 20 8 Select Debugger BS78K0 Unused
54. ware of TK 78K0 KE2C Troubleshooting Describe how to solve troubles you may face such as errors when starting the integrated debugger ID78K0 QB Other Information Introduce other information such as how to create a new workspace project on integrated development environment PM how to register additional source file and some useful tips of the integrated debugger The circuit diagrams of demonstration kit are included in this chapter This manual is intended for development engineers who wish to become familiar with the development tools for the 78KO0 It is assumed that the readers have been familiar with basics of microcontrollers C and Assembler languages and the Windows operating system This manual is intended to give users an understanding of the features hardware configurations development tools for the 78K0 TK 78K0 KE2C User s Manual This chapter describes following topics Overview and installation of development tools Installation of development tools Overview and preparation of sample programs Users can experience the development flow such as coding build debugging and test by using the development tools bundled with TK 78K0 KE2C TK 78K0 KE2C User s Manual 1 1 Development Tools Software Q Device file DF780765 V2 21 A device file contains device specific information So users need a device file to use the development tools Q Integrated Development Environment IDE
55. you use ID78K0 GB it uses P31 and P32 for communicating with host machine Therefore you cannot use P31 and P32 To run the programs stored in built in flash memory without using ID78KO QB use following settings and re supply USB power You can use P13 TXD6 P14 RXD6 for multipurpose serial port via u PD78F0730 You can use the On chip debug function with connecting a MINICUBE2 Connecter was not mounted SW3 SW4 UART side 2 2 Select position when P13 P14 are used on the expansion connector 52 TK 78K0 KE2C User s Manual Q Please change to the following settings when writing it in the flash memory with built in CPU by using Write EZ5 SW3 pi ON Bit2 ON SW4 side Q Bit5 8 of SW3 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 PUO with built in CPU when using it For details about settings for microcontroller built in pull up option resistor refer to 78K0 Kx2C User s Manual lt U19822 gt SW3 53 TK 78K0 KE2C User s Manual 3 2 2 SW1 SW2 SW1 SW2 are the tact switch When you push the switch it becomes Low and when you release the switch it becomes Open Before using this you need to set the microcontroller built in pull up option resistor PU3 PU12 to ON For details about settings for microcontroller built in pull up option resi
Download Pdf Manuals
Related Search
Related Contents
Informativo Comercia.. Istituto Nazionale di Fisica Nucleare Sez di Ferrara User`s Manual GRAND IP VIDEO SERVER PRO Samsung ND220HHXEA Instrukcja obsługi SECTION 6 TROUBLE-SHOOTING - Sea SERIE 600 TemporisTM 10 Canon HF S21 Camcorder Accessories User Manual Aquatic CHESAPEAKE ai7148R User's Manual Copyright © All rights reserved.
Failed to retrieve file