Home
User`s Manual TK
Contents
1. sn 91 lt lt ax eld lt lt Qu c Ld t 1587 JjdHAV 5 vid 024 2 anro 3o E 82951 Tun o Q gSINLOE VT1 142 8419 JO MEE ar 0r L 2 W Lo i SL S 0 91 8____ A 2 01 L c 6L 2 anro gt 40 17 6 0 459 a 2 EL zods zod E oy rs 7 l d gt s 194 y As a Sd 4 E rh 10 Pp eed 228 01 E Lu gp 6L 0247 SS aw 87 8 ul u 70 u 70 uv 8 1 5 DOP POT DO Of 9 OF NY Od OF BY Co 2 CO Co BY Cop A o m o VS dvS 2 Vd0S HEsIH Zd 924 d Zed Otd ltd 919 0619 214 Eld 2 Zld Old 199 099 Sd aNd 89 10 6 14 1 488 2 209 2 21 91 J3HAV 83 TK 78KOR KE3L USB User
2. 16 132 Installation on Windows 2000 ticdu tein i oti detti oti oti 19 i 3 6 Gompletion of USB Driver Install ation d endi 22 Sample AIS real uses eben 23 14 1 Breparation of Sample Programmis serieuse naan a a a iaaa 23 1 4 2 Overview of Sample 26 CAPE eZ RIE INGE Seriean a E EA 27 PAN 29 22 UAE gt 30 2 3 Load Workspace project essent tenete tette te trt ttes tet tss ta tates tattoos sa sss 32 OPLO ess nG So S I I IE 34 241 34 252 HOMIE Ds 36 Ye Hey oi GC ODIO ORS 3 251 Extend EORR 37 2 5 2 Startup Routine 38 2 0 Creare Load Module Piles tette e arbe tion tite tento iter deeper 39 2 JG heck Debisger a i idee 41 2 o oheck Board 43 2 9 Start Debugger ID78KOR QBJ
3. ZN p EN ZN E 40089 490001 5 190081 HO ovo ord E J4dooor 49000 290001 340001 E vL i lt LSH 3903209 LONTPZNS sin Led LAN 044 478 ZED 969 Seo veo m a WEZENNT ue i LTZ i bd 31002 190022 LED i p 829 Ne a 188 XOGFLOLOATEZLNS e 044 lt 9 NI 85 TK 78KOR KE3L USB User Manual 97 008 91 51 1equinN 1ueuinooq M3MOd 880 5 0 vy gt LdAWVE O44 dajdepy 2V z 85 6 1 RH 059 AGZ 4N0L L 2 F 180 LNOA NIA W Zin 8 5 1 OQI E D er 1 2 069 10 0 059 ENO 4 L 8 9 ld3WvE 944
4. sizeof while Cusbf78k r_ep_status C_INT1 gt t DEV o 8 data lt sizeof keycode keydatatt if EXCLAMATION_KEY lt keydata A_KEY i ad gt main c 99 main 00008 Dus 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 2 46 TK 78KOR KE3L USB User Manual 2 10 Run Programs Now you are ready to run the program Click the restart button gt or select on menu bar then Restart The sample program runs 2 10 78 KORUSB_HID prj DEX lt void Y UINT8 keycode DATA LENGTH 1 UINT8 keydata fi KEV init lt B sizeof lt keycode gt gt Key Data ushbf 78k r_keytouch_flg SU OFF Key Flag Cle while 1 gt lt if lt usbf78k r keytouch flg F_SW_ON gt lt amp x 1 gt lt SW2 UP while P amp x 1 gt x gt lt ae SW2 OFF WAIT Run the sample program keycode KEY SCAN_CODE while usbf 78kBr statusct INT1 gt t DEU O 78k r_data_send keycode sizeof lt keycode memset Ckeycode sizeof Ckeycode gt gt while Cusbf 7 8k r_ep_status C_INT1 gt
5. seen tette te tette sete snot 44 ZIO RONPrO BI AINA 47 2 1 49 top FORE AIS 49 2 12 Close Debugger 1 0 78 2 2 50 2 19 Quit opt ORE DOR t 51 52 31 Layout f hardware eni dei CH Stash eae 53 9 2 avout Of SOlGer SnOrl Dad and test eset cence ete rens 53 Jo OPIS es 54 TE 54 re deo 55 959 9NSXRESETISW 55 9 56 56 RP UN TA 56 TK 78KOR KE3L USB User Manual SES NEU LL een 56 33 POWER n 57 erteilt 57 SAIO ONT TRUE 58 lt gt 58 CONUAT
6. Select Specify a location lick Nest IF you searching on floppy disk or drive before clicking Click Next Optional search locations Floppy disk drives CD ROM drives Specify a location Microsoft Windows Update Cancel 4 Select the driver directory path The path should be C Program Files NEC Electronics ToolsYTK driver as default installation If the installation directory is not default then select under the installation directory Click Found Hardware Wizard Insert the manufacturer s installation disk into the drive selected and then click Cancel Select the driver directory Click manufacturer s files from JC Prograrn Electronics Tools TK drrver 20 TK 78KOR KE3L USB User Manual 5 Click Driver Files Search Results The wizard has finished searching Far driver files for your hardware device The wizard found driver for the following device y USB Device Windows found a driver for this device install the driver Windows found click Next files nec electronics Eaols tk drreersmabzsall inf Click Next lt 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
7. aa asn 85 098 gsn snqeq JeMog gsn 86
8. 58 P RN 58 mE 58 OU PDA M 58 UN iu be 58 59 60 4 1 If you cannot find USB driver when you connect to the 60 4 2 Error when you start the 60 4 2 1 not communicate with Emulator F0100 or 0109 61 4 2 2 Incorrect ID Code 603 2 2 2 62 4 2 3 The on chip debug function had been disabled in the device F0c79 62 4 2 4 Disabling the on chip debug function is prohibited 0 33 62 dp apr 63 new WOES AC 64 92 REpiSter additional sorce TIIe oen Le ee riae 69 310 ELLE 71 5 3 1 Change display of buttons 71
9. KORUSB_HID C Program Files NEC Electronics Tools CC78KOR 02 12 Compilation complete 0 error s and 0 warnind s C Program Files NEC Electronics Tools CC78KOR 2 124 Compilation complete 0 error s and 0 warnind s Source Files C Program Files NEC Electronics Tools CC78KOR 02 123 w Include Files Compilation complete 0 error s and 0 warning s Project Related Files C Program Files NEC Electronics Tools RA7SKOR W1 33 Other Files Link complete 0 error s and 0 warning s fo C Program Files NEC Electronics ToolsRA7S8EOR Object Conversion Complete 0 erre Y Build Total error s 0 Totg ID78KOR QB is launched For Help press F1 44 TK 78KOR KE3L USB User s Manual Configuration dialog is opened Please choose 0 in the Target Device Connection Enter FFFFFFFFFFFFFFFFFFFF F x 20 in ID Code then click OK Canfiguration Chip Monitor Clock PD os System Internal Memory ROM Bytes D ataFlash KButes Desi Help Main Clock C External MHz Sub Clock Perpheral External None KHz Target Device Code C E Peripheral Break Flash Pragramming Category Timer Permit Categor Serial etc Permit Wide Voltage Flash Re
10. lt gt MEL Electronics Starter Kit Virtual LAAT Windows has Finished installing the software for this device Click Finish To close this wizard click Finish Com 7 Goto 1 3 3 Completion of USB Driver Installation 21 TK 78KOR KE3L USB 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 Computer Management Action View Window Help le e mm 25 0 a Computer See Disk drives Display adapters 5 DVDICD ROM drives Human Interface Devices ic ATA ATAPI controllers lt lt Keyboards Mice and other pointing devices Find NEC Electronics Starter Kit 3 Monitors Virtual UART COMx Network adapters Ports amp LPT Pork COMI Computer Local ih System Tools Event viewer iJ Shared Folders Performance Logs and Alerts Device Manager Storage Removable Storage Disk Defragmenter Disk Management as Services and Applications gt Sound video and game controllers M System devices Universal Serial Bus controllers The screen abo
11. 3 3 3 SW3 RESET SW This is the reset switch You can reset the microcontroller by pressing this switch 55 TK 78KOR KE3L USB User Manual 3 3 4 SW5 Filter SW5 is the slide switch to select use not use of the Filter LMV324M When it sets to OFF it does not use the Filter and it inputs sound signals from microcontroller to AMP Microcontr O Fi Iter Audio signal 3 3 9 JP1 JP1 is the jumper switch pin for connecting the microcontroller and the filter Please set the jumper switch pin short circuit Please refer to the circuit diagram for further details 3 3 6 JP2 JP3 JP2 JP3 are jumper switch pin for selecting the power supply to the CPU 904525020200 1 2 Short 1 2 Short USB power supply from USB2 connecter 2 3 Short 1 2 Short USB power supply from USB1 connecter 2 3 Short adapter power supply from connecter 3 3 7 JP4 JP4 is the jumper switch pin for supplying the power to the audio circuit Please set the jumper switch pin short circuit Please refer to the circuit diagram for further details 56 TK 78KOR KE3L USB User Manual 3 3 8 LED1 POWER This is the POWER LED It is lighted when it gets power supply You can turn off the LED by setting the bit4 OFF SW1 3 3 9 U1 U2 7segLED U2 are 7 By setting the 7segLED output data in 20 23 and setting P50 P53 from Low to High th
12. s Manual 29700501 51 JequinN S8Sf1 D 33 H098Z L YMS asngaxy lt lt ua 8Sn9axr 009225888 497 1 JN 3nge 1 4m 2nqaq 1 9510 lt gt p ess 9L in E 9 d 6NdL EINE X91 Siu 001 8 viu 880 iasad LMS aun f M endLOT 0 LOGLODEDATPLNS v 8Snedxr 2 8 H 880 SHO oaa lt lt 9 2 1 8 f joo 7001 anro vio p NOASPLZONIVZNS 8 L HN veo ezo aa asn 7 8 aa asn 029 aa asn OWOEZ048Z0dN 9 9 pis L 1 Lj N SSA3 ISOL IGLL EEd 0SOL OSLL Z Ld LHOL 9Ld 9QXu vld 9QXL L d OLOS cLd oO 10 OLIS LLd Q 0LMOS OL d 512211 PPA SSA 9584 g0dq9ooP rioxa ex eetd 0QqWT14 13884 IA TXS 0dLNI OZ Ld 0001L 00d OOOL OLOIL LOd Ld LNI OEd 3001 M S d lt L
13. you wish to create iE Click button New WorkSpace Step 2 9 Select Tools Tool Set 1 Workspace Information eRe gt gt 2 Select Tools Tool Versions Tool Version 7 Setup Source Files 8 Select Debugger 3 Confirmation 8 850 Microcontrollers Only 4 6 Select only Installed Tools Detail Setting Please select the Tools from NEC Electronics to be used The following tools have been excluded from selection because they are not installed RA78KDR 78 SM for 8 Click Detail Setting button 65 TK 78KOR KE3L USB User s Manual Tool Yersion Detail Setting Set the version of tools as ceo Rem ____ Ys follows Urei Unused tweed C aws D CC78KOR W2 12 78 1 33 ID78KOR QB V3 60 8 Software Package V1 10 Enalish Version 78KOR Software Package 1 00 English Version ancel Help Select tools as above screenshot then click New WorkSpace Step 2 9 Select Tools Tool Set 1 Workspace Information Changed Selected01 Software Package V1 10 Enalish 2 Select Tools Save Jelet Tool Version egister Mode H CC78KOR W2 12 RA 8KOR W1 33 ID78KOR GB V3 60 7 Setup Source Files 8 Select Debugger Tool Versions 3 Confirmation 1 850 Microcontrollers Onl
14. 1 un Load file Mame Chksum Area Connection to device Port COMI Speed 175200bps Range Chip Intermal 0SC Multiply 1 00 9 If Flash EEPROM has been erased successfully chip erase finish will be displayed as shown below 8 WriteEZ5 Device View Help gt gt COMMAND Erase Device Flash Blank Checking Mame D 2781026 TRE Firmware 1 00 quee Parameter file Mame oF 1026 Version W700 Load file Date Chksum Area Connection to device Pot Speed 175200bps Range Chip Intermal 0SC Multiply 1 00 m 80 TK 78KOR KE3L USB User Manual X ID Code The ID Code is a mechanism to prevent an unwelcome third party from accessing your source code by initiating the debugger Therefore it is recommended to modify the ID Code from the default value to secure your original source code However once you modify it then if you forget the security ID or mistakenly over write OxOO value to the address of the debugger ID78KOR 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 module file 81 TK 78KOR KE3L USB User Manual 5 5 Circuit diagram From following page it shows the circuit diagram of the demonstration
15. Debug Serial communication Expansion connector 50Pin socket x2 pad only CN1 CN2 Connecter for MINICUBE2 FP1 5V USB or AC adapter Input output for operation check use he name with bracket 15 4 ways center push switch SW2 Dip switch SW1 JSeg LED 01 02 Reset switch SW3 the name printed on the board 52 TK 78KOR KE3L USB User s Manual 3 1 Layout of hardware functions J1 SW5 JP4 01 02 2 ON1 CN3 anum Cla ni 26 Wil JOO 1 J ELM Bitte Tn p USB2 LEDI SWi 504 SW3 FP1 SW2 0581 3 2 Layout of solder short pad and test AVREF EVDD P111 P110 P16 RIGHT CO a 50 53 P20 P23 P120 1 53 TK 78KOR KE3L USB User Manual 3 3 Hardware Functions 3 3 1 SW1 SW4 The bit 1 3 on SW1 are for debug mode settings bit 4 5 are for mode settings and bit 6 8 are DIP switches connected to 41 42 17 pins in microcontroller For the use of ID78KOR QB use following settings SWl1 ON OFF Bit 2 _____ ___ ON _____ SW4 Debug Writer Side The microcontroller runs the programs stored in the flash memory as soon as it gets power supply OFF The microcontroller stays being reset until ID78KOR QB is started To run the programs store
16. Glear Trace Emory Before Run Break Sound Verify Check Cancel Restore Help This completes the settings Note 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 memory as well t is recommended to close the memory window when you use the pseudo real time monitor function 74 TK 78KOR KE3L USB 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 Local Variable iL _ 5 3 7 Display memory and SFR contents By clicking the button below you can open the memory window Memory Search no Refresh 3 4 45 6 2 9 3 B 0017 p co eo 75 TK 78KOR KE3L USB User Manual 5 4 Erase microcontroller built in flash memory If the Debug Option Byte is set to Do not erase data of flash memory in case of failures in enabling on chip debugging if you forget the security ID you need to erase the flash memory completely To erase the flash memory please fol
17. INT15 DEU O usbf 78k r_data_send keycode sizeof memset B lt 252 while Cusbf78k r_ep_status C_INT1 gt t DEV o us bf 78k r_data_send keycode sizeof keycode keydatatt if ERCLRMATION KEV lt keydata A_KEY m n Stop the program 2 ID 8KOR OB KORUSB_HID prj File Edit View Option Run Event Browse Jump Window Help n 2 e OL aeui 2 Source main c Search il e gt Watch Quick Refresh Close a maint void gt UINTS keycode REPORT _DATA_LENGTH 1 UINT8 keydata fi KEV init lt lt 252 Key Data usbf 78k r_keytouch_flg SU OFF Key Flag Cle while 1 gt lt lt 8 Bx 1 gt Bx B gt SW2 UP x 1 lt lt 8 x 1 gt 542 OFF WAIT gt keucode KEV1 SCAN CODE while Xusbf 78k r status INT1 gt t DEU O usbf78kB8r data lt sizeof keycode lt B sizeof lt keycode while Cusbf78k r_ep_status C_INT1 gt t DEV o usbf78kB8r data lt sizeof keycode keydatatt if keydata Vinee lt keydata A_KEY 2 main cat110 main 00407 245 244 35 Manual Break W
18. languages and the Windows operating system This manual is intended to give users an understanding of the features hardware configurations development tools for the 78KOR TK 78KOR KE3L USB User 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 78KOR KE3L USB TK 78KOR KE3L USB User Manual 1 1 Development Tools Software Device file DF781026 V1 00 A device file contains device specific information So users need a device file to use the development tools Integrated Development Environment IDE PM V6 31 The IDE works on Windows operation system Users can develop a system efficiently by using the editor with idea processor function compiler and debugger C Compiler CC78KOR W2 12 code size limited version C compiler for the 78KOR microcontrollers The object code size is limited to 64 Kbyte This compiles C code for 78KOR and ANSI C code program into assembler code This produces object code and linker Assembler RA78KOR W1 33 code size limited version Assembler for the 78KOR microcontrollers The object code size 15 limited to 64 Kbyte This convert the assembler code for 78KOR into object program The object progr
19. 8F1026 64 Tool Set Name 8 Select Debugger eee elected01 78K0R Software Package 1 10 Md p w2 12 8 850 Microcontrollers w1 33 ID78KOR QB V3 60 Only 4 6 er ID78KOR QB v3 50 78KOR Integrated Debugger C Program Files NEC Electronics 9 Source Files 7 Setup Source Files Debugg Cancel Click 67 TK 78KOR KE3L USB User Manual PM test prw OutPut File Edit Find Layer View Project Build Tool Window Help i lmi ProjectWindow T Jex Files test 1 5 test C Source Files 3 Include Files 3 T 1 Project Related Files Proj ect test 5 registered 7 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 6 2 Register additional source file Also you need to do the settings for on chip debug Please refer to 2 4 Set Linker Options 2 5 Set Compiler Options and 2 7 Check Debugger Settings 68 TK 78KOR KE3L USB User 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 with source file already regi
20. 8KOR KE3L USB User Manual 2 1 Start PM Let s start using the development tools First start the PM Select Windows Start Menu gt Program gt NEC Electronics Tools gt 6 31 PM No Workspace OutPut File Edit Find Layer View Project Build Tool Window Help SR Bele ale gt 9 ale 2 ProjectWindow output Files 5 No Workspace For Help press 1 20 TK 78KOR KE3L USB User 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 PM Workspace OutPut File Edit Find Layer View Project Build Tool Window Help amp Mp ProjectWindow Sele OutPut Files Memo ig No Workspace Far Help press F 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 gt For details regarding menu bars and tool bars refer to Help menu in on menu bar then Help 30 TK 78KOR KE3L USB User s Manual What is a project A projec
21. 8KOR KE3L USB User Manual 3 4 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 Before Solder short pad name Connection Shipment P120 is connected to USB1 bus power detecting P120 Short i EVDD is separated from VDD P110 and P111 are connected to 7Segment LED P110 P111 Short data latch circuit You can use P110 and P111 for multipurpose IO P20 P23 These are connected to Segment LED data latch circuit You can use the ports for multipurpose 10 External speaker output connecter J is connected as stereo connecter Connection for the monaural connecter Note All ground signals are each connected 50 TK 78KOR KE3L USB 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 If not install the driver Check Point 3 Check if the settings of switches on the kit are correct with referring to 1 3 Installation of USB Driver Check Point 4 If above 3 check points are confirme
22. 9 9 2 Display source list and function 71 5 3 3 Set delete breakpoints seen testes tren 12 5 9 4 Display global variables teret eerte tenerte 73 5 3 5 Display global variables while programs 74 9 9 Display local p MM 75 5 3 7 Display memory and SFR 75 5 4 Erase microcontroller built in flash 00 76 S IPOD dI Ea xL 82 TK 78KOR KE3L USB User s Manual TK 78KOR KE3L USB is the evaluation kit for development with sound systems using 78KOR KE3 L NEC Electronics 16bit 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 LL 00106 Break Configuration for Debugging RTD AORN 25940 970 Al 5 m Alel 25 Oe 1 RET m MNA GO E
23. E3 L U19878E 36 TK 78KOR KE3L USB User 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 Use multiplier and divider 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 It is useful feature when developing code Compiler Options Preprocessor Memory Model Data Assign Optimize Debug Output Extend Others Startup Routine Assign Change Source Regulation Disable Este Code of Source Slot Expand Argument and Return V alue zb SIS 2s t EUCT ze t Mene zn Command Line Options pee zp Cancel Help 37 TK 78KOR KE3L USB User s Manual 2 5 2 Startup Routine Tab Select Startup Routine tab and check Using Library and Using Multiplier 78KOR KE3 L has feature of multiplier to increase those calculation speed Compiler Options Preprocessor Memory Model Data Assign Optimize Debug Output Extend Others Startup Routine Assign Using Startup Routine Using Fixed Area of Standard Library i processes of far area Select Object Marmal Boot CC
24. Em PSOL MP3INO anro E 9 4oads2LOLOATPZNS anyo anto ed S0S Od 199 8 7709 37770 1 zasn n zm 0 4127 4D 6 912 8 lc 2 0 64 0 19142150 5 MOL E 9 noaw14 2 XOL 9 L aa asn O 6 vndL 1204 0962 1 5 v 001 5 O 5 2 Zee aen 8 dos EMS 6 18588 2 T MS 1453 anyo 912 aa asn 94 3 1 c38n9INIMW VSQvS Z Vd91 OJ 4IH pews lt 19538 1 Ord 13635 84 659 00501 51 JequinN 1 0 490 SVD ININS98VIA 1 2 6 esues TK 78KOR KE3L USB User s Manual 9 0060 2059 4100 44345 9ru m ZN N 39002 6 YOL 820 158 390001 49000 gein SMS ES 5 3o 9 1 or WPZENNT 2 LEH 00 2225555 140022 620 V 229 920 MOL AZL WVeENNT ssed g 80 ulA E01 401d3 910 LHA nae eun oA
25. End user code Do not edit comment generated her 6 V Start adding user code Do not edit comment generated her End user code adding not edit comment generated TK 78KOR KE3L USB User 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 ID78KOR QB with using sample programs Hardware Specifications Explain the hardware of TK 78KOR KE3L USB Troubleshooting Describe how to solve troubles you may face such as errors when starting the integrated debugger ID78KOR 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 78KOR It is assumed that the readers have been familiar with basics of microcontrollers C and Assembler
26. Help B lt lt Ceo 5 Save As Print Preview Print Ctrl P Exit Open an existing workspace Open Workspace Look in project amp t HID prev File name KORUSB_HID prw Files of type Workspace pru Cancel Help Select KORUSB HID prw then click 32 TK 78KOR KE3L USB User Manual Workspace name KORUSB HID prw PM KORUSB_HID prw OutPut Load the workspace file File Edit Find Layer View Project Build Tool Window Help KORU SB HID prw Da 5 KORUSB_HID KORUSB_HID Build Se ProjectWindow Sel OutPut Files Memo f KORUSB HID 1 Projects Project group 89 KORUSB Include Files Project Related Files 3 Files For Help press 1 The workspace file KORUSB HID prw contains one project called KORUSB You will use this project KORUSB CAUTION Please ignore when you get a prompt saying could not be found This may occurred when the installation directory is not a default 33 TK 78KOR KE3L USB User 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 f
27. KOR KE3L USB 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 78KOR KE3L USB 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 can find the tools by selecting Start Menu gt Programs gt NEC Electronics Tools A Installer DeviceFile Install 81026 v1 00 Search Tool Install Tools Get New Product Size Software Wa 12 1 2 12 Documents 14 57 BKB 310 344KB 3 10 Documents 2 HATSK R 1 33 8 4 1 33 Documents 11 812KB VB 31 17 458KB Ph VB 30 Documents Install E plain Drive Available Space 30 365 044 B Destination Required Space C Program Electronics Tools Browse 113 57 4KB 4 Click when Install comfirmation dialog box is opened INS TALL Install the Tools and 11 TK 78KOR KE3L USB User s Manual 5 Read software license agreement
28. L an Sample Programs Welcome to TE S8K E EESLTUSB world The purpose of sample programs 15 to experience TR SKOR KES3L T USB sample programs consist of the following items o SEKUR USB HID HID Class Sample Program Sample Driver USB CDC CDC Class Sample Program Sample Driver Click the HID Class sample program CDC Class sample program link and install the sample programs USB HID Class Driver pplifation note USB HID Class Driver Application note Reter to the user s manual about u age Done Computer 3 Click the HID Class sample program CDC Class sample program link the following download confimation window appears File Download Security Warning Do you want to run save this file Type Application 64 0 From CS 4QMPLE_E n or save this software Vv hat s the risk 4 Click the Save butten 24 TK 78KOR KE3L USB User Manual Save in Se Local Disk Documents and Settings Program Files Recent LjSAMPLE Documents TK 78KOR_KESL U5B6 1 00 WINDOWS Documents Computer File name Network save as Application 5 After specifying the download destination folder click the button 6 The self extraction sample program set TK78KOR exe is copied to the speci
29. SB cable 9 9 0 6 9 919 9 9 9 9 6 9 9 00000600600 mu P t 7Seak Select Windows Start Menu gt Program gt Accessories gt Notepad The alphabet is entered by SW2 operation to the up side and pushing the SW2 starts the new paragraph as follows OOO dX 20000 CICER OEC terre f i Untitled Notepad Format View Help abcdetu abc You could confirm the sample program is working Q For more information about the functions that are used in those sample program see USB HID Human Interface Device Class Driver application note 48 TK 78KOR KE3L USB User Manual 2 11 Stop Programs Now you are going to stop the program Click the stop button select Run on menu bar then Stop 25 ID 8KOR OB6 KORUSB_HID prj dit View Option Run Event Browse Jump Window Help UINT8 keycode REPORT_DATA_LENGTH 1 UINT8 keydata fi KEV init lt lt 252 Key Data usbf78k r keytouch 14 SU OFF Key Flag Cle while 1 gt lt if lt usbf78k r keytouch flg F SU ON gt lt if CP amp 2 G x B gt SW2 UP 1 lt lt 7 amp x 1 gt x gt lt m 5 2 OFF WAIT keycode KEV1 SCRN CODE while amp usbf 78k r
30. Startup Routine Using Library Using Floating Point in scant Using MultiplerDivider Library lib elCrm lib clrrf lib Command Line Options pee zp Cancel Help 38 TK 78KOR KE3L USB 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 15 called build Click the build button select Build on menu bar then Build KORUSB_HID prw OutPut File Edit Find Layer View Project Build Tool Window Help SRA Ad 181 KORUSB_HID KORUSB_HID Debug Build 3 ProjectWindow JE OutPut Files Memo qe KORUSB 1 Project s KORUSB_HID J Source Files Include Files 1 Project Related Files Other Files Build process is executed For Help press F1 21 4 i KORUSB_HID prw OutPut Tool Window Help eoe _______ 9 118 KORUSB KORUSB_HID Debug Build J RHA BE ProjectWindow qu eun C Program Files NEC Electronics ToolsXCC78KO0RMW2 12Y Compilation complete D error s and 0 KORUSB_HID 1 Project s C Program Files NEC Electronics Tools CC78KOR W2 12 KORUSB_HID Compilation complete 0 error s and 0 warning LQ Sou
31. Users Manual TK 78KOR KE3L USB Date published March 2010 Rev 2 00 TESSERA TECHNOLOGY INC 2010 Printed in Japan TK 78KOR KE3L USB User 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 c
32. Yes this time only CO now and every time connect a device not this time Click Next Click Next to continue 2 Select Install from a list or specific location and click Found New Hardware Wizard This wizard helps install software Far USB Device Select Install from a list or specific If your hardware came with an installation CD location lt nr floppy disk insert it now What vou want the wizard to do Install the software automatically Recormpendec Install from list or specific location Adva Click Next Click Next to continue 16 TK 78KOR KE3L USB 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 Electronics 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 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
33. am will be used for debugger 78KOR Integrated Debugger ID78KOR QB V3 60 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 50 Starter Kit USB Driver This is a software driver for PC to access to the USB interface of the kit HID Class Sample Program USB Human Interface Device Class Sample Driver The 78KOR KE3 L is detected as the HID device This sample program behaves as a keyboard And it is used in chapter 2 Please refer to the USB HID Human Interface Device Class Driver application note for further details Class Sample Program USB Communication Device Class Sample Driver The 78KOR KE3 L is detected as the CDC device This sample program behaves as a COM port Please refer to the USB CDC Communication Device Class Driver application note for further details TK 78KOR KE3L USB User 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 auto
34. 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 key to see the rest of the agreement USER LICENSE AGREEMENT IMPORTANT READ CAREFULLY This User License Agreement 1 legal agreement between you either natural person an entity and Electronics Corporation for 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 you accept all the terms of the preceding License Agreement IF you choose the setup will close install W272 must accept this agreement 6 Enter the product ID and click product ID is available on the other sheet InstallShield Wizard Please enter the product ID of the product Enter Product Product ID is written on the case ar in the accompanying documents Product ID lt Back Next gt Cancel 7 It starts copying the files 12 TK 78KOR KE3L USB User s Manual Click when Select Files installation wizard dialog opened Install Wizard Kind of File Select the kind of installation Device File For zBEDR EC3 L LISB Device File For zBEDR KE3 L LISB 9 When the install
35. ation is completed the following dialog opens Click INS TALL 7 Installation Finished wa ALO q x D Electronics Starter Kit Virtual UART USB driver must be installed PC before you connect to TK 78KOR KE3L USB Install the USB driver by referring 1 3 Installation of USB Driver 13 TK 78KOR KE3L USB User 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 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 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 system language in the Regional Settings Properties tab Assembler RA78KOR and C compiler CC78KOR limit the object size to 64 Kbyte 14 TK 78KOR KE3L USB User 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 78KOR KE3L USB Please follow the instruction below to insta
36. d 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 60 TK 78KOR KE3L USB User s Manual 4 2 1 not communicate with Emulator 0100 0109 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 switches 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 61 TK 78KOR KE3L USB User s Manual 4 2 2 Incorrect 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 ent
37. d in built in flash memory without using ID78KOR QB or debugging the microcontroller with MINICUBE2 use following settings and re supply power SW4 KOR lt gt KOUSB side or 2 Set the SW4 center if you use P11 and P12 on the Expansion connector Bit4 is the switch for POWER LED If CPU is supplied power LED1 is turned on OFF If CPU is supplied power LED1 isn t turned on Q Bit5 is the switch for the audio mute Audio output is muted by P31output low OFF 54 TK 78KOR KE3L USB User Manual The bit 6 8 are connected to 41 42 17 pins in microcontroller ON means Low and OFF means Open When you need to use this you need to set the microcontroller built in pull up resistor option registers PU1 PU4 to ON For details about settings of microcontroller built in pull up resistor option registers refer to 78KOR KE3 L User s Manual U19878E 1 3 3 2 SW2 INTPO SW1 is a 4 ways center push switch When the switch is moved to one of 4 ways or is pushed down it sends the signal of Low When it is released it becomes Open again You need to set the pull up resistor option register ON for this function For more information about the pull up resistor option register refer to the 78KOR KE3 L user s manual U19878E SW1 Pin Functions ALPS SKRHADE010 Signal Target Microcontroller SW1 Operation Name Pin Name P70 KRO P71 1 CENTER PUSH Spin
38. d opening functional window made by below buttons However it could be difficult to know which button does what um gt m mi In this case select Options on menu bar then Debugger Options Check Pictures Text on setting area c pus only With this setting the buttons display the text as well so that it is easier to know what they are Open Load Proj E Asm Weh SFR 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 HE Source main c 71 TK 78KOR KE3L USB User s Manual 5 3 3 Set delete breakpoints Breakpoints are executed by clicking lines in which is displayed is displayed in the line where a breakpoint is set Breakpoints are deleted by clicking HE Source main c UCHAR buffL UCHAR t butt 72 TK 78KOR KE3L USB 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 secti
39. e data is latched and the 7segLED displays the data P20 P23 P50 P53 P110 P111 P20 P51 P21 P52 P50 P22 P23 O To display 1 on U1 and 27 on U2 PM2 OxfO PMS OxfO PM11 0 0 P2 Oxf9 PM11 1 0 Pb 0 79 gt 24 Set P110 111 to P11 0 0 P11 0 1 P2 0xa4 Pb 0 4 gt 24 11 1 0 Pll 1 1 b Set data for 717 Set P110 to Low Set data for 2 Set P111 to Low Example of data and its display Set lower 4bit of P2 to output mode Set lower 4bit of P5 to output mode output mode in P2 and P5 then High in P2 and P5 then High TK 78KOR KE3L USB User Manual 3 3 10 CN2 The connecter for CN1 CN2 expansion connection The connecter was not installed HIROSE ELECTRIC CO LTD HIF 3H 50DA 2 54DSA 3 3 11 CN3 This is the connector for AC adapter Please connect the bundled AC adapter 5V Support plug 2 1mm DC jack center plus 3 3 12 J1 This is the jack for external speakers Connect a speaker when you play sound Support jack 3 5mm monaural 3 3 13 VR1 Audio output volume control If the audio mute 15 set then audio 15 not output 3 3 14 05 1 USB connecter for the USB function controller 3 3 15 USB2 USB connecter for the debug serial communication It was found as NEC Electronics Starter Kit Virtual UART 1 3 3 16 FP1 This is the interface for connecting MINICUBE2 58 TK 7
40. elp FPR YA penning Flash Firmware Parameter file Mame Version Date Chksum Area Connection to device Port Speed Range Freq Multiply 5 Push the File Read button E Device Setup Standard Advance Parameter file Host connection Supply oscillator Fort Frequency 5 E Multiply rate Operation Mode Chip Block Area Target Reset Message 78 TK 78KOR KE3L USB User s Manual 6 Please select 78F1026 prm in the directory of PRM78F1026 V100 in the CD ROM File name p5 pm 0027 0252520 D Port selects the COM port number where TK 78KOR KE3L USB is allocated Only the COM port number that the personal computer has is displayed in this pull down menu E Device Setup Standard Advance Parameter file 8F1026 prm File Head Host connection Supple oscillator Frequency Speed Multiply rate Operation Mode t Black endil 2 Li Target Reset Message 79 TK 78KOR KE3L USB User s Manual Erase The deletion of the flash memory begins when the button is pushed B5 WriteEZ5 Seles Device view Help 69 gt gt Flash Open gt gt Reading Firmware Success Head ParameterFile Parameter file Mame FBF1 zb Version
41. f 78KOR KE3 L 0198786 See Start address is set to 1 00 and Size is set to 1024 These settings reserve the memory address area for the monitor program the flash memory area that the debugger uses for on chip debugging In this case the Control value is allocated to the address of C3H in flash memory is set to the next address Because of this the following areas could not be set the segments Address area that reserved on chip debugging 2H 3H GEH 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 4 and checked if it 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 4 or if you set wrong on chip debug option byte you will not be able to use the debugger ID78KOR QB To solve this you can erase the built in flash memory with WriteEZ5 for connect the 078 For details
42. fied folder The folder that the TK78KOR folder is made when this file is executed and the sample program is stored under the folder in addition is made 25 TK 78KOR KE3L USB User Manual 1 4 2 Overview of Sample Programs The sample programs consist of following directories TK78KOR 78KOR USB NEC project Project file folder KORUSB HID prw Project file include Include file folder sre Source file folder 78KOR_USB_CDC NEC project Project file folder KORUSB_CDC prw Project file include Include file folder src Source file folder Inf file INF file folder 26 TK 78KOR KE3L USB 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 ID 8KOR QB You will use the programs that you prepared 1 4 Sample Programs as the sample programs for TK 78KOR KE3L USB 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 27 TK 78KOR KE3L USB User Manual The overall steps are as follows 2 1 Start PM 2 3 Load Workspace 2 4 Set Linker Options 2 9 Set Compiler Options 2 6 Greate Load Module Files un Programs 2 9 Start Debugger 2 10 Run Programs 2 11 Stop Programs 28 TK 7
43. hen the program stops the status bar changes back to the original color 49 TK 78KOR KE3L USB User Manual 2 12 Close Debugger ID78KOR QB Select File on menu bar then Exit ID78KOR OB KORUSB HID prj 82 Edit View Option Run Event Browse Jump Window Help Open Save As EE cd Close Download atch Refresh Cl Load Module ale paca INT8 keycode REPORT_DATA_LENGTH 1 Project INT8 keydata fi KEV Environment Upload nit Debugger it kevycode 8 sizeof lt keycode gt Key Data d 5 eytouch_flg F_SW_OFF Key Flag Cle amp G x 1 gt x lt SU2 UP x while lt P amp x 1 gt x gt lt 8542 OFF WAIT gt keycode KEV1 SCAN CODE while CXusbf 78k r 1 gt t DEU 0 usbf78kB8r data lt sizeof memsetCkeycode B lt 22 while Cushbf78k r_ep_status C_INT1 gt t DEV o us bf 78k r_data_send keycode sizeof keycode keydatatt if lt keydata EXCLAMATION_KEY lt keydata A_KEY The exit confirmation dialog is displayed main c 110 main 00407 245 244 3ms Manual Break ID 8 7 This will end your Debugger session you want to save the settings in the project File Yes No Ca
44. in on the board Set the switch and the jumper pin on the TK 78KOR KE3L USB as follows 1 2 Short 1 2 Short JP4 Short Debug Writer 0000 0000000000000 7 IN JAPAN 15 WS Re 4 ER 3 2 v 2 U L sa 5 3m 2 2 TE Q o TU REM 2 RS i TIE C o 6 Ww m wm m m m m 19 m ow w m ec eee After the switch settings are completed connect the PC to 0582 on TK 78KOR KE3L USB with USB cable If the Found New Hardware Wizard is started install USB driver with referring 1 3 Installation of USB Driver 43 TK 78KOR KE3L USB User s Manual 2 9 Start Debugger ID78KOR QB Click the debug button 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 nas KORUSB_HID prw OutPut File Edit Find Layer view Project Build Tool Window Help 518 X EG In A KORUSB KORUSB_HID Debug Build Jan gue ProjectWindow Files KORUSB_HID 1 Project s
45. kit 82 TK 78KOR KE3L USB User Manual 69 00501 51 Jequiny 6 anyo 210 Emi E Wh SOSZOd ISS a VOOXN Lasn Jnzp O E 90 ied lt LOALODEOATPLNS v es 2 _ 2 9 Sota UNOW ON 8 2 01 920 487 CCCUUUUUUUUU HHOANNNANANNG oo UZUAAAAAAAAd DH S EE BE anyo anyo 2222 55559 20008 0 0 69 gt 99 Ld 0008 289 25 1 SSA ESd E NI LOOL LOLL 9 Ld i sg 14 7 Sid EHP hd oand lt 2 tid ld z 1 0005 214 15888 ADS 13899 2 Lid 0195 01 13599 2 Old 0119 1 4 FE Ord 2 gp thd POOL POIL rd td Sy v I a Erd LS E Sr SSAV 8 INWKA OdLNI Zd 880 SHO HAS 5222552 BASSE SAH 9 LMS p Ug gu uud gg NIN 5 22250245 gt gt gt gt gt gt gt gt 509 904 OF 2222222250 gt Z LMS NOCA ON J3HAV
46. ll 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 78KOR KE3L USB First connect the TK 78KOR KE3L USB 0582 to PC with USB cable 2 E ux jeu duc e px E E RA E zum E MEME Ay oue aa UE x 3 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 Windows 2000 gt 1 32 Installation on Windows 2000 After the installation go to 1 3 3 Completion of USB Driver Installation 15 TK 78KOR KE3L USB User s Manual 1 3 1 Installation on Windows XP 1 Once the TK 78KOR KE3L USB 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 Windows will search for current and updated software by looking on Your computer on the hardware installation or on the Windows Update Web site with your permission Head our privacy policy TET an Windows connect to Windows Update ta search for Select No not this time software
47. low the steps below WriteEZ5 is installed at 1 2 2 Installation of Development Tools D Start WriteEZ5 by selecting Windows Start menu Programs NEC Electronics Tools WriteEZ5 V1 00 and WriteEZ5 E WriteEZ5 Device View Help gt gt Flash Open Firmware Farameter File Mame Version Load file Date Chksum Area Connection to device Fort Speed Range Freq Multiply 76 TK 78KOR KE3L USB User Manual 2 Set the switch and the jumper pin on the TK 78KOR KE3L USB as follows 1 2 Short Debug Writer PENIS oo oor a i TuS 6 l ON l dy CHS cl vi end I FEE KOR 18411111 T J 388 S Nu Cla Fi ud rat Hs HOS E m 9g EE Oen N EXT ma D pus p i o e Se Se Ge eo 2 88 j m eof amp 3 Then please connect the PC to USB2 on the TK 78KOR KE3L USB with the USB cable 71 TK 78KOR KE3L USB User Manual 4 Push Setup button WriteEZ5 Device View H
48. lsVCCTBEORAW2 124 Include Files Device File Install 1 complete 0 error s and O warning Project Related Files 1 Files NEC Electronics Tools RATSEOR 11 331 Other Files Settings D erroris and 0 warningis foi Font 1 Files MEC Electronics Tools RATSEOR 11 337 Customize ersion Complete D error s 0 Record the Key Operations error s 0 Total warning s EOF Load the Macro File Play Back the Macro File Register the Macro Files Change debugger settings 41 TK 78KOR KE3L USB User Manual Check if ID78KOR QB V3 60 78KOR Integrated Debugger is selected Debugger Debugger Settings Select Debugger ri Debugger Integrated Debugger File C Program Files NEC Electronics Tools ID 78K DR BB V3 BD Debug Target Debug Target File SOROR USB HIDSNEC prapect a Imf Execute CPU Reset after Download Debug Options 5 gwoad Je If you cannot select ID78KOR QB V3 60 78KOR Integrated Debugger select Project on menu bar Project settings gt Tool version settings gt Detailsetting gt then select ID78KOR QB 42 TK 78KOR KE3L USB User Manual 2 8 Check Board Settings Before connecting the PC and the TK 78KOR KE3L USB with USB you should check the setting of switch and jumper p
49. matically please initiate it by double clicking the SETUP EXE 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 6 0 056 11 00 January 25 2010 Copyright E NEC Electronics Corporation 2010 Readme First Documents Sample Pragram Link to NEC Electronics Microcomputer E sit 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 the next section TK 78KOR KE3L USB User Manual lt 3 gt Documents Manuals of development tools and the evaluation kit are available in PDF files When this button is clicked the WWW browser will start Adobe Acrobat Reader is available in the CD ROM lt 4 gt Sample Program Click this button to start the WWW browser for the sample program and the tutorial lt 5 gt 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 lt 6 gt Exit Terminate the setup 2 Click the Install 10 TK 78
50. n set here is described on the following pages New WorkSpace dialog opens New WorkSpace Step 1 9 Workspace Information Workspace File Name 1 Workspace Information 2 Select Tools Create Blank Workspace 3 Select Real Time 05 Folder Browse Project Group Name Microcontrollers Name Device 78K0 Y uPD78F0500_30 Y Device Install 7 Setup Source Files 8 Select Debugger 3 Confirmation 8 850 Microcontrollers Only 4 6 i will set up the basic information about the workspace and the project ee _ TK 78KOR KE3L USB User Manual Input the workspace 2 setting New WorkSpace Step 1 9 Workspace Information as follows Workspace File Name test 1 Workspace Information 2 Select Tools Work space file name T Create Blank Workspace 3 Select Real Time 05 test Browse Project Group Name Folder Microcontrollers Device 7 Setup Source Files C TK 78KOR 78KOR uPD78F 1026 64 8 Select Debugger 9 Confirmation Device Install 8 850 Microcontrollers Only 4 6 Project Group Name no input Microcontroller Name 78KOR This will set up the basic information about the workspace and the project Device Name uPD78F1026 64 Click button 02011 CATKFEKOR This folder cannot be found
51. ncel If you click it saves the settings in the project file and then closes the ID 8KOR 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 ID 8KOR QB 50 TK 78KOR KE3L USB User Manual 2 13 Quit PM Select File on menu bar then Exit PM co PM KORUSB_HID prw OutPut IM Edit Find Layer View Project Build Tool Window Help New h Ctrl 0 Debug Build J amp Ee Close New Workspace Sel OutPut Open Workspace Save Workspace Close Workspace Save As Print Preview Print Ctrl P E Exit Exit and prompt to save the Files 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 51 TK 78KOR KE3L USB User s Manual In this chapter the hardware of TK 78KOR KE3L USB will be explained PD78F1026 2X 78KOR KE3 L USB Interface External main system clock 20 2 Subsystem clock 32 768 2 Internal oscillation clock 20 8 1MHz PWM output Filter LMV324M NS U13 AMP LM4865M NS U14 Speaker 0 3W for simplified monitoring Jack 3 9mm monaural Filter ON OFF Switchable SW5 Output Volume VR1 USB MINI B USB1 USB Function USB MINI B USB2
52. on how to register from source window is described Right click the variable on source window then select Add Watch Search xi Watch Quick Refresh Close tatic U16 16 ug ucPlau amp ts ug ztop Led ug a utput count tatic lUi amp autput 2 1 Te tatic U8 PlayMode RS UU enum u32 uilntCoun Symbol u32 uilntCoun uit usKeySts Break when Access Us Break when Ec 4 mi Break when Read fr 2 Add Watch dialog opens Click Ls MH ame Add Rade Proper Dec C Oct Bin String C Byte C Word Double Word Number 3Adding a variable to watch window is completed iBix 73 TK 78KOR KE3L USB User s Manual 5 3 5 Display global variables while programs are running RAM general purpose register and SFR can be referred by the pseudo real time monitor function even when the programs are running Select Option on menu bar then Extended Option Configure the settings for RAM Monitor And DMM Extended Option RAM Monitor And Break When Access C IRAM Off Redraw Interval pon msec Clock Internal External f Sub Glock CKG Register xn Freguencey MHz On blouse Click Soft break Hard break Trace Data Priorif Timetae Rate 1 Fetch
53. or debugging Following three settings are covered specifically Outputs from debugging On chip debug Desable Enable security ID Watchdog timer Select Tools on menu bar then Linker options 2 4 1 Output Tab Select Outputl tab on Linker Options window and see following settings Linker Options Output Library Others Load Module File a Output File Hame Browse Symbol Information g Create Error List File e L eese v In Chip Debug Option Bytes ga Security ID gi Control Value 85 H lt IFFFFFFFFFFFFFFFFFFFF H Start Address 1FCO0 H 1 024 bytes Memory Informationf ws Command Line Options 1024 qilFFFFFFFFFFFFFFFFFFFFh pa map gbUUFEFFh bel rdrm lib bel rm lib bel rmf lib C Program Electronics CC FSR OR Ww 2 s 34 TK 78KOR KE3L USB User 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 Enter 85 in Control value This setting enables the on chip debugging function of the microcontroller For details of Control value refer to the user s manual o
54. rce Files C Program Files NEC Electronics Tools CC78KOR W2 12 Include Files omni lation eng 0 error s and 0 warning Project Related Files Electronics Tools RA7SKOR W1 33 Other Files 5 and 0 for Electronics Tools RAa7SKOR 1 33 2 13500 Build completed normally 0 error s and 0 Total warning s 0 EOF Files Memo Build has been completed successfully 39 TK 78KOR KE3L USB User Manual 40 TK 78KOR KE3L USB User Manual 2 7 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 UNA P KORUSB_HID pr OutPut File Edit Find Layer View Project Build Ex Window Help D d amp Compiler Options Assembler Options KORUSB_HID KORUSB_HID Linker Options Object Converter Options ProjectWindow List H lolx Files Lles Electronics Wz 125 omplete erroris and O warning 2 fg KORUSB_HID 1 Project s Files NEC Electronics Tools CC78KOR 124 KORUSB_HID 1 complete error s and warning Source Files Files NEC Electronics Ton
55. refer to 5 4 Erase microcontroller built in flash memory 35 TK 78KOR KE3L USB User s Manual 2 4 2 Output2 Tab Select Output2 tab on Linker Options window and see following settings Linker Options Output Output Library Others Create Link File p Output File Hame a Browse Map List km Output Directive File Image 9 Output Public Symbol List kp Output Local Symbol List kl Add Form Feed at End of List File If Lines per 0 Select mirror area User Option Butes ab MAA D mit H 1 mil Command Line Options 1024 qilFFFFFFFFFFFFFFFFFFFFh pa map bel rdm lib bel rm lib bel rmf lib C Program Files NEC Electronics Tool Ww s Cancel Help User Option Byte Check User Option Byte and then enter OOFBFF Here you can do the setting of watchdog timer low voltage detector and system reserved memory area The 3 bytes you entered are stored at COH C2H on flash memory COH setting for watchdog timer setting for low voltage detector 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 78KOR K
56. ry 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 The on chip debug function had been disabled in the device 0 79 62 TK 78KOR KE3L USB User s Manual This chapter explains some useful operation techniques of development tools and circ
57. search C Program Files WEC Electronics T aalss T K drive Don t search will choose the driver to install Choose this option to select the device driver fram list Windows does on m the driver you choose will be the best match for your hardware Click Next 4 If the following dialog is opened click Hardware Installation The software are installing for this hardware Electronics Starter Kit Virtual UART has not passed Windows Logo testing to verify its compatibility with Windows Tell me why this testing is important Continuing your installation of this software may impair or destabilize the correct operation zuztem either immediately ar in the future 1 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 78KOR KE3L USB User s Manual 6 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 UAA T Click Finish Click Finish ta close the wizard 7 Goto 1 3 3 Completion of USB Driver Installation 18 TK 78KOR KE3L USB User s Manual 1 3 2 Installation on Windows 2000 1 Once
58. stered Place the cursor on the source file in the Project window of PM and select Add Source Files displayed in the right click menu PM test prw ProjectWindow File Edit Find Layer View Project Build Tool Window Help 58 test test Debug Build gt m X itd FE ProjectWindow Files test 1 Project s Include Project Other Fil Add the source file to the project Add Source Files test Look in TK78KOR amp er E3 c c File name be oren Files of type Source Files c asm Add Files from Folder Multiple source files be selected by clicking them with pressing key 69 TK 78KOR KE3L USB User Manual ny test prw ProjectWindow SEE File Edit Find Layer Project Build Tool Window Help s Dulse teea ______ Source file and c c are additionally 2 Include Files Project Related Files Other Files registered to the project For Help press 1 70 TK 78KOR KE3L USB User Manual 5 3 Debugger tips This section describes some useful techniques for the debugger ID78KOR QB 5 3 1 Change display of buttons Execution controls run stop step in debugging reset etc an
59. t DEU o usbf 78k r data lt lt if EXCLAMATION_KEY gt lt keydata A_KEY keydata Hl 99 2 10 78 KORUSB_HID prj File Edit View Option Run Event Browse Jump Window Help 291 Source main c Seles Search lt lt Watch Quick Refresh void main void gt keycode REPORT LENGTH 1 UINT8 keydata fi KEV init lt 252 Key Data usbf 78k r_keytouch_flg SU OFF Key Flag Cle while 1 gt lt if lt ushf 8k r_keytouch_flg F_SW_ON gt lt lt 8 8x81 Bx B gt SW2 UP x while lt P amp x 1 gt 512 OFF WAIT gt keucode KEV1 SCAN CODE while Cusbf78k r pp st tus C INT1 gt t DEU O usbf78kB8r data lt sizeof lt keycode memset B lt 252 while Cusbf78k r_ep_status C_INT1 gt t DEV o usbf78kB8r data lt sizeof keycode keydatatt if keydata lt keydata A_KEY 2 7 When programs are running the status bar will be red 47 TK 78KOR KE3L USB User s Manual Connect the PC to 0581 TK 78KOR KE3L USB with U
60. t is the unit that is managed by A project refers to an application system and environment development based on saves project information in a project file What is a project file A project 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 project group is a group comprised of a number of projects an application system The target device of each project must be the same within a project group What is a workspace 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 78KOR KE3L USB User 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 KORUSB HID prw under the directory TK78KORY78KOR USB project PM No Workspace OutPut Ef Edit Find Layer View Project Build Tool Window
61. the TK 78KOR KE3L USB is connected with USB the Found New Hardware Wizard will be started Select No not this time and click Found Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps you install device driver for hardware device Click Next To continue click Next lt Back Imm Cancel 2 Select Search for a suitable driver for my device Click Install Hardware Device Drivers device driver i software program that enables hardware device to work with an operating system This wizard will complete the installation for this device 2 USB Device device driver is software needs driver files for your nev device installation click Select Search for a suitable driver for my Click Next Cancel Mizard to What vou want the Search for suitable driver for my device recommended Display a list of the known drivers for this device so that can chod driver 19 TK 78KOR KE3L USB User s Manual 3 Select Specify a location Click Found New Hardware Wizard Locate Driver Files Where you want Windows to search for driver files Search for driver files Far the following hardware device y USB Device for suitable drivers its driver database on your computer and in optional search locations that you specify
62. uit diagram of the kit for developing of user programs 6 1 Create a new workspace project 6 2 Register additional source file 6 3 Debugger tips 6 4 Circuit diagram 63 TK 78KOR KE3L USB User 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 menu bar then New Workspace PM No Workspace ProjectWindow ji Edit Find Layer View Project Build Tool Window Help New Ckrl N Open Ctrl 0 Close Open Workspace Exit Create 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 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 gt Specify the name of the device to be used 64 concrete informatio
63. ustomers or third parties arising from the use of these circuits software and information CAUTION not give any physical damage to this equipment such as dropping not superimpose voltage to this equipment Do not use this equipment with the temperature below 0 C or over 40 C sure the USB cables are properly connected Do not bend or stretch the USB cables Keep this equipment away from water 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 78KOR KE3L USB User Manual Contents PREPARA TON 7 1 1 Development Tools 8 1 2 Installauonm otr Development _____________ 9 152 Installatioti Packat CS a eod ace 9 1 22 Installation of Development Fools unici ridet idoneos teda A 9 tS Installatiori ot bui ns var rre uet irpo ta Or OE 15 135 Installation on Wiridows X P
64. ve shows that the COM port number is 8 If ID78KOR QB is not in use you use this port number for connecting TK 78KOR KE3L USB When you change the USB port connection the COM port number will be changed as well CAUTION not do Hardware Modification Scan when you communicate with the target device 22 TK 78KOR KE3L USB User Manual 14 Sample Programs This section explains the overview and preparation of sample programs For details about the sample programs see 4 Sample Programs 1 4 1 Preparation of Sample Programs 1 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 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 SL US6 11 00 25 2010 Copyright Electronics Corporation 2010 Readme First 2 Press the Sample Program button to start the WWW browser 23 TK 78KOR KE3L USB User s Manual Sample Programs Microsoft Internet Explorer File Edit Favorites Tools Help 2 f FK Search Favorites 69 2 3 Address DADOCISAMPLE_E HTM
65. writing I TARGET RESET f On INTERNAL RESET t Memory Mapping Access Size BBit 1661 Memory Attribute Mapping Address Target p _ Delete m Add Click when the confirmation dialog for downloading load module file is opened ID 7 GROR OB 4 WEFOO Da you want bo download Load Module File Yes Ma 45 TK 78KOR KE3L USB User Manual Download ID78KOR GB starts and downloading the program to flash memory CATRZBK FAZBKIRS LISB HIEANEC pra mf object loading Cancel When the download is completed the source code will be displayed Em 10 78 KORUSB_HID prj File Edit View Option Run Event Browse Jump Window Help BBm Source main c Search lt lt Watch Quick Refresh Close UINT8 keycode L REPORT_DATA_LENGTH 1 UINT8 keydata fi KEV init sizeof keuycode 5 Key Data usbf 78k r_keytouch_flg F SU OFF Key Flag Cle while lt 1 gt lt if lt ushf 8k r_keytouch_flg F_SW_ON gt lt lt lt 8 x 1 gt AxA SU2 UP 1 lt lt amp x 1 gt SW2 OFF WAIT gt keycode KEY1_SCAN_CODE while Cusbf 7 8k r_ep_status C_INT1 gt t DEU 429 us bf 78k r_data_send keycode sizeof keycode memset
66. y 4 6 1 Detail Setting 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 8 850 Microcontrollers Only 4 6 You can also add source files by specifying the list 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 Cancel Click 66 TK 78KOR KE3L USB User Manual New WorkSpace Step 8 9 Select Debugger Please select the Debugger Select ID78 KO R QB V3 60 1 Workspace Information Debugger 78 V3 60 78KOR Integrated Debugger 4 Startup File t File name 5 Register Mode H c Program Files NEC Electronics Tools ID 78KOR QB V3 50 BIN E Lin Directive Filet 7 Setup Source Files Option gt gt 8 Select Debugger 3 Confirmation 8 850 Microcontrollers Only 4 6 You can change the selected Debugger using Tool gt Select Debugger Cancel 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 05 C TK 8K0R 4 5 Startup 8 Project Group 5 Register Link Directive File t Device Name uPD7
Download Pdf Manuals
Related Search
Related Contents
Canon Selphy CP-500 So You Want to Smart Charger User Manual User Manual – Preliminary Edition - Autism Europe Balance manual de instalacion para el panel ducha de lujo en acero renseignements importants sur la sécurité avertissement Williams 2302 Instructions / Assembly Yamaha VXC4/VXC4W Owner's Manual Copyright © All rights reserved.
Failed to retrieve file