Home
User`s Manual
Contents
1. OOQ oo0o000000000000000 oKokokokokokokokokokokokokokokokokokokokoko 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ENS CEN CEN FEN 723 EB COS IE GE 5 oos o 2 Connect CN2 RJ 45 connector on TK 78KOR KG3 NET board and PC with LAN cross cable When you use a network hub use LAN straight cable Connection Example LAN cross cable V Serial cross cable 3 Connect DSUB 1 D sub 9Pin connector on 232 board and PC with RS 232C serial cross cable 4 Set the J1 jumper pin on TK 78KOR KG3 NET board to open take out the pin 5 Connect bundled AC adapter to CN3 connector on 232 board The board is booted up as soon as it gets power there is no power switch TK 78KOR KG3 NET User s Manual 4 3 3 Setting for Network Address To access the Web contents of Web server sample program you need to use browser software on PC The IP address of the Web server is 192 168 0 200 The network address of the PC must be set as follows Example of Network Address Settings IP Address 192 168 0 XXX XXX 0 255 Subnet Mask 255
2. 33 24 oe ULKE DO DO EPO Sy u Start 35 24 35 242 Output 52225222 A 37 29258 COmpbIIer 38 2 04 Extend 38 2 5 2 Startup Routine rettet tette tette tette teen ecd 39 2 5 3 40 25 Greate Load Module Files 41 2 1 Check Debie er 43 2 9 Chock Board Settijiet asunto at 45 29 Start Debusser 1078 08 o tate e de ER 46 49 ASCO 51 2 12 Close Debue ser ID SKOR QB ia atro IN 52 A 53 CHAPTER 3 HARDWARE SPECIFICATIONS a ito rident tnu t Rc 54 3 1 78 2 32 aussen ett cece bese t redet beret ere e bone 55 32 TK JSKOR KGS TNE T Funetiott 55 SUUM HR 55 PA ads 55 56 SLAAN 255818 56 SZ IONS RM 57 9 2 5 EPI 57 TK 78KOR KG3 NET User s Manual Ee PZ OZ Functi
3. Click when the confirmation dialog for downloading load module file is opened Ei TK 78KOR KG3 NET User s Manual Download ID 78KOR QB starts and downloading the program to flash memory CXATRZBR PAKOG3 NE object loading Cancel When the download is completed the source code will be displayed 29 ID78KOR QB 76KOR NET prj File Edit View Option Run Event Browse Jump Window Help ir m gt 5 FI f Ve S IE Source main c ee _ gt gt Watch Quick Refresh Close oid init_routine lt void gt ee 8KGR KG3 hdw_ini Initialise timer timerB init Initialise the TCP IP stack uip init Initialise the app httpd init Initialise the device driver etherdeu init Initialise the cache uip arp init NOTE Completion of the download does not mean running the programs Therefore even though you press SW1 on the board it does not make anything happened To run the demonstration see 2 10 Run Programs TK 78KOR KG3 NET User s Manual 2 10 Run Programs Now you are ready to run the program Click the restart button 03 or select menu bar then Restart The sample program runs 35 ID78KOR QB 78KOR NET prj File View Option Run Event
4. ap bzSK R MET Ib b SKOF belbrsm lib bel rm lib belbrrt lib 1 lib L sPregram Files HEC Electronics is Cancel Apply Help TK 78KOR KG3 NET 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 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 of 78KOR KG3 U17847E See Start address is set to 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 and is set to the next address Because of this the following areas could not be set the segments Address area that reserved by on chip debugging 2H CEH D7H From the address set in Start address to the byte set in Size Security ID Check Security ID and enter the security ID which is a unique ID code 10 bytes to authenticate when the debugger is launched The security ID is stored in the flash memory
5. 9169 L FET 0 0000000006 ho 2 OO v B la ce e LJ 70 ooo 8 700 9 pme Te ooooo 20 o o 8 f ao oooooocoooooo 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C Sy rem nu E fae EA ER 00 D CD D 03 022 0 2 0 D e eG Qoo TP Dno After the switch settings are completed connect the PC to CN3 on TK 78KOR KG3 NET with USB extension cable Connect CN2 and PC with LAN cross cable Supply power by connecting bundled AC adapter to CN3 5 232 board LED1 is lighted when CPU gets power supplied If the Found New Hardware Wizard Driver is started install USB driver with referring 1 3 Installation of USB TK 78KOR KG3 NET User s Manual 2 9 Start Debugger ID78KOR QB Click the debug button or select Build on menu bar then Debug If you do no
6. 1 15 8005015 CSn RD gt RDn WRORWRI gt WRn PH RSm Actvelow INTP4 Programmable INTP3 P30 Reset LAN controller Use P17 port to reset the LAN controller Access to LAN controller Access to LAN controller with setting the external bus to 16bit separate bus mode For chip select CSn of LAN controller use P16 port Set this low level when you access to LAN controller 3 2 5 CN3 CN3 is a USB connector for on chip debug 3 2 6 LED1 This is the POWER LED It is lighted when it gets power supply TK 78KOR KG3 NET User s Manual 3 3 EXT 232CFunction Layout MADE IN JAPAN RoHS OTON compliant gt 5 89 144 n Di 111111 165 62 0 78 e 232 CN2 Extension 1 CN3 3 4 EXT 232C Function Details 3 4 1 CN1 is a connector for TK 78KOR KG3 NET 3 4 2 CN2 DSUB1 Dsub 9pin GND a Universal area eMeNMoMoMOMG 50000000000 3 3V 000000 2000000000000 VL XV U U U U XJ G G lt
7. Control Serial It makes serial communication between TK 78KOR KG3 NET and terminal software Each application can be used with following steps Install Software With referring Chapter 2 start the debugger and write sample programs Connect Equipments Execute Functions s Network Address Port Serial 4 3 1 Preparations oystem requirements for evaluation PC CPU Pentium3 800MHz equivalent or higher 128MB or higher 256MB recommended Windows 2000 XP Web Browser Internet Explorer 6 0 or higher Ethernet 100BASE TX 10BASE T RJ 45 x1 COM Port D sub 9pin TK 78KOR KG3 NET User s Manual 4 3 2 Equipment Connections Connect PC and TK 78KOR KG3 NET 1 As shown below connect CN1 on TK 78KOR KG3 NET board and CN1 on EXT 232C board 0000000000000 0000000000000 ab 000000000 MM Mo l 7 00000000000089 J 00000000000069 CEEEEEEEEEEETI WA is TK 18BK R KG34NE T 62 0178684 S1c r lc m DO 900000000000 O 00000000 KA MADE T 9 iit iBbo j 00000000000000000000000 z ee 9 2 1 10
8. ptions Add the source file to the project es L ki 2 Add Source Files test Look in test b c Files of type Source Add Files fram Folder File name Multiple source files can be selected by clicking them with pressing key TK 78KOR KG3 NET User s Manual PM test prw Project Window p TK 78KOR KG3 NET User s Manual 6 3 Debugger tips This section describes some useful techniques for the debugger ID78KOR QB 6 3 1 Change display of buttons Execution controls run stop step in debugging reset etc and opening functional window can be made by below buttons However it could be difficult to know which button does what if gt 8 er t Ei Q ag In this case select Options on menu bar then Debugger Options Check Pictures and Text on setting area With this setting the buttons display the text as well so that it is easier to know what they are Ee Ret Step Ower Res Open Load Proj Sro Asm Weh Reg SFR Lac 6 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
9. Lp VLGOO ZdLNI L d ooaugssn E 509199119 eNO PPA 1091 aa asn 4 LSOL LSIL d noawia 0SOL OSLL Z Ld OSIL ez LHOL 9Ld N ve 94 X 90 lid X 12 zz 99 14 gg 0 08 214 571 0118 04 Tan gg 098 04 SSA _ OL 370 m p PeOLLEPLNO 1 T 955 S LHIN 2014 SPI oand 9 NOQWI4 13538 E 18534 IATX3 OdLNI OZ Ld b 6 PEOLLEPLNO 0001L 00d TUE OOOL OLOLL LOd gt 2 104 N e LdLNI O d Wi aa dsn sn TK 78KOR KG3 NET User s Manual 88 10 79 JequinN Oc c 1X3 LSH SLO LSH oeo sr o u usd ISH 1261 2960 201 rans a usd ISH SLO ISH Ld SLY ISH eo 9L vL L LL 92 QO3c 2exvW SL 9 L 8 L L 2 vL 3110 E XdWZLLLNTI NGC 4N0L en ASZ ANOL GO PO O 9 4 001 S 3110 LH 0 9 10 0170 93 v NO LO gt L 2 6 pO 4 0d p 81 LL 204 diN3Vc odd dIN3Vc Od4d dIN3Vc O4d4d z z er NEE JUNOW JON diN380t O 33 _ G D LO OEL WINLL E 1114 0114 1114 9814 NEE ACE 1814 9814 vGld 0 d d Q d vod LEld
10. 0 0 0d 0 004 104 004 Ld ld Q d Vd L Old 09d 194 094
11. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 9 GND CN2 is an extension 1 connector is not mounted When you use TK 78KOR KG3 NET the same signal as CN1 connector on TK 78KOR KG3 NET is sent You can connect other external circuit TK 78KOR KG3 NET User s Manual CN2 i1 oso 2 ___ 3 RESET Reset Input from GPU s PA TOQ P41 TOOLI 5 8 PATM TO4 9 30 PA SQ 12 PANTPLTOTOS ___ 4 PHONTR EXM 15 PMO POLBUZNTPG 16 PIMPOLBUZANTP 1 PI42 SOR20 SCL20 18 PMSSPURDPSDAD 19 PIM SO TR 30 1 mno 3 5 39 PIM TyTOB 3 38 39 30 3 PIM ANa __ 3 PIS ANIG 39 PIS ANMM PISVANIS 35 PHVANOU 36 PHYANO 3 8N 3 4 3 CN3 This is the connector for AC adapter Please connect the bundled AC adapter 45V TK 78KOR KG3 NET User s Manual 3 4 4 05081 65081 is a D sub 9Pin connector for RS 232C communication It makes serial communication with using UART on 78KOR KG3 RTS and CTS signal DSR and DTR signal are connected on the board To change the connection you can cut the default short pad P1 and P2 using cutter Microcontroll
12. 3 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 Configuration for Debugging g 1078 DEMO pr REO RTV 730 RIA 4 9 J5 24676 J 12 SLES 8 4 8185 ES IP 4 ey user code Do not edit comment generated 14 5 1 Chappe 0 Start 0 End user code Do not edit comment generated her 76 Start adding user code Do not edit comment generated her li End user code adding Do not edit comment generated n C2 b TK 78KOR KG3 NET 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 6 for customizing the sample programs and the hardware Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Preparations Install the development tools Experiences Experience the basic operations of integrated development environment and integrated debugger ID78KOR QB with using sample programs Hardware Specifications Explain the hardware of TK 78KOR KG
13. ras SQ 809 1 6 67 809 1 6 67 Las OF od 135 0414 8 8 lt lo sila cvs 2 gt 6 5 955 ivs N OO O V 42 999 OVS Tm gt gt 5 T liii Ajoj ojoje ZNO V Y TK 78KOR KG3 NET User s Manual V8ZL0 29 JequinN 1ueuin2oq anro ES evo 449 K zl 5 NOAYIZLOZOANTWZNS V Ba 1asau NIAIZLOZOANTWLNS oand 9 VOOA 899 aa asn 5 01001 lt gt g Seu GOON YIDA BR _PEOLLEPLNO SLYN 0620 482 bd 083 118 LNO GOO EdLNI ZEd 48501 ET reOLLarLNO LLYN 18 1 91 aa asn LYN 00d n ZHWO LY 19 lt LdaNAV D4A QQA XdWZLLVWT ASZ ANOL en aa asn 8 L MIN f OLL8PLNO NOQSVIZONMWINS HZLLLOd ose OA T4NS anyo 91 EA l anyo 862 25 00 8 01 QNO 294 194 293 wasn A A 3nZv 0 2 L
14. Initialise the ARP cache uip_arp_init gt Stop the program 2 ID78KOR QB 76KOR NET prj File Edit View Option Run Event Browse Jump Window Help Arme o m OL aaa 218 t 1 1 12 Source main c Search lt lt gt gt Watch Quick Refresh Close 25 init routine net routine oid init routine void Initialise 78KBR KG3 hdw_init gt Initialise timer timerB init EI Initialise the uIP TCP IP stack 1166 Initialise the app httpd init Initialise the device driver init Initialise the ARP cache uip arp init 4 _ tts 979 0ms Manual Break When the program stops the status bar changes back to the original color TK 78KOR KG3 NET User s Manual 2 12 Close Debugger ID78KOR QB Select File on menu bar then Exit 2 ID78KOR QB 78 NET prj File Edit View Option Run Event Browse Jump Window Help Open grim 1 5 12 Save As Close Download ch Quick Refresh Close Load Module Upload et routine Project Environment routine amp vuoid Debugger Rese JE nit ise 8K R KG3 1602 Initialise timer timerB init EIQ Initialise the uIP
15. refer to the user s manual ID78KOR QB Integrated Debugger Operation TK 78KOR KG3 NET User s Manual 6 4 Circuit diagram From following page it shows the circuit diagram of the demonstration kit TK 78KOR KG3 NET User s Manual 78710 29 JequinN I3N 95 H058Z774L gt 199595 ONYT zd amp 284 59 ONVI E AG 9 10 02L 31L _ 0114 NVIQQA d 98 4 0 vOd Od Od LOd 004 V Ld Qv Ld Q 18524 1 lt lt 09d lt 28 64 gq vs 6q SS 99 29 q 89 64 09 sta L9 29 9 v9 S9 99 19 89 69 02 0114 LZ 4 24 1814 GL sa 09 8v 47 9X3 98d 9 9 98 ZHLOLY EdLNI OEd 8 3 0 6x3 LSd 0 4 284 Ixa sSd vIX3 9Sd SIX1 2Sd ZOOL ZOLL LEXA 2Ld SdLNI LOOL LOLL O X3 9 1DDLH AIQOLH 62X1 S Ld 0 1 22 14 00 1 0008 92 21 4 00 4 0015 40 4 114 00M2S vCX3 0L d VL d3HAV OONV OLLd VONV LLLd 0434AV SSAV 811 2814 9814 8814 NV vSld 6814 97 L 24 2 92 64 9814 9914 2814 NV LGLd 0814 224 924
16. 3 8 Erase microcontroller built in flash memory 5 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 6 3 8 Erase microcontroller built in flash memory 5 2 4 Disabling the on chip debug function is prohibited 0 33 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 5 2 3 The on chip debug function had been disabled in the device FOc79 TK 78KOR KG3 NET User s Manual This chapter explains some useful operation techniques of development tools and circuit 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 TK 78KOR KG3 NET User s Manual 6 1 Create a new workspace Now create a new workspace and project allows you to create a new workspace with following New WorkSpace dialog Select File on PM menu bar then New Workspace No W
17. Browse Jump Window Help ma SB Geese 11 IE suurce main c Search gt gt Quick Refresh Close 22 oid init routine void Initialise 78KBR KG3 hdw init Initialise timer timerB 11660 EI Initialise the uIP TCP IP stack uip_init lt gt Run the sample program Initialise the app httpd_init gt Initialise the device driver etherdev init Initialise the ARP cache uip arp 1160 iv edo 26 00008 2 gu ID78KOR QB 78KO0R File Edit Option Run Event Browse Jump Window Help rem gt 1 pm 29 s 5 IE Source main c Search gt gt Watch Quick Refresh Close oid init routine void Initialise 78KOR KG3 hdw_init gt Initialise timer timerB init Initialise the TCP IP stack uip init Initialise the app httpd init Initialise the device driver etherdeu init Initialise the cache uip arp init When programs are running the status bar will be red TK 78KOR KG3 NET User s Manual Start Web browser PC and access http 192 168 0 200 Confirm the following page is displayed E Cannot find server
18. Electronics Toole T K drive O Dont search will choose the driver to install Choose this option to select the device driver from a list Windows does the driver choose will be the best match Far your hardware Click Next i 4 If the following dialog is opened click Hardware Installation The software are installing for this hardware MEL Electronics Starter Kit Virtual UART has not passed Windows Logo testing to verify its compatibility with Windows me why this testing 1 important Continuing your installation of this software may impair or destabilize the correct operation of vour system either immediately ar in the future i Click Continue Anyway recommends that you stop this inst contact the hardware vendor for so passed Windows Logo testing Continue Anyway STOP Installation TK 78KOR KG3 NET User s Manual 6 The installation of NEC Electronics Starter Kit Virtual driver is completed Click Found New Hardware Wizard Completing the Found Mew Hardware Wizard The wizard has finished installing the software far E MEL Electronics Starter UART Click Finish Finish Cancel Click Finish to close the wizard 7 Goto 1 3 3 Completion of USB Driver Installation TK 78KOR KG3 NET User s Manual 1 3 2 Installation on Windows 2000 1 2 Once the TK 78KOR KG3 NET is connected
19. Imt qa85h 3F COUR 11024 7 MET lib bABEOR LIF lib bel rem lib bel rm lib lib 31 Files WEL Electronics Cancel Apply Help User Option Byte Check User Option Byte and then enter OOFFFF 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 2 on flash memory COH setting for watchdog timer setting for low voltage detector C2H setting for system reserved memory area must be set as 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 KG3 U17847E TK 78KOR KG3 NET 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 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 E X Preprocessor Menor Model Data Assign Optimize Debu
20. Yes this time only CO Yes now and every time connect a device nat 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 51 your hardware came with an installation CD location TE floppy disk insert it now What da vou want the wizard ta do CO Install the software automatically Recommended Install from a list or specific location Adve Click Next Click Next to continue ee TK 78KOR KG3 NET 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 gt Search for the best driver in these locations Use the check boxes below to limit or expand the defa paths and removable media The best diver Found will Select the driver directory Search removable media floppy CD ROM Include this location in the search C Program Files MEC
21. are searching an floppy disk or drive ar before clicking Click Next Optional search locations Floppy disk drives CD ROM drives Specify 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 Mew Hardware Wizard Insert the manufacturer s installation disk into the drive selected and then click Select the driver directory Click manufacturer s files from JC Prograrn Files NEC Electronics TK drreer TK 78KOR KG3 NET User s Manual 5 Click Driver Files Search Results The wizard has finished searching Far driver files for pour hardware device The wizard found a driver for the following device y USB Device Windows found a driver for this device Ta install the driver Windows found click Next files nec electronics ik drivermaqbisall int 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 lt gt MEL Electronics Starter Kit Virtual LAAT Windows has Fin
22. enter x 20 in ID code on the configuration window of the debugger Cade you start the debugger with using debug button the below error dialog may displayed because the debugger remember the ID Code from previous use In this case click to close the dialog open the configuration dialog to enter x 20 in ID code and then re start the debugger again ID78KOR QE x A FF amp n3 Incorrect ID Code TK 78KOR KG3 NET User s Manual When you could confirm the debugger is working open exkOr32ocfg exe again This time select KEEP flash memory at debugger start up then click Setting Because there is a limit of erasing times for flash memory it is recommended to try not to erase flash memory many times the debugger is started and programs are downloaded the security ID on microcontroller changes to the code that you set at 2 4 Set Linker Options On the other hand the debugger stores the security ID FFFFFFFFFFFFFFFFFFFF F x 20 Therefore when you close and start the debugger again you may get below error ID78K R QB X FFED3 Incorrect ID Code In this case click to close the dialog then enter the code you entered at 2 4 Set Linker Options to ID Code on the configuration dialog For other information
23. purpose of sample programs 15 to experience sample programs consist of the following items KOSHNET prj workspace of the WEB server sample proglam Click th link o TE SEUR E Gs NET sample program and install the sample programs a TE 7SKOR EG3HNEIT sample program e TE BE ORE GS NET evaluation kit User s manual Reter to the User s manual abput usage m am Local intranet 7 3 Click the TK 78KOR KG3 NET Sample Programs link the following download confimation window appears File Download E E 3 xl Some files can harm pour computer IF the file information below looks suspicious or you da not Fully trust the source do nat open save this file File name TEK SEUR EXE File Application From E SAMPLE E This of file could harm your computer if it contains Malicious code e file save it to your computer More Info ask before opening thie type ar Would you like to oper Click the butten TK 78KOR KG3 NET User s Manual Save In Local Disk 4m Co B O Documents and Settings Program Files History WINNT m kto p Documents Computer us File name My Network Save type Application 5 After specifyi
24. 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 hardware device Click Next To continue click Next lt Back 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 2 USB Device device driver software needs driver files for your nev device installation click Nest Select Search for a suitable driver for my Click Next Cancel What da want to do Search for a suitable driver for my device recommended Display a list of the known drivers for this device sa that can chod driver TK 78KOR KG3 NET User s Manual 3 Select Specify a location Click Found Hardware Wizard Locate Driver Files Where da you want Windows to search for driver files Search far driver files Far the following hardware device y USB Device for suitable drivers its driver database on your computer and in search locations that you specify Select Specify a location lick M ext IF vau
25. 255 255 0 4 3 4 Setting for Serial Communication To establish the UART communication between TK 78KOR KG3 NET board and PC you need to use terminal software on PC Set the network as shown below 9600bps Stop Bit 1 bit Flow Control For COM port number use the COM port that the RS 232C serial cross cable is connected X You can start the terminal software Hyper Terminal by selecting Start Programs Accessories Network then Hyper Terminal TK 78KOR KG3 NET User s Manual 4 3 5 Web Sample Programs 4 3 5 1Web Sample Top Page Web sample top page is displayed when you access following URL with Web browser http 192 168 0 200 Cannot find server Microsoft Internet Explorer File Edit View Favorites Tools Help Sample Menu Network address VO port status Web ta to I address Go to Network address bee Wopstcane status Go to CUIU BERE E rm 0 page ME CR to WebtoUART Web to to Web to UART igo UART to Web to Web Goto to to UART to Web page TK 78KOR KG3 NET User s Manual 4 3 5 2Network Address Page It displays MAC address IP address subnet mask and gateway of TK 78KOR KG3 NET board TBK R KG3 NET Microsoft Internet Explorer File Edit View Favorites Tools Help
26. 3 22222222 12 5 2 3 The on chip debug function had been disabled in the device 0 79 72 5 2 4 Disabling the on chip debug function is prohibited 0 33 72 CHAPTERS OTHER INFORMATION iium avia i ER D a UR iP 73 6 1 Create a ew WOKS ACE ics 74 6 2 Register additional source file tenter etes estes eate dente esr actae 79 Ser EDS UE ere eee ee 81 0 34 Ghan e displav or DUEEOTIS uccide A 81 6 3 2 Display source list and function list sss 81 6 3 3 Set delet breakpoints e Et Eh E EU un Em et 82 034 Display SloDaL Val lab OS tuta asco at 83 6 3 5 Display global variables while programs are 84 6 2 0 Display 85 6 3 7 Display memory and SFR eene trennen 85 6 3 8 Erase microcontroller built in flash memory nns 86 88 TK 78KOR KG3 NET User s Manual TK 78KOR KG3 NET is the evaluation kit for development with Ethernet systems using 78
27. 3 NET Sample Programs Explain functions used in sample programs 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 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 78 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 78KOR TK 78KOR KG3 NET User s Manual This chapter describes following topics Overview 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 KG3 NET TK 78KOR KG3 NET User s Manual 1 1 Development Tools Software Device file DF781188 V3 00 A device file contains device specific information So users need a device file to use the development to
28. 3KOR KG3 NET Network Address Address 100 00 4 80 3 80 IP Address 192 168 0 200 NetMask 255 255 255 0 Gateway 192 168 0 254 1 __ By clicking the Back link you can go back to Web sample top page TK 78KOR KG3 NET User s Manual 4 3 5 31 Port Page It displays I O port list The blue background color means input mode and white means output mode The status of each port are shown with 0 or 17 For the ports with output mode you can change the port output by selecting 0 1 and clicking Update button The red background indicates that the port is in use by network programs TBK R KG3 NET Microsoft Internet Explorer File Edit View Favorites Tools Help E JO search 5 7 Favorites c mh 5 gt gt gt 18 3 kO status TM Cencel Input mode Output mode ate Used Port Analog Input rrr E By clicking the Back link you can go back to Web sample top page X To update the information on the page click Update button TK 78KOR KG3 NET User s Manual 4 3 5 4Web to UART Page It outputs the text entered in the text box of the page to terminal software by clicking Submit TBK R KG3 NET Microsoft Internet Explorer File Edit View Favorites Tools Help 78KOR KG3 NET Web ta UAR T 12345
29. 67890 Back B loons 1 __ 7 By clicking the Back link you can go back to Web sample top page TK 78KOR KG3 NET User s Manual 4 3 5 5UART to Web Page It displays the text entered on terminal software to the browser TBK R KG3 NET Microsoft Internet Explorer File Edit View Favorites Tools Help 3KOR KG3 NET UART to Web ABCDE Back B 0 1 7 By clicking the Back link you can go back to Web sample top page X The browser reload the data in every five seconds TK 78KOR KG3 NET User s Manual This chapter describes how to solve troubles you may face 9 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 J1 on the kit are correct with referring to 3 2 1 J1 Check the power supply to microcontroller 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
30. 97 08 2814 LUM c OUM c c c ojo gt gt P P P gt aig il ad n ba famo famo 49 99 E 140 8 oue 70111170 70778 UU U D U U U U 70 lt 00 1 1 15 1 1 1 1 10 0 SFABSINGRADNNOARS S ieseeeznamjol S A a 222232 e SEE EE 9 0 08 194 2222 2 019S 09d 32 iod 2255 2 5 Lee ES 5 12 ______________ 9934 0 LSE 1oxa exiezid X oana m 1 89942 5 Eos Lx XW NAN 99991 1 48 04 77 ix 99 595 308 o100L 0 d E lt HIOOL Lvd Wd LOMOS ba OL 10IS rvd l Loos Std 8 001 8011 141 1 99 l L Std INTX3 OdLNI OZLd LE dvd QaiNUozngnod 0rld 2 021 S aiNI Lzngiod LeLd OP Ld 0Z19S OZHOSIZrLA l NV SZd NV vZd NV Zd NV LZd 024 OLVQS LOX4 OLIS Od V IxL 0LOS c0d 000 1 L0d 0L19S 0PMOS vOd 0011 004 90 4 9011 1614 LOOL ZOIL SVLd 1 0205 1 9 v L 0 02vas eax ocIs v n Co JQO OO JO JO CO cO J gt gt jo o 1e co 4 on o IN 0 o Uv 70 70 uv A lolol
31. CAH CDH 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 this is the initial code If you forget about the security ID stored in the address of CAH CDH 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 use the 78 Starter Kit Setting for changing the setting to initialize the flash memory at the time debugger launched For details refer to 6 3 8 Erase microcontroller built in flash memory TK 78KOR KG3 NET User s Manual 2 4 2 Output2 Tab Select Output2 tab on Linker Options window and see following settings Linker Options X Library Others v Create Link File p Output File Browse Output Map List km Output Directive File Imaqel kd Output Public Symbol List kp Output Symbol List kI Form Feed at End of List File If Lines Page l 0 Select mirror area w User Option Bytes ab 0 mil DOFFFF H C 1 mil ae Command Line Options a BKURH T
32. Edit Find Layer View Project Build Tool Window Help Files Memo No Workspace For Help press F1 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 DD For details regarding menu bars and tool bars refer to Help menu in on menu bar then PM Help TK 78KOR KG3 NET User s Manual What is a project project is the unit that is managed by 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 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 TK 78K
33. Microsoft Internet Explorer Bl x File Edit View Favorites Tools Help Q gt x Search 5 7 Favorites E Address fe 1192 168 0 200 Go Sample Menu Network address port status Web ta to 1111211 7 Y You could confirm the sample program is working When the page is not displayed check the network address setting of PC Setting example of network address IP address 192 168 0 XXX XXX 0 255 255 255 255 0 more information about the functions that are used in those sample program see Chapter 4 Sample Programs TK 78KOR KG3 NET User s Manual 2 11 Stop Programs Now you are going to stop the program Click the stop button or select on menu bar then Ba ID78KOR QB 78KO0R NET prj dit View Option Run Event Browse Jump Window Help Lu n ejm alale een mi v ile 6 5j Source main c Search _ Watch Quick Refresh Close 25 net_rout ine oid init routine void Initialise 78KBR KG3 hdw init Initialise timer timerB init EI Initialise the uIP TCP IP stack 1160 Initialise the app httpd init Initialise the device driver etherdev init
34. OR KG3 NET User s Manual 5 Read software license agreement and click for continuing the installation To stop the installation click Software License Agreement 3 X Please read the following license agreement Scroll down to see the rest of the agreement USER LICENSE AGREEMENT IMPORTANT READ CAREFULLY This User License Agreement is legal agreement between you either a natural person an entity and MEC Electronics Corporation NEC for the SOFTWARE PRODUCT 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 materials and online or data By installing and using the SOFTWARE FR BLICT you agree to bound by the terms of this ULA If do nat agree to the terms of this ULA do nat install or use the SOFTWARE PRODUCT Do you accept all the terms of the preceding License Agreement install this product you must click Yes to accept If choose Setup will exit lt Back yes Enter the product ID and click The product ID is available on the other sheet InstallShield Wizard l Please enter the product ID of the product xl Enter Product Product ID ig written an the case ar in the accompanying documents Product ID InstallShield Back Cancel 7 It s
35. OR KG3 NET 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 6 Other Information The workspace has information about the build environment for the sample programs Select File on menu bar and Open Workspace Then select 78KOR NET prw under the directory TK78KORYKG3 NETYprjY 1015 File Edit Find Layer View Project Build Tool Window Help New h ini ADDR ea Insert Filer X d Close 4 Open Workspace Glose Workspace Save 5 Save 45 Ghange Source File Mane Save All Source Files Print Preview Print Ctrl P Recent File Recent Workspace Exit Open an existing workspace us ES ud 72 Workspace Look in pri amp t Filename 78KDR NET prw C Files of type Workspace File pr L ancel Help Select 78KOR NET prw then click 2 TK 78KOR KG3 NET User s Manual Workspace name 78KOR NET prw FF 78 NET prw DutPut File Edit Find Layer View Project Build Tool Window Help Xe eges 1 Load the workspace file 78KOR NET prw ES 5 Project group Include Files Project Related Files Other Files Project 4 A peque au The worksp
36. PC before you start using the TK 78KOR KG3 NET 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 78KOR KG3 NET First connect the TK 78KOR KG3 NET to PC with USB extension cable Make sure that the setting of JP1 is the same as below hee Setting of JP1 Jumper Open Supplying power from 232 board 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 TK 78KOR KG3 NET User s Manual 1 3 1 Installation on Windows XP 1 Once the TK 78KOR KG3 NET 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 an Your computer the hardware installation or on the Windows Update Web site with your permission Head our privacy policy P Windows connect to Windows Update to search Select No not this time software
37. TCP IP stack uip_init gt Initialise the app httpd init Initialise the device driver etherdev_init gt Initialise the ARP cache uip arp 11660 The exit confirmation dialog is displayed main c 26 00008 005 2 ID GK R U B 9 This will end your Debugger session Do you mant ta save the settings in the project File 7 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 TK 78KOR KG3 NET User s Manual 2 13 Quit Select File on menu bar then Exit IT 1 fi 78KOR NET prw OutPut 5 x File Edit Find Layer View Project Build Tool Window Help New sj Open Ctrl HO BB kal M inis Insert file Debug Build Close C Program Files NEC Electronics Tools CC78KOR W1 10 bin Save Workspace Compilation complete error s and warning s for ELT CY C Program Files NEC Electronics Tools CC78KOR U1 10 bin c Compilation complete error s and warninqis foi Saye Ctri 5 C Program Files NEC Electronics Tools CC78KOR W1 10 bin c Save As Compilation complete error s an
38. User s Manual TK 78KOR KG3 NET Date published June 2008 Rev 1 1 TESSERA TECHNOLOGY INC 2007 2008 Printed in Japan TK 78KOR KG3 NET User s Manual Windows and Windows XP are registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries information in this document is current as of February 2007 The information is subject to change without notice For actual design in refer to the latest publications of the product data sheets No part of this document may be copied or reproduced in any form or by any means without prior written consent of NEC Electronics NEC Electronics assumes no responsibility for any errors that may appear in this document Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this document or any other liability arising from the use of such products No license express implied or otherwise is granted under any patents copyrights or other intellectual property rights of NEC Electronics or others Descriptions of circuits software and other related information in this document are provided for illustrative purposes in semiconductor product 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
39. ace equipment submersible repeaters nuclear reactor control systems life support systems and medical equipment for life support etc The quality grade of NEC Electronics products is Standard unless otherwise expressly specified in NEC Electronics data sheets or data books etc If customers need to use NEC Electronics products in applications not intended by NEC Electronics they must contact an NEC Electronics sales representative in advance to determine NEC Electronics willingness to support a given application Note 1 NEC Electronics as used in this statement means Electronics Corporation and also includes its majority owned subsidiaries 2 NEC Electronics products means any product developed or manufactured by or for NEC Electronics as defined above CAUTION not give any physical damage to this equipment such as dropping not superimpose voltage to this equipment not use this equipment with the temperature below 0 C or over 40 Make sure the USB cables are properly connected not bend or stretch the USB cables Keep this equipment away from water TK 78KOR KG3 NET User s Manual 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
40. ace file 78 contains one project called 78KOR NET You will use this project 78KOR NET CAUTION Please ignore when you get a prompt saving files could not be found This may occurred when the installation directory is not a default TK 78KOR KG3 NET 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 three settings are covered specifically Outputs from debugging On chip debug Disable 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 1 X Dutput Library Others Load Module File a Output File Name TOROR NE T Output Symbol Informatian put Sy g Create Error List File 8 Output File Hame Jaek Browse 7 v Security ID qi v Or Chip Debug Option Bytes ga K Control Value 85 H ID FFFFFFFFFFFFFFFFFFFF HI EN Start Address 3 00 H 1 024 bytes Allow BSKButes Size B MM Command Line Options ga85h 3FCUDh 1024
41. can open the local variable window Unlike global variables local variables cannot be displayed when programs are running Local Variable 6 3 7 Display memory and SFR contents By clicking the button below you can open the memory window Memory Search al E Refresh 3 4 45 6 7 lt 2 9 9 0017 3 co co co co TK 78KOR KG3 NET User s Manual 6 3 8 Erase microcontroller built in flash memory If you forgot the security ID or if you set On Chip Debug Option Byte to disable the on chip debug function you cannot start debugger For the case like this there is the function to erase the flash memory First 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 Remember the security ID you set 2 Windows Explorer to go to the path C XProgram Files NEC Electronics ToolsYTK driver then open exkOr32ocfg exe the directory path is for the default installation directory The 78 Starter Kit Setting starts Select Erase flash memory at debugger start up at Flash Memory then click 78KOR Starter Kit Setting E ioj x Flash Memory ERASE flash memory at debugger start up Cancel start the debugger As you erased the flash memory with above processes you need to
42. d warning s fol C Program Files NEC Electronics Tools CC78KOR U1 10 bin c Change Source File Name Compilation complete 0 error s and warning s fo Save All Source Files C Program Files NEC Electronics ToolsCC78KORWi1 10 binic Preview Compilation complete error s and warning s foi i C Program Files NEC Electronics ToolsYRA7SKOR W1 10 bin Eti CrP Link complete error s and warningis found Recent File C Program Files NEC Electronics Toolsi RA7SKOR W1 10 bin c Object Conversion Complete warn Build Total Download C TE7G8KOR prj 7BKOR HNET Imf to the error s and Recent Workspace Total warning s 0 4 Exit and prompt to save the files Fs on omn 2 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 6 Other Information TK 78KOR KG3 NET User s Manual In this chapter the hardware of TK 78KOR KG3 NET will be explained 78 11660 78KOR KG3 Microcontroller supply Voltage External main system clock 20MHz Subsystem clock 32 768KHz Internal high speed oscillation clock 8MHz Internal low speed oscillation clock 240 kHz Ethernet controller ASIX AX88796B TK 78KOR KG3 NET Interface EXT 232C Power supply voltage Di
43. driver installation 5 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 TK 78KOR KG3 NET User s Manual 5 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 J1 on the kit are correct with referring to 3 2 1 J1 Check the power supply to microcontroller Check Point 3 If above 2 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 TK 78KOR KG3 NET User s Manual 5 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 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 6
44. eated by user L header css TK 78KOR KG3 NET 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 ID78KOR QB You will use the programs that you prepared in 1 4 Sample Programs the sample programs for TK 78KOR KG3 NET 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 TK 78KOR KG3 NET User s Manual The overall steps are as follows 2 1 Start Load Workspace 2 4 Set Linker Options 2 5 Set Compiler Options 2 6 Greate Load Module Files un Programs 2 9 Start Debugger 2 10 Run Programs TK 78KOR KG3 NET User s Manual Let s start using the development tools First start the Select Windows Start Menu gt Program gt NEC Electronics Tools gt PM V6 307 jif No Workspace DutPut TK 78KOR KG3 NET User s Manual 2 2 What is In 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 15 managed together as a workspace Menu bar Tool bar i PM 4 No Workspace OutPut File
45. ect Tools Save Delete Select RealTime 08 Tool Versions Startup Filet Tool Version Register j Link Directive 7 Setup Source Files 8 Select Debugger 3 Confirmation 8 850 Microcontrollers Only 4 5 Select only Installed Tools RETI E H Please select the Tools from NEC Electronics to be used The following tools have been excluded from selection because they are not installed CC78KOR RA SKOR 1 078 0 SM for 8 Click Detail Setting button TK 78KOR KG3 NET User s Manual Tool Version Detail Setting cem mem joa T JUnused gt Select tools as above screenshot then click New WorkSpace Step 2 9 Select Tools Changed Selected01 78K0R Series Software Package V1 00 E 3 select WS 4 Startup ID78KOR QB Select any Installed 116018 Click New WorkSpace Step 7 9 Setup Source Files select WS Se 4 Startup Hemave 3 Register Model 5 Directive Fre HT Jp Dov Click TK 78KOR KG3 NET User s Manual New WorkSpace Step 8 9 Select Debugger A HD 78K R GB 3 30 78KOR Integrated Debugger select WS 4 Startup 3 Register 5 Link Directive Free C
46. ed TK 78KOR KG3 NET User s Manual 6 3 5 Display global variables while programs are running Global variable could be referred even when the programs are running Select Option menu gt Extended Option Follow below settings Use MINIGUBE Extended Function Monitor Break When Readout f Setting Redraw Interval 500 Right click the variable in watch window while programs are running then select RRM Setting Adi Delete Up cm_WorkLli6 Break when Access ta this Variable Break when Write ta this Variable Break when Read From this variable Clear RRM Setting Setting dialog opens Click button to complete the setting then button to close the dialog RRM Setting Address Size Symbol Get ji Bytes Clase Bytes Restore o r 3 r3 sl Bytes Clear 1 Bytes Delete INN 7 He HE Size Total 1 16 Bytes 1 4 lI This completes the settings CAUTION The maximum size of variable area is as total of 16byte when programs are running The maximum number of variable area is 8 locations The user program momentarilv breaks upon a read TK 78KOR KG3 NET User s Manual 6 3 6 Display local variables Local variable window 15 used to display local variables By clicking the button below you
47. er 232 05081 PO3 RxD1 ROUT RIN P02 TxD1 TOUT 0 RxD1 SDA10 EC P02 S010 TxD1 M Connected to Connected to Pind Connected to 8 Connected to Pin Shel 3 4 5 Universal Area The kit has the universal area Users can use this to develop custom circuit Also There are GND and 3 3V power supply upper and under the universal area TK 78KOR KG3 NET User s Manual In this chapter the sample programs are explained 4 1 Sample Program Overview This is the Web server program that can run with 78KOR built in memory As soon as you get TK 78KOR KG3 NET you can start evaluating the Web server functions When you develop user applications you can refer to the sample code as the source code is available 4 2 Sample Program Structure Sample Software Sample Application Web Sample Application Network Address Display Sample I O Port Display Sample Web UART Display Sample UART Web Display Sample Provided with Source Code For details about the sample programs refer to TK 78KOR KG3 NET Evaluation Kit User s Manual Practice TK 78KOR KG3 NET User s Manual 4 3 Use Sample Programs Following functions are available in the sample application Overview Display Network Address It displays MAC address IP address net mask and gateway of TK 78KOR KG3 NET Control I O Port It controls I O port of TK 78KOR KG3 NET
48. full responsibility of the customer NEC Electronics assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits software and information While NEC Electronics endeavors to enhance the quality reliability and safety of NEC Electronics products customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely To minimize risks of damage to property or injury including death to persons arising from defects in NEC Electronics products customers must incorporate sufficient safety measures in their design such as redundancy fire containment and anti failure features Electronics products are classified into the following three quality grades Standard Special and Specific The recommended applications of NEC Electronics products depend on its quality grade as indicated below Customers must check the quality grade of each NEC Electronics product before using it Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots Special Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerosp
49. g Output Extend Others Startup Routine Change Source Regulation Disable Extensions ANSI Standard A Enable C Comment Ignore from 77 Till End of Line zp Comment Can Mest zc Code of Source SJISI 2s Not Expand Argument and Return V alue zb ELC ze C Mone zn Command Line Options L inicuip 10 40 Apply TK 78KOR KG3 NET User s Manual 2 5 2 Startup Routine Tab Select Startup Routine tab and check Using Library and Using Multiplier The 78KOR KG3 has feature of multiplier to increase those calculation speed TK 78KOR KG3 NET User s Manual 2 5 3 Preprocessor Tab Select Preprocessor tab and enter XincXuip 1 0 Xinc in the Include Search Path Compiler Options Memor Model DataAssign Optimize Debug Output U un TAT H TK 78KOR KG3 NET 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 select Build on menu bar then Build 78KOR NET prw OutPut File Edit Find Layer View Project Build Tool Window Help S t B vekon neT 7 De amp wBid 05 lt E F
50. ides with the latest product tool information and FAQs 6 Exit Terminate the setup 2 Click the Install TK 78KOR KG3 NET 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 KG3 NET 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 Programs gt NEC Electronics Tools 3 Tool Installer l X DeviceFile Install D eviceFile DF 81188 v3 00 Search Tool Install Tools Product CC7EKOR 1 10 11 251KB CC7EKOR 1 10 Documents 14 400KB HATSK OR 1 10 1 10 Documents 11 432KB 56 30 17 30 Documents 12 ID 78K R Integrated Debugger 3 30 3b 384K B ID EKOR QB 363 30 Documents 11 552KB E plain Drive Available Space 69 703 47 2KB Destination Required Space JC AProgram Files NEC Electronics Tools Browse 145 553KB 4 Click when Install comfirmation dialog box is opened gt 22 Install the Tools and DeviceFile Cancel TK 78K
51. iles Memo E i 78KOR NET 1 Project s 6 78KOR NET 1 Source Files 423 Include Files H Q Project Related Files 24 Other Files Build process is executed SS pen Say PM 78KOR NET prw OutPut Dl File Edit Find Layer View Project Build Tool Window Help 999 18 9 recoRNET 7eKOReNET mesa l Files Memo C Program Files NEC Electronics Tools CC78KOR W1 10 bin Compilation complete error s and warning s for C Program Files NEC Electronics Tools CC78KOR W1 10 bin c Compilation complete error s and warning s foi C Program Files NEC Electronics Tools CC78KOR W1 10 bin c Compilation complete error s and warning s foi C Program Files NEC Electronics Tools CC78KOR W1 10 bin c error s and warning s foi ronics Tools CC78KOR W1 10 bin c 4 13500 Build completed normally error An D warnings 2 ronics ToolsYRA7SKORVW1 10bin s and warningis found t ronics Tools RA7T8KOR W1 10 binje erroris and warn 4 5 78 1 Project s 78KOR NET g Source Files 88 23 Include Files H Q Project Related Files gg Other Files Build Total error s 0 Total warning s 0 EOF T Build has been completed successfully TK 78KOR KG3 NET User s Manual TK 78KOR KG3 NET User s Manual 2 7 Check Debugger Settings After the build you sho
52. ished installing the software far this device Click Finish To close this wizard click Finish mw 7 Goto 1 3 3 Completion of USB Driver Installation TK 78KOR KG3 NET 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 File Action View Window Help x 75 se zu OPTZIUL Computer Gap Disk drives E Display adapters TA DVDICD ROM drives Human Interface Devices ic IDE ATA ATAPI controllers Computer Management Local ih System Tools Event viewer Shared Folders Performance Logs and Alerts 3 Device Manager Storage Removable Storage c Keyboards Disk Defragmenter Mice and other pointing devices Find NEC Electronics Starter Kit Disk Management Monitors Virtual UART COMx eee eo eee oe EIS EIS ISI BB Network adapters Ports COM amp LPT F Communications Port COMI Services and Applications 9 Sound video and game controllers M System devices Universal Serial Bus controllers The screen above shows that the COM port number is 8 If ID78KOR QB is not in use you use this port nu
53. its 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 The concrete information set here 15 described on the following pages TK 78KOR KG3 NET User s Manual New WorkSpace Step 1 9 Workspace Information l x Workspace File as follows mat gt gt 1 Workspace Information 2 Select Tools Create Blank Workspace 3 Select Real Time 05 Input the workspace information setting Workspace file name Folder 4 Startup 8 E t test es Browse 5 Register Modeltti Project Group Name oL E Link Directive File Folder Microcontrollers Device Name QCXtest 78KOR NN uPD78F1166 A0 8 Select Debugger 3 Confirmation Device Install 1 8 850 Microcontrollers Only 4 6 Project Group Name no input Microcontroller Name This will set up the basic information about the workspace and the project 18 Device Name uPD78F1166 AO Cancel Help Click button 02011 C test This folder cannot be found Do you wish ta create it X Click button New WorkSpace Step 2 9 Select Tools xl Tool Set 1 Workspace Information STIS Ka Y gt gt 2 Sel
54. lick New WorkSpace Step 9 9 Confirmation 3 Select WS 4 Startup J Register 5 Link Directive Click TK 78KOR KG3 NET User s Manual test prw DutPut inl xl File Edit Find Layer View Project Build Tool Window Help D 2 8 vac gt 9 test Source Files 7 Include Files Project Related Files Other Files Project test was registered 4 4 2 Make File created successfully m 122 gt 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 TK 78KOR KG3 NET User s Manual 6 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 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 mo PM test prw Project Window Oj x File Edit Find Layer View Project Build Tool Window Help s amp X SA vac gt IONS
55. mber for connecting TK 78KOR KG3 NET When you change the USB port connection the COM port number will be changed as well CAUTION Do not do Hardware Modification Scan when you communicate with the target device TK 78KOR KG3 NET User s Manual 1 4 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 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 fi Electronics Microcomputer Development Too s St tu Welcome to the Electronics Microcomputer development tools setup program Before vau execute this installer please exit all windows programs TK 7BK R KG3 MET T1 01 August 22 2007 Copyright IL NEC Electronics Corporation 2007 Readme First Install Documents Sample Pragram ectronice Microcomputer 2 Press the Sample Program button to start the WWW browser TK 78KOR KG3 NET User s Manual Sample Programs Microsoft Internet Explorer File Edit View Favorites Tools Help Back ob fx d Search lej Favorites ca ET gt Address EADOCYSAMPLE E HTML Sample Programs Welcome to TE SE ORE GS NET world The
56. mension Ethernet 10 100Base T RJ 45 USB A Type Connector for debugging Extension connector 40 2mm pitch header socket Connector TK 78KOR KG3 NET 40 2mm pitch header pin RS 232C D SUB 9pin plug Extension I O Same as signal 1 0 of TK 78KOR KG3 NET extension connector AC adaptor input 5V You can use USB bus power when you need to use IK 78KOR KG3 NET stand alone W75xH38xD20mm TK 78KOR KG3 NET W138xH81xD25mm TK 78KOR KG3 NET User s Manual 3 1 TK 78KOR KG3 NET Function Layout CN3 For Debugging L4 e TLISD AA ues f Li ET LI 40 aom TES 1 rr gt m 0 Ja i ka 5 8 1 3N 9X 8098 91 JIIELELELELELIEEEE l 2915 2 vaLio 28 CN2 RJ 45 3 2 TK 78KOR KG3 NET Function Details 3 2 1 J1 JP1 is the jumper switch pin to select power supply When you need to use USB bus power short 1 2 and 3 4 with jumper pins When you use EXT 232C board do not use Jumper pins J1 1 2 Short Supply power to microcontroller by USB bus power Do not use 232 board connected 3 4 Short Supply power to LAN controller by USB bus power Do not use 232 board connected Supply power to the 232 board by AC adapte
57. ng the download destination folder click the button 6 The self extraction sample program set TK78KOR exe is copied to the specified 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 TK 78KOR KG3 NET User s Manual 1 4 2 Overview of Sample Programs The sample programs consist of following directories TK 8KOR L KG3 NET L Yuip 1 0 lib Xprj L Ysrc main c timer c uart c L Ywebserver httpd cgi c httpd fsdata c httpd fs c makefsdata exe L fs 404 html index html lostat nwstat uart2web L web2uart User program directory include files ulP include files Object files of evaluation kit software unable to modify Project files User program source files Main routine file Timer file UART file Web application program source files CGI file that is used in Web contents Web content data file that is produced by makefsdata exe File that is used for displaying Web contents Executable file for creating Web content data file HTML files created by user HTML file for File not found HTML file for top home page CGI files crated by user CGI file for displaying I O port CGI file for displaying network address file for displaying UART to Web file for displaying Web to UART CSS files cr
58. ntations 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 Electronics Microcomputer Development Tools Welcome ta the NEC Electronics Microcomputer development tools setup program Before vau execute this installer please exit all windows programs TK zBKD R KG3 MET 11 01 amp ugust 22 2007 Copyright IL HEC Electronics Corporation 2007 Readme First Documents Sample Prograrn 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 lt 2 gt Install Click Install to start installation of development tools For details please refer to the next section TK 78KOR KG3 NET User s Manual 3 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 X4 Sample Program Click this button to start the WWW browser for the sample program and the tutorial 5 Link to NEC Electronics Microcontrollers Click this button to start the WWW browser display the link to the NEC Electronics Microcontroller web site http www necel com micro index_e html The NEC Electronics Microcontroller web page prov
59. ol olol 5 5 a gt CPN gt Oy t 401970 10 4 5 MOL N LH lt 1 18534 1 59 zH3894 Z 9v1 OW E 02342159 LA TK 78KOR KG3 NET User s Manual V8LL0 29 JequinN jueunooq lt anyo 390809 LOATPLNS AQL ANZZ seo T Nioz Jnor Munro LOZ 4NOL 129 922 522 a EN ES V V 8 da M 50 NS 0 ahs 1 fri 0L ZHWOO0 Sz aewav 4901 i 896 88 190 2 129 217 Ltd 8091 4NL O 809L NL 1591 N V8LON9 V8LON9 21581 L as 1 lia ra 3 N 9 LI VI8vc OSg lf d JOVIMTI ULSY x ONVI 915101 22 N3Sd N3V uso 75 lt 59 lt sau 69 89 oee _ Stas Y LIML ZL zLas 1H ru den HE id N gas 50 108 906 a er N
60. ols Integrated Development Environment IDE 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 C Compiler CC78KOR W1 10 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 10 code size limited version Assembler for the 78KOR microcontrollers The object code size is limited to 64 Kbyte This convert the assembler code for 78KOR into object program The object program will be used for debugger 78KOR Integrated Debugger ID78KOR QB V3 30 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 on Starter Kit USB Driver USB driver for the USB connection with the TK 78KOR KG3 NET and Q Sample program WEB server sample program TK 78KOR KG3 NET User s Manual 1 2 Installation of Development Tools 1 2 1 Installation Package attached CD ROM includes the development tools and documentations Users can use the installer to install those development tools and docume
61. on 0 reside ea eoe 58 94 EXI 22920 Futnouon DetallS trn atte Dae a g ad 08 NECI a 08 S DAR CMT 08 59 34 4 SUI BW 60 LIAN CRSA AAU au e 60 tirer re eer ioter A nne nee 61 4 1 Sample Prosram OVervIeW Ea cadat E 61 2 sample Pftosram e RUE 61 49 Use Sample Programs uide a e a 62 43 AA MT E E A A 62 4 3 2 Equipment Connections ha Ch ee 63 4 3 3 Setting for Network Address 64 434 Setting Tor Serial GommbulleatlOE sed ent ote Een E e e 64 Pror ED CLE G ARTERS TROUBLESHOOTING ____ vr 70 5 1 If you cannot find USB driver when you connect to the 70 5 2 Error when you start the debugger Ok 70 5 2 1 Can not communicate with Emulator F0100 or 0109 71 5 2 2 Incorrect ID Code 60
62. orkspace OutPut File Edit Find Layer View Project Build Tool Window Help New Ctrl 0 x Save As Ghange Source File Name Save All Source Files Print Preview Print Ctrl P Recent File Recent Works pace Exit New WorkSpace dialog opens Create a new workspace i psg Description of items Workspace File Name New WorkSpace Step 1 9 Workspace Information x gt Specify the name of the workspace file that manages Fla the project files 1 Workspace Information 2 Select Tools is automatically suffixed as the file type 3 Select Real Time 05 A project file prj of the same name is 5 Register Project Group Name gister simultaneously created Link Directive File ft Microcontrollers Name Device Name Folder wm Select Debugger 3 Confirmation gt Specify the folder for saving the workspace file by Device Install 8 850 Microcontrollers Only 4 writing its absolute path This item can be selected from a reference dialog box by pressing the button This will set up the basic information about the workspace and the project Project Group Name gt Specify this item if wishing to manage multiple projects together in function un
63. r 3 2 2 ON1 is the extension connector for connecting 232 board With using Samtec TMM 120 01 G D connector 2mm pitch header pin you can connect other boards as well TK 78KOR KG3 NET User s Manual PR SQQ ___ Pao ___ PAymu 4 __ pasion 22 22 jp PA6 INTPI TIOS T605 SSS P120 INTPO EXLVI P140 POLBUZO INTPS PI42 50K20 S01L20 143 5120 8 2 80 20 PI44 S020 1wb Pusmoyr P ymo Po4 SOKIO SOLIV S 7 PI8I 1I6 TOBE PIANB __ 7 7 2 SSCS 7 PIS ANIB 202 PISVANM _ 7 PiN ANOII SSS 38 Power Supply for LAN Controller 3 3V 3 2 3 2 CN2 is the RJ 45 connector for Ethernet 10 100Base T Use cross cable when you connect to PC directly and use straight cable when you connect to router 3 2 4 LAN Controller TK 78KOR KG3 NET User s Manual The board mounts AX88796B LAN controller by ASIX You can make Ethernet communication with IEEE802 3u 100BASE TX from CN2 connector Connection between CPU and LAN controller Signal CPU Pin AX88796B Pin Logic Direction 16 21
64. s found Play Back Electronics Tools RA TSKOR W1 10 bin c Save the Key Operations n Complete erroris and warn Load the Macro File Play Back the Macro File O Total warningi s O Register the Macro Files Play Back the Register Macro 4 k ot Change debugger settings TEN 16 4 TK 78KOR KG3 NET User s Manual Check if ID78KOR QB V3 30 78KOR Integrated Debugger is selected on Debugger Debugger Settings LATE ZSK RSKBISHNETSprsz SE TInt Execute 5 reset ater Laval Bownlaad the Debug Target Files tn the same Project Group Debug Target File List TK 78KOR KG3 NET User s Manual 2 8 Check Board Settings Before connecting the PC and the TK 78KOR KG3 NET with USB you should check the setting of JP1 on the TK 78KOR KG3 NET Set CNI on TK 78KOR KG3 NET and CN on EXT 232C board as shown below JI Setting 1 2 Open 3 4 Open BK R KG34NET 5421 1 1 TR fi Beli cia cia nous PO EO zt iN jii mra Tr ura nra 2 ama Connect AC adapter Connect LAN cable 5 5 5 5 45 5 5 ann oooooooog 5 oooocooooa 00000000g99
65. t 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 PM 78 NET prw OutPut _ Bl x File Edit Find Layer View Project Build Tool Window Help S DEH SR 5 C Program Files NEC Electronics Tools CC78KOR W1 10 bin Compilation complete error s and warning s for 78KOR NET 1 Projectis C Program Files NEC Electronics Tools CC78KOR W1 10 bin c 3 78KOR NET Compilation complete error s and warning s foi H E Source Files C Program Files NEC Electronics Tools CC78KOR W1 10 bin c Include Files Compilation complete error s and warning s foi 9 00 Project Related Files C Program Files NEC Electronics Tools CC78KOR W1 10 bin c Other Files Compilation complete error s and warning s fo C Program Files NEC Electronics Tools CC78KOR U1 10 bin c Compilation complete error s and warning s foi C Program Files NEC Electronics ToolsYRA7SKORAWi1 10 bin Link complete error s and warning s found C Program Files NEC Electronics Toolsi RA78KQB Object Conversion Complete error 4 Y Buila Total error s 0 Total wa ID78KOR QB is launched For Help press F1 16 TK 78KOR KG3 NET User s Manual Configuration dialog is opened 1 Nat
66. tarts copying the files TK 78KOR KG3 NET User s Manual Click when Select Files installation wizard dialog opened NE xi Install Wizard Kind of File 44444 9 When the installation is completed the following dialog opens Click NEC Electronics Starter USB driver must be installed on PC before you connect to IK 78KOR KG3 NET Install the USB driver by referring 1 3 Installation of USB Driver TK 78KOR KG3 NET 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 directorv 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 Kbytes TK 78KOR KG3 NET User s Manual 1 3 Installation of USB Driver Electronics Starter Kit Virtual USB driver must be installed on
67. uld 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 PM 78KOR NET prw DutPut mj x gt File Edit Find Layer View Project Build Tool Window Help Compiler Options Assembler Options 78KORsNET 7BKORsNET m penu Linker Options 9 Object Converter Options Project Window Listconwester optien Files 1 1 Frojectis 18 Electronics Tools4CC78EDR Wi1 10 bin ete error s and warninqis Debugger Settings Register Ex toph Electronics ToolsCC78KDRSW1 10 binc zu Start up plete error s and warninqis fo 2 ons Electronics ToolsCCT8KDRV W1 10361036 File Compare slete D error s and warnin qis Project Related Files Device File Installer Electronics Tools CC7TSEOR W1 10 binie 4 Other Files PM Settings error s and warningi s fo Font Electronics Tools CC 78EOR W1 10 bin c Anes error s and warningi s fo 22 sskNEC Electronics Tools RA7TSEOR M1 10bini Record the Key Operations U error s and warninqi
68. user operator must be grounded using the wrist strap The connectors and or device pins should not be touched with bare hands TK 78KOR KG3 NET User s Manual Contents CHAPTER d PREPARATION ms 8 1 1 Development Tools eed re es e be 9 1 2 Installauonm ot Development Tool sedis riui ddr ette e i n de beer tete hr Utt rd 10 2 Installation i 10 1 2 2 Installation of Development Tools 10 1 9 Installation ot USB E 16 1 9 J Installation on Windows gt 17 1 22 Installation on Windows 2000 Pr nt bt nt 20 1 3 3 Gonmipletion of USB Driver Installation derit tete et teer 23 tA Sampe Prosana ta a 24 111 Preparation f Sample Program tic ti io o HE Io cH tor tie 24 t42 Overview ok Sample ndn 21 CHAPTER 2 EXPERIENGES rcli std re 28 Zu cutn 30 Ze What us M 31 2 3 Load Workspace
69. 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 st E Source 19 00311 Search lt lt gt gt Watch Quick TK 78KOR KG3 NET User s Manual 6 3 3 Set delete breakpoints Breakpoints are executed by clicking lines in which X is displayed B is displayed in the line where a breakpoint is set Breakpoints are deleted by clicking B HE Source main c UCHAR buHL UCHAR t ULHAR butt T TK 78KOR KG3 NET User s Manual 6 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 15 described Right click the variable on source window then select Add Watch Source TGK R Vnice c ucPlau amp Sts ug stop Led Mis ug putput count tatic 1115 autput datal 1 tatic UB PlayMode u32 uilntCoun Symbol u32 uilntCoun 116 usKeyStsC Break when Access Us Break when Write 4 mi Break when Read fr 2 Add Watch dialog opens Click MH ame Add Proper Hes Dec C Oct Bin String C Byte C Word Double Word Number 3Adding a variable to watch window is complet
Download Pdf Manuals
Related Search
Related Contents
Delta A74 Installation Guide Copyright © All rights reserved.
Failed to retrieve file