Home

TK-78K0R/KE3L+USB User Manual

image

Contents

1. A 60 4 3 16 dud RHET cx 60 4 3 17 SUE TT 60 Chapter 5 Troubleshooting 62 b 1 If you cannot find USB driver when connecting the kit 62 5 2 Error when you start the debugger nnanonnannnnannnnnonnnnonnnnrnrnnrnrrnrnrrnrnrrnrnenne 62 5 2 1 Can not communicate with Emulator F0100 or AO TO0 62 5 2 2 Incorrect ID Code EIGU2 ccccccceccccssseecceeseeecseseeecceaseeecsageeeceaeeecseaseeessageeessageeesseaes 62 0 2 3 On chip debug function had been disabled in the device FOC79 63 Chapter 6 Other Information 64 6 1 Create a new Workspace EE 64 6 2 Add one or multiple Projects to a new Workspace rrrnrnnnnnnnnnnnrvnnrvnnennnnnnnn 65 6 3 Add additional Source Files toabroect ccc cecceeeceeeseeeseeeseeeeeeeeeseeees 69 ENE NNN 70 6 4 1 Set delete breakpoints n00nn00nnnennnnannnannnnnnnsnnnnnnnsnrrornrnrnrrsnrronnrrsnrrnrrrnnrrsnrrnrrerrrsnrrene 70 BAZ Display ANNAS 12 6 4 3 Display global Variables while Application is running 73 04 4 Display local Mettelstand FR RUE RR Od 14 6 4 5 Display Memory Content 15 6 4 6 Display Memory Content while Application is running 76 6 4 7 Display of CPU and l O Register Content T1 6 5 Erase microcontroller built in flash memon 78 DO CIRCUIT NEAS ua 83 R20UT0010ED0100 Rev 1 00 xRRENESAS User Manual List of Figures User M
2. E sysmac h i 12 E usbf 8k0r h EE rr R E usbf 78k r ermo h 14 The following segments are defined in this template link file L R usbf78kOr types h Hd optbyte c 16 INTVEC Interrupt vectors usbf78k r c 17 CLTVEC Calltable vectors E usbf78kOr hid c 18 RCODE Code used by C C startup anad run time library Lg C3 Output i 19 77 CODE Code used by non banked EE mgu de and callt functions La 3 78KOR Kx3L HID d26 20 XCODE Code used by _ far func functions 2l NEAR CONST Constants used by near const EI C3 Output 22 FAR CONST Constants used by _ far const D d78knn3 r26 23 SADDR x Variables used by _ saddr Ink 8fl 26 64 xcl 24 NEAR x Variables used by _ near I O main r26 25 FAR x Variables used by far I D opthyte r26 26 NEAR HEAP The heap used by near data model amp Drusbf 8k r r26 E FAR HEAP The heap used by far data model L D usbf78kOr hid r25 2B SWITCH Switch tables used by near code model LL 8KOR Kx3L HID map 29 FSWITCH Switch tables used by near far model 30 DIFUNCT Dynamic initialization vector used by C 3l 32 77 Where _x could be one of i 33 34 Initialized data initvalue 0 or without init value zone fet gg S EE ae SE mil Messages le Itil IAR Universal L
3. mem en r gt mea EE db ded Ti HILD OF h al FR T EN m i DE GE ay kd Tes TEU A iii S nu TPUZ a iG 3 3 u e e Gees Figure 56 T TK T8KORKE3L USB Jumper amp Switches R20UT0010ED0100 Rev 1 00 AS User Manual RENES Hiii e 79 TK 78KOR KE3L USB Other Information 4 Push the Setup button File Device View Help Flash Open OK Mame gt gt ParameterFile Fieading Firmware Success Head FarameterF ile gt gt LoadFile Reading Success read HE file p ter H gt gt COMMAND Device Setup se le Cancel Device Setup Se ae Load file Mame AFTEST DOUT HES Date 2010 03 13 18 45 22 Chksum DADER Ara DODOCRS D FBFFh Connection to device Fort LOM Speed 115200bpe Range Chip Freq Intermal 0SC Multiply 1 00 Setup parameters For the target device Figure 57 WriteEZ5 Setup Button 5 Push the PRM File Read button BE Device Setup X Standard Advance Parameter file Host connection Fort e Speed Operation Made Block End 127 Area Show Addres Supply oscillator Frequency internal SL MHz Multiple rate 1 00 Target Reset Message Figure 58 WriteEZ5 Device Setup Dialogue R20UT0010ED0100 Rev 1 00 xQRENESAS 80 User Manual TK 78KOR KE3L USB Other Information 6 Please select the file 78F1026 prm in the CD
4. Press Key Data i 116 while usbf7Sk r ep status C INTl DEV OK e 117 usbf78k r data send keycode sizeof keycode C INTL e 78K R Kx3L HID fi Tu p Kee ES EN APR si of al el x4 RE foxfFE80 0x10 500 000ffe80 15 06 99 74 91 11 af ad 01 8d a ff 04 02 b cd i kel c amp pu pu T Figure 52 C Spy Display of Memory Content while Application is running R20UT0010ED0100 Rev 1 00 ZENESAS 76 User Manual TK 78KOR KE3L USB Other Information 6 4 7 Display of CPU and l O Register Content The content of CPU and I O registers is displayed in the Register Window select View gt Register ini x File Edit view Project Debug Emulator Tools Window Help Messages Ao 4 vri EH p BYR SJASI SI ISXSEL SIX Workspace Source Browser i E Jet Breakpoints A 94 main routine ceu Registers DI Disassembly i Symbolic Memory 96 void main void RP1 BC 0x0000 Register 97 HRP2 DE O0xDFC8 Watch 98 UINT8 keycode REPORT DATA LENGTH HRP3 HL 0x0D02 99 UINT8 keydata KEY SP OxEOBS8 Locals 100 PC 0x003FD Sa gt on mm Er LI o x 3 dle Live Watch 103 enable interrupt ES 0x00 Quick Watch 104 TIME 1400000 Call Stack io EEE o er Date Clear TIMER 1400000 Terminal I O 106 usbf78k r keytouch flg F SW OFF Key Flag Clear eY LEG TOM T EEEN TIMESTEP 1400000 Gode Coverage dn Profiling 108 while 1 Images 1
5. ST ke E T En DA E KOR ova writer ZS ua d T xt ilL QUE e fel AEWEWNT LEIL TITT LL nr Cla JE C28 U e AAA AAIAAA GA Eu ub E E ouo es ROR JT A JE a E m S i MM 0 0o00 O0 e P 30 0o EEN CW KESCKRKKRRRCRRRRR RRE Figure 24 TK 78KORKE3L USB USB connector USB1 wee d Start the Windows Notepad editor or any other text editor of your choice The alphabet is entered by SW2 operation to the up side pushing SW2 starts the new paragraph as follows M RS cosellant Le T a Cia EI Hi FEET TIT tt eB Wi USB TE 18 Ko KOR oo em Teen UI n LER ER i SPEAKER OUT HL REL Gt N EFrTTHHEET MECH NOUS Li H Mr Lid iv AE LET HELELELLLLLIT tl e iiid UON iie GE Eis i E i SEO 00009000 SOOO OOO See POWER 0O00 ee MN mm Figure 25 TK 78KORKE3L USB switch SW2 T8 TCS00463 2l 81 R20UTOO10EDO100 Rev 1 00 24 NEC S AS 50 User Manual TK 78KOR KE3L USB Experiences Untitled Notepad File Edit Format View Help abcdetg abc Figure 26 Notepad Editor Entering characters similar to Figure 25 confirms that the application is working correctly For more information about the functions that are used in those sample program see USB HID Human Interface Device Class Driver application note 3 9 Stop Application Program To stop the application program either press the Break toolbar button or select the menu
6. Debug gt Break ZE IAR Embedded Workbench IDE E lol xj File Edit View Project Debug Emulator Tools Window Help Da EE EX Belo DENK SD wm amp Be fe VE BD ow od S Disassembly XIM some bz seas 80 cpu init 81 usbf78kOr init 82 return BC efa 8KOR K3L HID Debug DE Mel UINT8 keyd KEY or NTS keydata A KEY D optbyte c 003F9 5104 MOV A HOx04 dere 86 Main function 003FB 9800 MOV SP 0x00 A E usbf 8k0r_hid c rrr init E egen luus el 003FD FDEF03 CALL N init upu enable interrupt 89 Arguments 00400 717 F EI 90 N A memset keycode 0 sizeof keycode Key Data Clear 91 Return values 00403 340800 MOVW DE 0x0008 92 N A 00406 F CLRW BC 00407 AEF8 HOV AX SP 93 Overview 00409 Al INCW AX main routine 00404 Al INCW AX 0040B FD220C CALL N memset usbf78k0r keytouch fl F SW OFF Key Flag Clear VD A DO40E F5C9DF CLRB N usbf7 8k r keytouch flg if usbf78k r keytouch flg F SW ON I 98 UINTS keycode REPORT DATA LENGTH 00411 40C9DFO1 CHP N usbf 8k0r_keytouch_flg 3 UINTS keydata A KEY 00415 DFF BNZ 0x04 T if P7 amp 0x01 0x00 x SW2 UP x 101 initi 00417 8D07 HOY S P SUE 00419 SCH AND A 0x01 0041B Di CHPO enable interrupt 0041C DF67
7. Debug Log Figure 28 C Spy Stop Debugging Button After closing the debug session the Embedded Workbench is back in Edit Mode R20UT0010ED0100 Rev 1 00 ZENESAS 52 User Manual TK 78KOR KE3L USB Experiences 3 11 Close Embedded Workbench To close the Embedded Workbench please use the menu File gt Exit FIAR Embedded Workbench IDE Fie MEAZ TIGRE cpu init usbf78kOr init Save Jave Ms Main function void main void Print SIRGTP Arguments N A Return values N A Overview H usbf78k r types h main routine optbyte c E usbf 8kDr c R 7 usbf78kOr hid c E 3 Output 4 3 8K0R Kx3L HID d26 E Output 3 cl 8knn3 r26 Ink78f1026 64 xcl enable interrupt main r26 D optbyte r26 memset keycode 0 sizeof keycode Key Data Clear D usbf 8kOr r26 usbf78k r keytouch flg F SW OFF Key Flag Clear 3 usbf78kOr hid r26 78KOR Kx3L HID map while 1 UINTS keycode REPORT DATA LENGTH UINTS keydata A KEY initi if usbf7S5k r keytouch flg F SW ON II if P7 e OxOl 0x00 SWZ UP while P7 amp 0x01 Ox00 SW2 OFF WAIT D NEAR CONST LOCATION START 1000 D NEAR CONST LOCATION END DEFF D FAR HEAP SIZE 1000 IAR Universal Linker w5 0 0 2 32 Copyright 1987 2010
8. Look in CQ Ew78K Project a EI ep ES Mu Recent Document 78 K R x E Li ic D i EN Mu Documents Lig ei k Mu Computer WK ei MT Filename rek R Kx3LICDC ewn Places Files of type Project Files ewp sl Cancel Figure 37 EW78K Add Existing Project Dialogue R20UTOO10EDO100 Rev 1 00 24 NE S AS 65 User Manual TK 78KOR KE3L USB Other Information Alternatively you can create a new project by selecting Project gt Create New Project TAR Embedded Workbench IDE File Edit View Project Tools Window Help NEUE Gi Add Files m or eu LN Add Group Import File List Edit Gontigurations VE Hep BUA EE Remove Create Mew Project Add Existing Project ptions ALI E7 Source Code Control b Make Fr ampie STREHE Rebuild All Clean Batch build F Stop Build STRG INTER Download and Bebug STREHE Debug without Beovwaoloading Make amp Restart Debugger STRG E Restart Debugger STRG UMSCHALT E Download p Create a new project and insert it into the workspace Figure 38 Create New Project In following dialogue you can select a template used for the new project If you want to create a new project from scratch manually please Empty Project Create New Project Tool chain Pak Family Project templates x CLIE for 8KLD OF US jan CLIE for ZOE f Pil IM
9. BNZ 0x69 105 memset keycode 0 sizeof kevcode Ge Pon Rud i FO 106 usbf78k0r keytouch flg F SW OFF 00422 Di CHPO 8 00423 DDF9 BZ 0x05 108 while l keycode KEY1 SCAN C x m ms w NEN NEC TUx EST if usbf78k0r keytouch fly F 1 while usbf 78k r ep status C INT1 DEV OK 20 Wu if P7 e 0x01 0x00 SW 00429 5107 MOV A 007 IZ while P7 amp 0x01 0x00 0042B FDOEOA CALL N usbf 78k0r_ep_ status i D 0042E 33 XCHW AX BC m RE 0042F 440000 CMPWV AX 00000 00432 13 MOVW AX BC z nna4233 amp 1FR SUNT gt 78KOR_Kx3L HID Log Mon Jun 21 12 07 22 2010 C SPY Processor Descriptor v4 70 1 50025 for 78KOR Mon Jun 21 12 07 22 2010 C SPY MINICUBE and TK 78 Emulator Driver v4 70 1 50025 for 8KOR Mon Jun 21 12 07 25 2010 Download complete Mon Jun 21 12 07 25 2010 Loaded debugee CA Worky 8KOR KE3L USBYSamples JARYSamplesy78KOR Kx3L USB HIDNEW S8K ProjectDebuglExey 8K0R Kx3L HID d25 Mon Jun 21 12 07 25 2010 Target reset Mon Jun 21 12 07 25 2010 8K0R MINICUBE Executor V1 19 OCD Control Code v2 00 B Device chipname uPD 78F1026 B4 f102554 file version v1 00 Boardinfo 00008004 product id 4100 version firmware version 04 06 keycode KEYl SCAN CODE EA gt ebug Log a D C Ge Ready PT f Z Figure 27 C Spy Break Button R20UT0010ED0100 Rev 1 00 xQRENESAS 51 User Manual TK 78KOR KE3L USB Experiences 3 10 Close C Spy Debug Session
10. EI m ri eed A pam KEN fr E k ARR USB2 LED CNS swi SW4 SW3 FP1 SW2 USB1 Figure 30 Troubleshooting 4 2 Layout of solder short pad and test pad AVREF EVDD Pili P110 P16 RIGHT m m ETE AE EEE EEE et N vlt A WWW P50 P53 P20 P23 P120 P31 Figure 31 TK 78KORKE3L USB pads R20UT0010ED0100 Rev 1 00 AS 55 User Manual RENES TK 78KOR KE3L USB Hardware Specification 4 3 Hardware Functions 4 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 P41 P42 P17 pins in microcontroller 1 In case of using the C Spy debugger use following settings ANT n re forde je nne Debug tr Side Table 5 C Spy Debug Configuration SW1 1 ON The microcontroller runs the programs stored in the flash memory as soon as it gets power supply OFF The microcontroller stays being reset until C Spy started 2 In case of running the programs stored in built in flash memory without using C Spy debugger or debugging the microcontroller with MINICUBE2 use following settings and re supply power 1 12 13 14 15 16 17 18 KOR KOR USB Side or center Table 6 Standalone Configuration Set switch SWA in position center if you use P11 and P12 on the Expansion connector 3 Bit4 is the switch for POWER LED ON If CPU is supplied power LED1 is turned on OFF If CPU is supplied power LED1 isn t turned on 4 Bit5 is the swit
11. New Workspace dialog Select File gt New Workspace TAR Embedded Workbench IDE File Edit view Project Tools Window Help KS steen dj4Y u8Heed4bnwx amp i2 Open k EE Workspace Clase Save Workspace Clase Workspace Save STRG 5 Save Os Save All Page Setup Print STRG P Recent Files k Recent Workspaces k Exit Create a new Workspace Figure 35 EW78K Create new Workspace R20UT0010ED0100 Rev 1 00 stENESAS 64 User Manual TK 78KOR KE3L USB Other Information 6 2 Add one or multiple Projects to a new Workspace After creating a new workspace you can one or multiple existing projects or create a new project Select Project gt Add existing Project TAR Embedded Workbench IDE File Edit view Project Tools Window Help 3 Pe Li i Add Files Add Group Import File List Edit Gontigurations Yue PS UE EE Remove Create New Project Add Existing Project Options AL Tey Source Code Contral 3 Make Fr Compile STRG F7 Rebuild All Clean Batch build F Stop Build STRG 0NTBER Download and Bebug STREHE Debug without Boyvnloading Make amp Restart Debugger STRG E Restart Debugger STRG IMSGHALT4 E Download Add an existing project to the workspace Figure 36 EW78K Add existing Project Select the project file ewp of the project you want to add Add Existing Project to Current Workspace xl
12. To close a debug session please press the Stop Debugging toolbar button IAR Embedded Workbench IDE File Edit View Project Debug Emulator Da digsim Tools Window Help Workspace cpu init 8l usbf78k0r init 82 return chm 78KOR_Kx3L0 v 7 main c PUSH DE SUBW SP 0x0A KI optbyte c mmr es SSS SSeS SS EE SSS SSE SSS EE SESS SSS SSS EE EE EE EE 00 F9 510 MOV A HOx04 de B6 Main function 003FB 9800 MOV SP 0x00 A usbf 8k r hi ee i initi La Output e SES 003FD FDEF03 CALL N init 1 enable interrupt i 89 Arguments 00400 717 F EI 90 N A memset keycode 0 sizeof keycode Key Data Clear 91 Return values 00403 340800 MOVW DE 0x0008 92 N A 00406 F CLRW BC 00407 AEF8 MOVW AX SP 93 Overview 00409 A1 INCW AX 1 94 main routine 00404 Al INCW AX i 0040B FD220C CALL N memset usbf78k0r keytouch flg F SW OFF Key Flag Clear DO40E F5C9DF CLRB N usbf 8k r keytouch flg if usbf78k r keytouch flg SW ON 3 I 98 UINT8 keycode REPORT DATA LENGTH 00411 40C9DFO1 CHP N usbf 8k r keytouch flg 4 i 99 UINT8 keydata KEY 00415 DFFA BNZ 0x04 i if P7 7 amp Ox01 0x00 x SW2 UP x 101 initt 00417 8D07 MOV A S P 00419 5C0
13. fol of Code main c 105 5 Code main c 115 17 Figure 47 C Spy deactivated Breakpoint User Manual TK 78KOR KE3L USB Other Information 6 4 2 Display global Variables Global variables are displayed in the Watch Window select menu View gt Watch Variables can be added either by entering the variable name manually or by selecting the variable and using the Pop up menu Add to watch or by simple drag amp drop the symbol name from Source Code Window to Watch Window IAR Embedded Workbench IDE E 10 x File Edit View Project Debug Emulator Tools Window Help Cea Ss Em o c TY Y w ll GEESS E Workspace Hn usbf78kDr c gt 96void nain void r I Location Type Memory 0xFDFC8 UINTS E CJ 78K R Kx main c optbyte c OE vu UINTS keycode REPORT DATA LENGTH UINTS keydata KEY initi 7 usbf 8k0r 103 enable interrupt Output 104 105 00 Key De 106 i F Sil DEE Key F S Inn Cut 108 whi Copy 109 Paste 110 VERE ON I eun ibid UP 112 Match Brackets 113 Insert Template k 114 Open Header Source File Or 115 fly data ae Go to definition of usbf78kOr keytouch flg C INT1l TET i sizeof 118 Toggle BEE Code eycode 119 Toggle Breakpoint Log C INTl 120 Enable disable Breakpoint sizeof 181 Set Next Statement 122 EY I 123 Quick Watch 124 Add to Watch y 126 Move to PC PUSH 5
14. 8K Here you will find all the information you need to get started tutorials example projects user and ref guides support information and release notes E GETTIHG STARTED Guidelines for setting up your project adding files compiling linking and debugging it mi TUTORIALS Tutorials to make you familiar with the IDE and the features of the IAR C SPY debugger USER GUIDES Complete product documentation in PDF format gives you all the user and reference information you need SUPPORT For questions about how to use your IAR product reporting a problem or finding support resources EXAMPLE PROJECTS Example applications that demonstrate hardware peripherals for specific devices and evaluation boards RELEASE HOTES All about the latest features new device support and program corrections wWwWWw iar com resources Read in depth articles from our software engineers and product managers see video presentations and check the webinar calendar or view the recordings www iar com mypages Create your user account and download product updates from MyPages Here you can also manage your contact information and check your license and SUA status Figure 6 EW78K Start Up R20UT0010ED0100 Rev 1 00 AS 38 User Manual RENES TK 78KOR KE3L USB Experiences 3 2 What is Embedded Workbench for 78K In EW78K application programs and environment setting are handled as a single pro
15. AB INCLUDING ANY OF ITS SUBSIDISRIES AR SYSTEMS UR DISTRIBUTORS ISR DISTRIBUTORS TU YOU THE LICENSEE il accept the terms of the license agreement pint C do not accept the terms of the license agreement Back Cancel InstallShield 9 Read the license agreement accept the terms and click Next IAR Embedded Workbench for Renesas 78K 4 70 1 X Enter User Informat H E Enter pour name the name of your company and pour MAA Embedded Workbench for Renesas TOK license number Mame Company Can be found on the CO cover ar via e mail registration License InstallShield Back Het gt Cancel 10 Complete the form and click Next R20UT0010ED0100 Rev 1 00 AS User Manual RENES Preparation 19 TK 78KOR KE3L USB Preparation IAR Embedded Workbench for Renesas 78K 4 70 1 i Enter License key The license key can be ether your QuickStart key or your permanent key IF you enter the QuickStart key found an the CD cover vau have 30 days to try the product aut IF vau have received the permanent key via email you paste it into the License Kev textbox License 2546 71 4 bb od 74 License Kew Head License key From File E Browse nztallsheld Back Cancel 11 Enter the license key by copy and paste please take care that no linefeed character is included in the license key Click Next Select which program features vou w
16. Breakpoint cece cccceecceecceeeeeeeeeeeeeeceeeseeeseeeseeeseeeseeseesaeees 70 Figure 46 C Spy Breakpoint WINKOW ccccccccecccececeeeseeeaeeceeeceeeceeeseeeseeeseeeseeeeeeseees 71 Figure 47 C Spy deactivated Breakpoint n nnannannnnnnnnnnnnnernnnrnnrnnnnnsnrnrrnrrrrrrrrnrnnennrne 71 Figure 48 C Spy display global Variables rrarrrarrrnrrnnrrarrraneranrranrnarnnernnnrvnnenannnnennnen 72 Figure 49 C Spy display global Variables while Application is running 73 Figure 50 C Spy display local Variables ccccccccccceccseeeeeeeeeeeeeeseeeseeaeeeeeeeseeeeeeseeees 74 R20UT0010ED0100 Rev 1 00 234 NESAS 10 Figure 51 C Spy display of Memory Content 75 Figure 52 C Spy Display of Memory Content while Application is running 16 Figure 53 C Spy Display of CPU and l O Register Content TT Figure 54 C Spy Register le ele EE 77 go VEG c E 78 Figure 56 TK 78KORKE3L USB Jumper amp Switches nnaneannannnnnnnnnnnnnnnnnrnnnnnnnrnnnne 79 Fig re 99 EE Setup Be 80 Figure 58 WriteEZ5 Device Setup Dialogue r anrnannnnnnnnrnanenannnannnnnnnnnnnnrnnnennnenannnnnnnnee 80 Figure 59 WriteEZ5 Parameter File Selection Dialogue 81 Figure 60 WriteEZ5 COM Port Gelechon een 81 FOUG OTCE Frase Bl 82 Figure 62 WriteEZ5 Erase completed euccessfulhy cc cceccceecceeeeseeeeeeeeeeeeneeeeeeeeeeeens 82 R20UT0010ED0100
17. E 0 0 3F9 5 1 0 4 HOV 0x0 4 Dar 86 Main function 003FB 9800 MOV SP 0x00 A usbf 8k r hi i 87 void main void init r 003FD FDEFO3 CALL N init a E Output 1 88 enable interrupt i 89 Arguments 00400 717AFA EI 90 N A memset kevcode 0 sizeof kevcode Key Data Clear 91 Return values 00403 340800 MOVW DE 0x0008 92 N A 00406 F CLRW BC 00407 AEF8 MOVW AX SP 93 Overview 00409 A1 IRCH AX 94 main routine 00404 Al INCW AX 0040B FD220C CALL N menset usbf78kO0r keytouch flg F SW OFF Key Flag Clear 0040E F5C9DF CLRB N usbf 8k r keytouch flg e if usbf 8k r keytouch flg SW ON 1 98 UINTS keycode REPORT DATA LENGTH 00411 40C9DFO1 CHP N usbf 78k0r_keytouch_flg 4 ER UINT8 keydata KEY 00415 DFF BNZ 0x04 100 i if P7 amp 0x01 0x00 x SW2 UP x 101 TY 00417 8D07 MOV A S P init 00419 5C01 AND A 0x01 102 0041B Di CHPO 103 enable interrupti 0041C DF67 BNZ 0x69 104 while P amp 0x01 0x00 0041E 8D07 MOV A S P 105 memset keycode 0 sizeof keycode Key Data Clear 00420 SCH AND 0x01 106 usbf78k0r keytouch flg F SW OFF Key Flag Clear 00422 Di CHPO 107 00423 DDF9 BZ 0x05 108 while 1 keycode KEY1 SCAN CODE keydata om Press Key 109 00425 8800 MOV A SP 0x00 00427 9804 MOV SP 0x04 A 110 if usbf78kOr keytouch flg F SW ON while usbf78k r ep status C INT1 DEV OK 1 lll if P7 e 0x01 Ox00 S
18. IAR Systems AB 3 015 bytes of CODE memory 458 bytes of DATA memory 65 absolute 200 bytes of CONST memory Errors none Warnings none Figure 29 IAR Embedded Workbench Close R20UT0010ED0100 Rev 1 00 ZEN ESAS 53 User Manual TK 78KOR KE3L USB Hardware Specification Chapter 4 Hardware Specification In this chapter the hardware of TK 78KOR KE3L USB will be explained Microcontroller uPD78F1026 78KOR KE3 L External main system clock 20MHz Clock Subsystem clock 32 768KHz Internal oscillation clock 20 8 1MHz PWM output Filter LMV324M NS U13 AMP LM4865M NS U14 Audio Speaker 0 3W for simplified monitoring Jack 3 5mm monaural Filter ON OFF Switchable SW5 Output Volume VR1 USB MINI B USB1 USB Function USB MINI B USB2 Debug Serial communication Expansion connector 50Pin socket x2 pad only CN1 CN2 Connecter for MINICUBE2 FP1 Power Supply Voltage 5V USB or AC adapter 4 ways center push switch SW2 Interface Input output for operation check use Dip switch SW1 The name in brackets is the 7Seg LED U1 U2 name printed on the board Reset switch SW3 Table 4 TK 78KORKE3L USB Hardware Overview R20UT0010ED0100 Rev 1 00 4 NE SAS 54 User Manual TK 78KOR KE3L USB Hardware Specification 4 1 Layout of hardware functions J1 SW5 JP1 VRI JP4 U1 u2 JP JP 3 GN CN3 re t eite aA A har J The Te e qu bee Orrin m e Se THAT EU p i
19. Install to start the installation IAR Embedded Workbench for Renesas 78K 4 70 1 InstallShield Wizard Complete The InstallShield Wizard has successfully installed lH Embedded Workbench for Renesas ZK Kickstart Click Finish to exit the wizard M Launch IR Embedded Workbench X Back Cancel 16 Atthe end of a successful installation please select whether you would like to read the release notes and or to start the IAR Embedded Workbench Click Finish to close the installation tool R20UT0010ED0100 Rev 1 00 xQRENESAS 22 User Manual TK 78KOR KE3L USB Preparation ARS Japanese Welcome to IAR Systems IAR Embedded Workbench Kickstart installation Tou must have a license number and an installation key to install this evaluation version of IAR Embedded Workbench Follow these steps 1 Click the IAR online registration link below to register on the IAR Systems website 2 You will recerye an email with your license number and installation key within a few minutes 3 Click the Install IAR Embedded Workbench link below to start the installation hl IAH online registration 24 Install IAR Embedded Workbench amp Back SIAR SYSTEMS MAAL ISAF Com 17 Click Back to go to the IAR Installation Overview Window Please feel free to test also the IAR Systems Visual State Design tool H Japanese Welcome to IAR Systems LAR Embedded Workbench 4K Kickstart for NEC 78K QuickStart inst
20. Rev 1 00 234 NESAS User Manual 11 TK 78KOR KE3L USB Introduction Chapter 1 Introduction TK 78KOR KE3L USB is the evaluation kit for development with sound systems using 78KOR KE3 L Renesas 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 Figure 1 Debug Configuration Overview This manual consists of the following contents Read chapter 2 and 3 first for installing the development tools and using the sample programs Read chapter 4 6 for customizing the sample programs and the hardware Chapter 2 Preparations Install the development tools Chapter 3 Experiences Experience the basic operations of integrated development environment Embedded Workbench and integrated debugger C Spy with using sample programs Chapter 4 Hardware Specifications Explain the hardware of TK 78KOR KE3L USB Chapter 5 Troubleshooting Describe how to solve troubles you may face such as errors when starting the integrated debugger C Spy Chapter 6 Other Information Introduce other information such as how to create a new workspace project on integrated development environment Embedded Workbench how to r
21. bes TL TITLE Or Description Creates an empty project Figure 39 EW78K Create New Project Dialogue After adding an existing project or creating a new project you have an titled Workspace which has to be saved by File All R20UTOO10EDO100 Rev 1 00 24 NE S AS 66 User Manual TK 78KOR KE3L USB Other Information TAR Embedded Workbench IDE loj x File Edit View Project Tools Window Help De ed S Gia TY x RE SB WE AES d wor ke pace rx 78KOR Kx3LIED C Debug KR El E Untitled workspace CH 78K 0R Kx3L CDC Debug v L_ g FirstProject Debug v Overview SEOR Ks3L CDC FirstProject Figure 40 EW78K Untitled Workspace TAR Embedded Workbench IDE l ial x Fie Edit wiew Project Tools Window Help joe Ayyo ab TAA open d E x l x Close Save Workspace Close Workspace Save STRG 5 Deb ug Save 45 Page Setup Print STRG P Recent Files k Recent Workspaces b Exit Overview ZK UD Kx3L EDE FirstProyect Save all documents ln a NUM 9 ER Figure 41 EW78K Save All In the following Dialogue you can specify the workspace name and the location where it shall be stored R20UT0010ED0100 Rev 1 00 stENESAS 67 User Manual TK 78KOR KE3L USB Save Workspace As Save ir E Ew78K Project t My Recent Documents il Deskto p Mu Document r e d hy Computer a a ei Mu Network Flaces Debug Relea
22. install the driver Windows found click Hest c program files iar syetemsjembedded workbench 6 0 kickstart Bk divers enesas minicube mgbesall int 5 Confirm the found driver by clicking Next Found New Hardware Wizard Completing the Found New Hardware Wizard O MEL Electronics Starter Far Virtual UART Windows has finished installing the software for this device To clase this wizard click Finish Lance 6 Click Finish to close the installation wizard R20UT0010ED0100 Rev 1 00 xQRENESAS 34 User Manual TK 78KOR KE3L USB Preparation 2 3 3 Completion of USB Driver Installation Check that the USB driver is installed correctly Start Device Manager and find NEC Electronics Starter Kit Virtual UART without mark under the Ports COM amp LPT EI Computer Manageme nt ud n Ed Fie Action View Window Help o gt EUR eS 9 P Lei Computer Management Local a OPTZ10L H de System Tools E d Computer H fgu Event Viewer ca Disk drives E Shared Folders ER 3 Display adapters Performance Logs and Alerts D c DYDICD ROM drives 3 Device Manager H Human Interface Devices B S Storage 41 43 IDE ATA ATAPI controllers B Removable Storage E La Keyboards Bie Disk Defragmenter Mice and other pointing devices Disk Management D Monitors H n Services and Applications BS Network adapters E X Ports COM amp LPT Communications Pork COMI 9 EC
23. products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics R20UT0010ED0100 Rev 1 00 User Manual r8RRENESAS General Precautions in the Handling of MPU MCU Products The following usage notes are applicable to all MPU MCU products from Renesas For detailed usage notes on the products covered by this manual refer to the relevant sections of the manual If the descriptions under General Precautions in the Handling of MPU MCU Products and in the body of the manual differ from each other the description in the body of the manual takes precedence 1 Handling of Unused Pins Handle unused pins in accord with the directions given under Handling of Unused Pins in the manual The input pins of CMOS products are generally in the high impedance state In operation with an unused pin in the open circuit state extra electromagnetic noise is induced in the vicinity of LSI an associated shoot through current flows internally and malfunctions occur due to the false recognition of the pin state as an input signal become possible Unused pins should be handled as described under Handling of Unused Pins in the manual 2 Processing at Power on The state of the product is undefined at the moment when pow
24. the security ID you need to erase the flash memory completely To erase the flash memory please follow the steps below WriteEZ5 is installed at 2 2 3 Installation of WriteEZ5 Flash Programmer 1 Start WriteEZ5 by selecting Windows Start menu Programs Renesas Electronics Tools WriteEZ5 V1 00 and WriteEZ5 Evies r Ini xl File Device View Help gt gt Flashllpenning Flash Open DK Name gt gt ParameterFile Heading Firmware Success Head ParameterF ile gt gt LoadFile Reading Success read HEX file mere gt gt COMMAND Device Setup TERES F954 196 gt gt COMMAND Device Setup v r e v1 00 PRIM File Read OK E Load file Mame HFTEST DOUT HES Date 2010 03 13 18 45 22 Chksum DADER Area OO0000k 03FBFFK Connection to device Fort LOM Speed 115200bpe Range Chip Freq Intemal LI 5C Multiply 1 00 Figure 55 WriteEZ5 R20UT0010ED0100 Rev 1 00 xQRENESAS 78 User Manual TK 78KOR KE3L USB 2 Set the switch and the jumper pin on the TK 78KOR KE3L USB as follows Table 11 WriteEZ5 Configuration sis Table 12 WriteEZ5 Jumper Setting Other Information 3 Then please connect the PC to USB2 on the TK 78KOR KE3L USB with the USB cable JOOST pu J OE dde oven da OE ee gene iit SE mi eeh 0027 A i E LT 4 ni EEEF S 9 0 ke SE WEE Le DW ON ako tmm MELLEL EL RITTREETF EL AUREOS Le gt
25. xQRENESAS 32 User Manual TK 78KOR KE3L USB Preparation Found New Hardware Wizard Locate Driver Files Where do vau want Windows to search for driver Files Search for driver files for the following hardware device 4 USB Device The wizard searches for suitable drivers m its driver database on your computer and in any of the following optional search locations that you specify To start the search click Next If you are searching on a floppy disk or CD ROM drive Insert the floppy disk or CO before clicking Nest Optional search locations Floppy disk drives I CD ROM drives I Specify location Microsoft Windows Update Back Cancel 3 Mark Specify a location and click Next Found New Hardware Wizard H X Insert the manufacturers installation disk inta the drive selected and then click OF Cancel Copy manufacturer s files from nch 6 0 Kickstart AOktdrverstrenesas MINICUBE Browse 4 Select the subfolder 78Kdrivers renesas MINICUBE of your Embedded Workbench installation folder using the Browse function and click OK R20UT0010ED0100 Rev 1 00 xQRENESAS 33 User Manual TK 78KOR KE3L USB Preparation Found New Hardware Wizard Driver Files Search Results The wizard has finished searching for driver files for pour hardware device The wizard found a driver for the following device 4 USB Device Windows found a driver for this device To
26. 0 df fa 71 2b c5 d 51 06 9d d9 e4 d8 d fe Od 00 TE ee e e E Q00fel50 8d 44 4b 22 dc 06 df 04 ad 42 46 20 d Oa 20 04 DES ss BF D posovofdfon NMR Z Figure 51 C Spy display of Memory Content R20UT0010ED0100 Rev 1 00 AS User Manual RENES 19 TK 78KOR KE3L USB Other Information 6 4 6 Display Memory Content while Application is running Like the Watch Window the Memory Window is also only updated when the application is stopped To display the memory content while the application is running the Live Memory Window has to be used select Emulator gt Live Memory Instead of the compete memory only up to 16 byte can be displayed IAR Embedded Workbench IDE E Bl Ea File Edit View Project Debug Emulator Tools Window Help D SHalke JYv Yme p ADRAR S e bl S5I EErEE ZEIX i usbf78kOr c T 94 main routine x 95 zzzzcczzccclllllllllllllllllllllllll llllllll llllllll lll llf a FJ 78K0R Kx ER main void E main c 98 UINT8 keycode REPORT DATA LENGTH optbyte c 99 UINT8 keydata KEY CE 100 usbf78kQr gt 101 initi La E Output 102 103 enable interrupt 104 105 NENNEN s rer Data Clear 106 usbf78kOr keytouch flg F SW OFF Key Flag Clear 107 108 while 1 109 110 if usbf k0r_keytouch_flg EF SN DN III if P7 amp 0x01 0x00 SW2 UP ze 112 while P7 e Ox01 OxO0 ille SWZ OFF WAIT 114 THIS keycode KEYl SCAN CODE keydata
27. 0010ED0100 Rev 1 00 xQRENESAS 26 User Manual TK 78KOR KE3L USB Preparation 2 2 4 Installation of Sample Applications Development Kit 16 bit 78KOR USB Install IAR Embedded Workbench for 78k Install MWrtet Zb Pragrammer DEME m um Install TK ZBK HKE3L USB sample Programs Open TK Z8K RKE3L USB User s Manual Open additonal Documentation Exit CtENESAS 1 Click Install TK 78KORKE3L USB Sample Programs TK 78KORKE3L US6 Sample Files Setup E x 234 NES AS THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS SOFTWARE PROGRAM LICENSE AGREEMENT AGREEMENT ANY USE OF THE PROGRAM CONSTITUTES USER S ACCEPTANCE OF THIS AGREEMENT PLEASE READ THIS AGREEMENT CAREFULLY If you do not agree please cancel the installation Mullsoft Install System v2 21 cane 2 Read the license agreement and click I Agree to accept the terms User Manual TK 78KOR KE3L USB Preparation TK 78K RKE3L USB Sample Files Setup Mullsatt Install System v2 21 3 Please select the installation folder of the samples and click Install TK TBK RKES3L USB Sample Files Setup Mullsort Install System v2 21 4 Click Close to finish the installation R20UT0010ED0100 Rev 1 00 stENESAS 28 User Manual TK 78KOR KE3L USB Preparation 2 3 USB Driver Installation NEC Electronics Starter Kit Virtual UART USB driver must be installed on PC before you start usi
28. 026 Version UU Load file Mame RFTEST OU HES Date 2010 03 13 18 45 22 Chksum DADER Area DODODOCOR D3FBFFh Connection to device Port LOM Speed 115 00bps Range Chip Freg Internal OSC Multipl 1 00 Figure 62 WriteEZ5 Erase completed successfully R20UT0010ED0100 Rev 1 00 stENESAS 82 User Manual TK 78KOR KE3L USB Other Information 6 6 Circuit Diagrams Please find the schematics attached to this document To open the attachments view in the Adobe Reader press the paper clip in the lower left corner of the window To open the attachment double click the TK 78KOR_KE3L USB_schematics pdf R20UT0010ED0100 Rev 1 00 AS 83 User Manual RENES
29. 09 Stack 110 if usbf k0r_keytouch_flg F_SW_ON Symbols DE if P7 e 0x01 0x00 SW2 UP 312 while P7 e 0x01 Ox00 Toolbars d dia SW2 OFF WAIT v Status Bar ag DE AE keycode KEYl SCAN CODE keydata Press Key Data 116 while usbf7Sk r ep status C INTl DEV OK e 117 usbf78kOr data send keycode sizeof keycode C INT1 118 memset keycode 0 sizeof keycode Release Key Data 119 while usbf78k r ep status C INTl DEV OK 120 usbf78kOr data send keycode sizeof keycode C INT1 Val keydata T22 if keydata EXCLAMATION KEY 123 keydata KEY 124 H 125 E 78KOR Kx3L HID m 4 SEND Mr ON ar OL f OTIS NITOU r of Open a new Register window Figure 53 C Spy Display of CPU and l O Register Content Please use the list box at the top of the Register Window to select the registers to be displayed CPU Registers Processor clock generation Clock output Port Watch dog timer Watch timer KEN CY ISPO 1 ISP1 1 RESO 0 AC 0 RBS1 F 1 IE Co 0x00 ES Px00 TIHE 1400000 TIHER1 1400000 TIHER 1400000 TIMESTEP 1400000 Figure 54 C Spy Register Window User Manual TK 78KOR KE3L USB Other Information 6 5 Erase microcontroller built in flash memory If the On Chip Debug Option Byte is set to Do not erase data of flash memory in case of failures in enabling on chip debugging and if you forget
30. 1 AND A 0x01 i 0041B5 Di CHPO uns enable interrupt 0041C DF67 BNZ 0x69 P while P7 7 amp 0x01 0x00 1 105 memset keycode 0 sizeof keycode l Key Data Clear ET a mud r EN 106 usbf78k0r keytouch flg F SW OFF Key Flag Clear y 00422 Di CHPO 00423 DDF9 BZ 0x 05 108 vhile 1 ceycode KEY1 SCAN COD keydata Press Key 9 00427 9804 MOY SPlOxU4 i Ux G aed 1f EE ilg E M UN while usbf78k0r e ee LC liri l DEV OK PEDI if P7 amp 0x01 Ox00 SW2 UP 00429 5107 MOV A 0x07 1 AE while P7 amp Ox01 0x00 0042B FDOEOA CALL N usbf78k0r ep status 0042E 33 XCHW AX BC PE oe ee d 0042F 440000 CHEW AX 0x0000 i 00432 13 MOVW AX BC keycode KEYl SCAN CODE keydata d Pr v nn433 b 78K0R Kx3L HID Mon Jun 21 11 46 23 2010 C SPY Processor Descriptor V4 70 1 50025 for 78K0R Mon Jun 21 11 46 23 2010 C SPY MINICUBE and TK 78 Emulator Driver W4 70 1 50025 for 78K0R Mon Jun 21 11 46 26 2010 Download complete Mon Jun 21 11 46 26 2010 Loaded debugee C Work 8KOR KE3L USB Samples_lIAR Samples 8KOR Kx3L USB HID EW 8K_Project Debuq Exe 8K0R Kx3L HID d25 Mon Jun 21 11 46 26 2010 Target reset Mon Jun 21 11 46 26 2010 78K0R MINICUBE Executor v1 18 OCD Control Code v2 00 B Device chipname uPD 8F1025 64 1102664 file version V1 00 Boardinfo 00008004 product id 4100 version A firmware version 04 06 oww a Ready TI f NM Z
31. 127 Run to Cursor gd n 78KOR Kann fol 13 Options gt p n 106 Col 27 Nm Z Figure 48 C Spy display global Variables User Manual TK 78KOR KE3L USB Other Information 6 4 3 Display global Variables while Application is running The C Spy Watch Window is not updated while the application is running To display global variables while the application is running please use the Live Watch Window select menu View gt Live Watch IAR Embedded Workbench IDE B x File Edit view Project Debug Emulator Tools Window Help D Messages elo ell z 4 Y VEV ED p uo Slsewllzie ima2 2 Zz2 lx Workspace Source Browser wexcons P E Lusb zekor c Puis E TURNS gt 96 void na in void Expression Value Location Type Memory 971 Skor Lk Is Memory 0xFD Symbolic Memory 98 UINTS keycode REPORT DATA LENGTH ML are 99 UINTS keydata KEY Register 100 el 101 init Locals 102 Statics na enable interrupt Auto 104 m Live Watch 105 Key Data Clear Quick Watch 106 ETGEN EIER F SU OFF Key Flag Clear Call Stack 107 Terminal I O 108 while 1 Code Coverage 109 Profiling 1 110 if usbf78kOr keytouch flg F SW ON Images De if P e 0x01 0x00 SW2 UP Stack i 112 while P7 amp 0x01 Ox00 Symbols 113 SW2 OFF WAIT 114 Toolbars PERO 115 keycode KEY1_SCAN_CODE keydata
32. 234 NESAS TK 78KOR KE3L USB 1 6 16 bit Microcontroller Starterkit uPD78F1026 All information contained in these materials including products and product specifications represents information on the product at the time of publication and is subject to change by Renesas Electronics Corp without notice Please review the latest information published by Renesas Electronics Corp through various means including the Renesas Technology Corp website http www renesas com Renesas Electronics R20UT0010ED0100 Rev 1 00 www renesas com July 2010 Notice 1 All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website 2 Renesas 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 Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted hereby under any patents copyrights or other intellectual property rights of
33. DItonol e 1 Set P111 to Low then High P2 Oxa4 PS Ox 44 gt gt 4 Set data for 2 in P2 and P5 PLI Dut4noQg 07 PLI bit no0 1 Set P110 to Low then High P2 OXT 9 P5 0xf9 gt gt 4 Set data for 1 in P2 and P5 ER DitenoO 07 PMLI bit nol 0 Set P110 111 to output mode PM5 Oxf0 Set lower 4bit of P5 to output mode PM2 Oxf0 Set ower Abit of P2 to output R20UT0010ED0100 Rev 1 00 a NESAS o9 User Manual TK 78KOR KE3L USB Hardware Specification 4 3 10 CN1 CN2 These are the connecters for expansion connections The connecter is not installed HIROSE ELECTRIC CO LTD HIF 3H 50DA 2 54DSA 4 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 4 3 12 J1 This is the jack for external speakers Connect a speaker when you play sound Support jack 3 5mm monaural 4 3 13 VR1 This is the audio output volume control If the audio mute is set then audio is not output 4 3 14 USB1 This is the USB connecter for the USB function controller 4 3 15 USB2 This is the USB connecter for the debug serial communication It is found as NEC Electronics Starter Kit Virtual UART 4 3 16 FP1 This is the interface for connecting MINICUBE2 4 3 17 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 t
34. J eli sel of z 4 YEE p BUR A2 7 optbyte c DO usbf 8kOr c 7 usbf 8k r hid c EI 3 Output 3 78KOR Ko3L HID d26 L B 78KOR_Kx3L HID map Figure 10 EW78K Workspace Loaded Experiences 42 User Manual TK 78KOR KE3L USB Experiences 3 4 Build Application To build the application use either the Make button of the tool bar select the menu item Project gt Make or use the keyboard and press F7 key 2 IAR Embedded Workbench IDE File Edit View Project Tools Window Help Deng alelo JY Y 3 YE ED m 4 amp D f ZS EE SN main c x 7 optbyte c c usbf 8k r c c usbf78kOr hid c EI E Output D 8KDRP Kx3L HID d25 L B 78KOR_Kx3L HID map 78KOR Kx3L HID Make the active project buld files as needed 000000 FBmesSWams0 mm Z Figure 11 EW78K Make All build messages can be seen in the Messages Window Copyright 1987 2010 IAR Systems AB 3 015 bytes of CODE memory 458 bytes of DATA memory 65 absolute 200 bytes of CONST memory Errors none Warnings none Total number of errors 0 Total number of warnings 0 J Errors 0 Wangen C Nmf Z7 Figure 12 EW78K Message Window What is the difference between Make and Rebuild Make and Rebuild are functions creating an executable file from source files in a project Compiling assembling linking and other processing actions are performed automatically To reduce the time for the build make detects and compiles ass
35. Jun 21 11 46 26 2010 Download complete Mon Jun 21 11 46 26 2010 Loaded debugee CYWorky 78KOR KE 3L USBISamples JARYSamplesy 8KOR Kx3L USB HIDNEW 8K ProjectDebuglExel BKOR Kx3L HID d26 Mon Jun 21 11 46 26 2010 Target reset Mon Jun 21 11 46 26 2010 78KOR MINICUBE Executor V1 18 OCD Control Code V2 00 B Device chipname uPD 8F1025 B4 f102554 file version V1 00 Boardinfo 00008004 product id 4100 version firmware version 04 06 Figure 20 C Spy Debug Session After the download the application is started automatically and stopped at the beginning of the main function To disable the automatic start and run to main please unmark this feature in the debugger options setting see Figure 16 R20UTOO10EDO0100 Rev 1 00 ZEN ESAS 48 User Manual TK 78KOR KE3L USB Experiences 3 8 Run Application Program To run the application program either press the Go toolbar button select the menu Debug gt Go or use the keyboard and press F5 IAR Embedded Workbench IDE i lol xl File Edit View Project Debug Emulator Tools Window Help Osga relo g cl 5 5 5 V Blom 5 93252 Ax BQeour x EE Dx 80 cpu init Goto v Memory B 81 usbf78k0r init i 82 return fem 78KOR_Kx3L 93 003F6 C5 PUSH DE E main c 84 003F7 200A Se SUBW SP 0x0A lo tbyte c UINTS keydata A KEY p Li 85 ffa z n n nEnn En En n E E En E EEEE EEE EE
36. NT1 118 memset keycode 0 sizeof keycode Release Key Data 119 while usbf78kOr ep status C INTL DEV OK E 78KOR_Kx3L HID fol 4 r Code 2 main c 105 5 Code 2 main c 115 17 ui del Les m m iD dan co Figure 46 C Spy Breakpoint Window Breakpoints can be delected or deactivated in Pop up menu of the Breakpoint Window A deactivated breakpoint is marked as a non filled red circle in the source code window IAR Embedded Workbench IDE File Edit View Project Debug Emulator Tools Window Help SET ME Medl JYY E ese SielL5itiz main amp 96 Es 9 i 98 UINTS keycode REPORT DATA LENGTH H 78KOR_KAL HID SE 99 UINT8 keydata KEY 7 main c 100 E optbyte c 101 init E usbf 8kOr c 102 7 usbf78kOr hid c 103 enable interrupt Lg 73 Output 104 ios EEE onem Data Clear 106 usbf78k r keytouch flg F SW OFF Key Flag Clear 4 ar 108 while 1 109 i dB if usbf78k r keytouch flg F SW ON 111 if P7 e 0x01 Ox00 SW2 UP ze P ale while P7 e 0x01 Ox00 4 113 SW2 OFF WAIT 114 O TIS keycode KEYl SCAN CODE keydata Press Key Da ji abe while usbf78k r ep status C INTl DEV OK TET usbf78k r data send keycode sizeof keycode C_INT1 118 memset keycode 0 sizeof keycode Release Key Data LS while usbf78k r ep status C INTl DEV OK 78KOR Kx3L HID
37. P Printer Port LPT1 ZEE oo MEC Electronics Starter Kit Virtual DART COME B Processors 7 8 Sound video and game controllers fl d System devices E Universal Serial Bus controllers Figure 3 Device Manager Entry The screen above shows that the COM port number is COM8 If IC Spy is not in use you can 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 Do not do Hardware Modification Scan when you communicate with the target device R20UT0010ED0100 Rev 1 00 xQRENESAS 35 User Manual TK 78KOR KE3L USB Preparation 2 4 Sample Programs This section explains the overview and preparation of sample programs For details about the sample programs see the two corresponding application notes Application Note USB HID Human Interface Device Class Driver Application Note USB CDC Communication Device Class Driver The sample programs consist of following directories Folders c3 TE FEKORKESL US6 Samples El Gy 78KOR Kx3L USBUCDE IG Ew78K Project E CO Debug CH Exe IG List CO obj E Release CH Exe OO List 3j Ob ie settings 9 include EI IG inf IG xP IG src E CH FOKOR Kx3L LISBEHID El CH EWw T8K Project E 2 Debug CH Exe OO List OO Ob E Release CH Exe OO List CO Obj CH settings 9 include IG src Figure 4 Sample Directories O 78KOR Kx3L LISB CDCA E 78KDR Kx3L LISB HID i
38. ROM directory WriteEZ5 PRM78F1026 V100 for 1026 pr Parameter Filez o prm el T Figure 59 WriteEZ5 Parameter File Selection Dialogue 7 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 Show amp ddres Figure 60 WriteEZ5 COM Port Selection R20UT0010ED0100 Rev 1 00 ZEN ESAS 81 User Manual TK 78KOR KE3L USB Other Information 8 Erase The deletion of the flash memory begins when the button is pushed Baatz enm File Device wiew Help 4B En gt FlashOpenning Flash Open OK Mame gt gt ParameterFile Heading Firmware Success Head ParameterFile gt gt LoadFile Reading Success read HEX file gt gt COMMAND Device Setup PAM File Read UF Parameter file Mame FoF 1026 Version WTO Load file RARFTEST_0001 HE 2010 03 19 18 45 22 DADER O00000h 03FBFFK Connection to device Fot COMF Speed 115200bp Range Chip Freg Intermal 0SC Multiply 1 00 k d k Erase the target device Figure 61 WriteEZ5 Erase Button 9 If Flash EEPROM has been erased successfully chip erase finish will be displayed ES writeEz5 Joj x File Device View Help gt gt COMMAND Erase Device Flash Blank Checking Mame D78F1026 Flash Erasing Firmware 1 00 chip erase finish Parameter file Mame FoF 1
39. Renesas Electronics or others 3 You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part 4 Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information o When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations 6 Renesas Electronics has used reasonable care in preparing the information included in this document but Renesas Electronics does not warrant that such information is er
40. Security ID entry area at the start of debugger Check Point 1 Enter correct security ID and click OK on the configuration window Check Point 2 If you forgot the security ID you have to erase the microcontroller built in flash memory Before erasing check if you actually set the security ID in your application 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 R20UT0010ED0100 Rev 1 00 4 NE SAS 62 User Manual TK 78KOR KE3L USB Troubleshooting 5 2 3 On chip debug function had been disabled in the device F0c79 This error occurs when the value at address 00C3H 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 in your application 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 R20UT0010ED0100 Rev 1 00 4 NE SAS 63 User Manual TK 78KOR KE3L USB Other Information Chapter 6 Other Information 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 Now create a new workspace and project The Embedded Workbench allows you to create a new workspace with following
41. W2 UP 00429 5107 MOV A 0x07 112 while P7 e 0x01 0x00 0042B FDOEOA CALL N usbf78k0r ep status 0042E 33 XCHW AX BC SW2 OFF WAIT T 0042F 440000 CHEV AN 0x0000 00432 13 MOVW AX BC 1 keycode KEYl SCAN CODE keydata Pr nna 4a3 AIFA SENT hd 78KO0R Kx3L HID gt D x casco AU We EM E Mon Jun 21 11 46 23 2010 C SPY Processor Descriptor v4 70 1 50025 for 78KOR Mon Jun 21 11 46 23 2010 C SPY MINICUBE and TK 78 Emulator Driver v4 70 1 50025 for 78K0R Mon Jun 21 11 46 26 2010 Download complete Mon Jun 21 11 46 26 2010 Loaded debugee C WorklV8K0R KE3L USBYSamples JARYSamplesy78KOR Kx3L USB HIDAEW 78K ProjectDebugYExel 8K0R Kx3L HID d25 Mon Jun 21 11 46 26 2010 Target reset Mon Jun 21 11 46 26 2010 78KOR MINICUBE Executor v1 18 OCD Control Code v2 00 B Device chipname uPD 8F1026 64 f102664 file version MI UU Boardinfo 00008004 product id 4100 version A firmware version 04 06 BY Debug Log 8i xX Ready PT wl Figure 21 C Spy Go Button When the application is running the Go button and all single step buttons are disabled ES ESSEN Figure 22 C Spy Application Control Buttons Run Mode EAR RAR Figure 23 C Spy Application Control Buttons Stop Mode R20UT0010ED0100 Rev 1 00 xQRENESAS 49 User Manual TK 78KOR KE3L USB Experiences Connect the PC to USB1 on TK 78KOR KE3L USB with USB cable while the application is running E Wy FEET MEN
42. _RAM v z AX as 000 e000 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd 000 e010 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd ed 000fe020 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd ce 000 e030 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd 000f amp e040 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd 000fe050 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd ce 000fe060 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd 000fe070 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd ecd 000fe080 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd ce 000fe090 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd ecd 0 00fe aU cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd ecd J OO0fe0b0 cd cd 3f fd 01 03 00 46 04 cd cd cd cd cd cd cd Dir ERE JE 000fe0c0 01 df c8 df 00 00 37 01 00 cd OO 00 71 la c5 00 PTT PENI O00fe0d0 00 00 71 1b cS d 71 la cS OO 00 00 71 1b cS 00 pei ele eas Gr 000 e0e0 OO 00 71 la cS d ce cO a5 ce ca 01 ce ca fe ce ei ata aoe aos habe 000fe0f0 ca 01 di ce cl a5 ce ca 00 ce ca f ce ca OO di 000fe100 70 ce cl aS 9e c4 7c ff Je c4 60 Je c4 d 6 bl Bess PELLUS 000fe110 be ce be cc d af c4 00 be ce af c2 00 be co d 000fe120 8b 08 8c 01 be ce 8c 02 08 8c 03 be cc d e8 36 6 000fei30 8 37 82 71 2a c5 93 df 03 92 dd 06 93 df fd 92 GE DP 000fel4
43. allation information Install IAR Embedded viride L Install visualS TATE Release notes View the product documentation Install Adobe Acrobat Reader Explore the CD SIAR SYSTEMS MAA ISAF COM 18 Click Exit to close the IAR Installation tool R20UT0010ED0100 Rev 1 00 xQRENESAS 23 User Manual TK 78KOR KE3L USB Preparation 2 2 3 Installation of WriteEZ5 Flash Programmer Development Kit 16 bit 78KOR USB Install IAR Embedded Workbench for 78k Install WriteE25 Programmer Install TK ZBK RHKES3L USB Sample Programs Open TK Z8K RKES3L USB User s Manual Open additonal Documentation Exit gt row 434 NE S AS 1 Click Install WriteEZ5 Programmer WribeEZA5 v1 00 r3 Setup X This will install WriteE 5 Do you wish to continue 2 Click Yes to continue the installation User Manual TK 78KOR KE3L USB Preparation WiriteEZ5 1 00_r3 Setup ial xl License Agreement Please review the license terms before installing WriteEZ5 a LE NESAS VLOO r Press Page Down to see Ehe rest of the agreement THE ACCOMPANYING PROGRAM I5 PROVIDED UNDER THE TERMS OF THIS SOFTWARE PROGRAM LICENSE AGREEMENT AGREEMENT ANY USE OF THE PROGRAM CONSTTIUTES USER S ACCEPTANCE OF THIS AGREEMENT PLEASE READ THIS AGREEMENT CAREFULLY If you do not agree please cancel the installation IF you accept Ehe terms of the agreement click I Agree to continue You must acce
44. ant installed Recommended for advanced users InstallShield Back Cancel 12 Select Complete and click Next R20UT0010ED0100 Rev 1 00 xQRENESAS 20 User Manual TK 78KOR KE3L USB IAR Embedded Workbench for Renesas 78K 4 70 1 E hoose Destinatior ETE m trer ium m GA H l I Las ad Tei il Install IQR Embedded Workbench for Renesas 78k Kickstart to Ch Embedded Workbench 6 0 kickstart Change InstallShield Setup will add program icone to the Program Folder listed below You may type a new folder name ar select one from the existing folders list Click Nest to continue Program Folder LOR Embedded workbench for Renesas f8k 4 70 Kick start Existing Folders Accessones AchvePerl 5 8 8 Build 813 Administrative Tools Atmel AVR Tools Attribute Changer Aven Zweckform Wind abel C and C Code Counter LO BurnersP Install hreld Back Cancel 14 Click Next R20UT0010ED0100 Rev 1 00 AS User Manual RENES Preparation 21 TK 78KOR KE3L USB Preparation IAR Embedded Workbench for Renesas 78K 4 70 1 X nc 7 Ready to Install the Hedy DO Stall Lie I mE Irie IW zard LE PAD Click Install to begin the installation IF pou want to review or change any of your installation settings click Back Click Cancel to exit the wizard InstallShield Cancel 15 This is the last possibility to modify the installation options Click
45. anual Figure 1 Debug Configuration cccccccceccceecsecceeece cece eeseeeaeeeeeeceeeseeeseeeseesaueeeeeeeesaeeas 12 Elgure 2 USD CONOCIO ne MEET ENS 29 FOUG Device Manager EN ee 35 Figure 4 Sample DENE EE 36 Figure 5 Overall Steps to Start a Debug Session rrrrnrrnarrnarrvarenannnarnnernnnrnnnennnnnnnnnnnn 37 Figure 6 EW78K GtartUlp ENEE 38 Fer EN RMN NIS vr 39 Figure 8 EW78K Open Workenace r diin Erddi 41 Figure 9 EW78K Open Workspace File Selection Dialogue 42 Figure 10 EW78K Workspace Loaded eese nennen nnns 42 Figure TT EV TON NE 43 Figure 12 EW78K Message Window seeseeseeeeeeneen nennen nnne nnne nns 43 Figure 13 EW78K General Project Options rrarrrarnnnnnnnrnnnenanerannnannnannnernnnrnnnnnannnannneen 44 Figure 14 EVV TOK Compiler ODHWOFISasvssesesdveexsesdvesxsasiaus urn NEEE EEEE OEE EEEIEI YER 44 Figure 15 EW78K Linker Options rrrrnnrnanenanenannnannnnnnnnrnnnenannnannnannnnsnnnrnnnenannnannnnsnnnee 45 Figure 16 EW78K Debugger Options rrarrnanrnannnannnnnnnnrnanenanenannnannnarnnnrnnnenanenannnasennee 45 Figure 17 TK 78KORKE3L USB Jumper amp Switches ccc cccccececeeeeeeeaeeeeeeeeeeeeeees 46 Figure 18 IAR Embedded Workbench Download and Debug 47 Figure 19 C Spy Hardware Setup Dialogue cccccccceccseeceeeceeeceeeceeeeeeseeesaeeseeeseeens 48 Figure 20 C 5py Debug SESSION EE 48 Fi
46. ations equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality 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 aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life 8 You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges 9 Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use condi
47. catian c Deskto p My Documents Te kel hy Computer MT File name usbfz8k r c Places Cancel E Files of type Source Files co cpp ec AS hppz s mesa Figure 44 EW78K Add Files Dialogue R20UT0010ED0100 Rev 1 00 AS User Manual RENES Other Information 69 TK 78KOR KE3L USB Other Information 6 4 Debugger Tips 6 4 1 Set delete breakpoints A breakpoint at a specific source line can be defined either by moving the cursor to the source code line and pressing the key F9 Or moving the cursor to the source code line open the pop menu by right mouse button click and selecting Toggle Breakpoint CODE Or using the Breakpoint Definition Dialogue An active breakpoint is marked by a filled red circle in the first row TAR Embedded Workbench IDE E Bl x File Edit wiew Project Debug Emulator Tools Window Help Dae i SBlo TY vu He PSNR SH lS ale ae 86 Main function 87 void maint roid EI E 78KOR Kx3L HID v TO 69 Argumenta optbyte c 90 N A usbf SkOr c 1 8 Return values usbfzBk r hid c 98 N A Lg 73 Output 83 Overview 94 main routine MEL M EP 96 void nmain void ai 98 UINTS keycode PEPORT DATA LENGTH 29 UINTS keydata EET 100 101 initi laue 103 enable interrupti 104 ios NESEN ker Date Clear 106 ushf78k r keytouch flg F SW OFF f Key Flag Clear 7 107 108 while 1 109 110 if usbf78
48. ch for the audio mute ON Audio output is muted by P310utput low OFF Non audio mute 5 The bits 6 8 are connected to P41 P42 P17 pins of the 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 6 7 18 Table 7 SW1 Bit 6 8 R20UT0010ED0100 Rev 1 00 xQRENESAS 56 User Manual TK 78KOR KE3L USB Hardware Specification 4 3 2 SW2 INTPO SW2 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 mo o mw e P74 KR4 INTP8 RIGHT P73 KR3 Table 8 SW2 Pin Functions ALPS SKRHADE010 4 3 3 SW3 RESET SW This is the reset switch You can reset the microcontroller by pressing this switch 4 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 oller Figure 32 SW5 Filter Setting 4 3 5 JP1 JP1 is th
49. e installation B IAA online registration KE Install IH Embedded Workbench qm Back SIAR SYSTEMS AM DE com 4 Click TAR online Registration R20UT0010ED0100 Rev 1 00 AS 15 User Manual RENES TK 78KOR KE3L USB Preparation Product Registration LAR Embedded Workbench for NEC 7BK v 3 62 4K RKickstart Edition When vou have registered below you will receive an e mail containing informabon that is required to install the software Please make sure to spell your e mail address correct First name Last mamie mn already a customer of AR Systems Company n Pen Country and State Provines Please specify Sreet Address P O fox Submit registration By registering vou accept io receive infarmalion fram IAR Systems in the future IAR Systems website 5 Complete the form and submit the registration Within some minutes you will get the following email R20UT0010ED0100 Rev 1 00 xQRENESAS 16 User Manual TK 78KOR KE3L USB nareply wew iar com gt TAR Systems To software suppart euflm renesas com CE Sent by noreph www itar com 15 06 2010 09 02 Subject Product registration l r Embedded Workbench for MEC 78K v 4 62 Ak Kickstart Edition Dear Developer We have received your web registration for the product IAR Embedded Workbench for HEC FSK v 4 62 4E Kickstart Edition Please confirm this regi
50. e 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 R20UT0010ED0100 Rev 1 00 xQRENESAS 57 User Manual TK 78KOR KE3L USB Hardware Specification 4 3 6 JP2 JP3 JP2 JP3 are jumper switch pin for selecting the power supply to the CPU JP2 JP3 1 2 short 1 2 short USB power supply from USB2 connecter 2 3 short 2 3 short USB power supply from USB1 connecter 2 3 short AC adapter power supply from CN3 connecter Table 9 Power Supply Configuration 4 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 4 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 on SW1 R20UT0010ED0100 Rev 1 00 4 NE SAS 58 User Manual TK 78KOR KE3L USB Hardware Specification 4 3 9 U1 U2 7 segment LED U1and U2 are 7 segment LED By setting the 7 segment LED output data in P20 P23 and setting P50 P53 from Low to High the data is latched and the 7 segment LED displays the data P20 P23 P50 P53 P110 P111 Example of data and its display po 060 EN 1 o P50 p29 9 os P23 CH Figure 33 7 Segment LEDs To display 1 on U1 and 2 on U2 ELT ten U Pll
51. egister additional source file and some useful tips of the integrated debugger The circuit diagrams of demonstration kit are included in this chapter Reader 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 languages and the Windows operating system Purpose This manual is intended to give users an understanding of the features hardware configurations development tools for the 78KOR R20UT0010ED0100 Rev 1 00 4 NE SAS 12 User Manual TK 78KOR KE3L USB Preparation Chapter 2 Preparation 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 2 1 Development Tools Software e Integrated Development Environment IDE Embedded Workbench for 78K V4 70 The IDE works on Windows operation system Users can develop a system efficiently by using the editor compiler and debugger e C Compiler ICC78KOR V4 70 1 code size limited version C compiler for the 78KOR microcontrollers The object code size is limited to 4 KB This compiles C code for 78KOR and ANSI C code program into object code e A
52. embles only the files that have been updated from the previous build process whereas rebuild compiles and assembles all the source files R20UT0010ED0100 Rev 1 00 RENESAS 43 User Manual TK 78KOR KE3L USB Experiences 3 5 Tool Configuration After getting familiar with the development environment you can modify the configuration according to your needs All options for the assembler compiler linker and debugger can be modified in the menu Project gt Options Options For node 78K0R Kx3L HID E x Category CIC4 Compiler Assembler Custom Build Target Output Library Configuration Library Options Stack Heap Lal Build Actions Linker Device Code model Debugger Nex I S M IE 78 78KOR uPDTBF1026 64 e IECLIBE Data model MINICLIBE Ho BI MUL ner ES Simulator Near constant location T Start address Size Kbytes De Minor ROMO zl noon 51 75 Code banking Heg address Moor banks Bank address Bank size Kbytes 0x8000 fe Figure 13 EW78K General Project Options Options for node 78K0R Kx3L HID EN X Category Factory Settings Multi file Compilation Discard Unused Fublics General Options i C1C Compiler Assembler Custom Build Language Optimizations Output List Preprocessor Diagnostic A Build Actions Linker Debugger IE 78 E Standard with IAA extensions IECLIBE Gre Standard MINICUBE A
53. er is supplied The states of internal circuits in the LSI are indeterminate and the states of register settings and pins are undefined at the moment when power is supplied In a finished product where the reset signal is applied to the external reset pin the states of pins are not guaranteed from the moment when power is supplied until the reset process is completed In a similar way the states of pins in a product that is reset by an on chip power on reset function are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified 3 Prohibition of Access to Reserved Addresses Access to reserved addresses is prohibited The reserved addresses are provided for the possible future expansion of functions Do not access these addresses the correct operation of LSI is not guaranteed if they are accessed 4 Clock Signals After applying a reset only release the reset line after the operating clock signal has become stable When switching the clock signal during program execution wait until the target clock signal has stabilized When the clock signal is generated with an external resonator or from an external oscillator during a reset ensure that the reset line is only released after full stabilization of the clock signal Moreover when switching to a clock signal produced with an external resonator or by an external oscillator while program execution is in progress wait un
54. ew 00409 A1 INCW AX main routine 00404 Al INCW AX 0040B FD220C CALL N memset usbf7 8k0r keytouch flg F SW OFF Key Flag Clear DO40E F5C9DF CLRB N usbf78k r keytouch flg if usbf78k r keytouch flg F SW ON I UINTS keycode REPORT DATA LENGTH 00411 40C9DFO1 CHP N usbf78k0r keytouch flg 3 UINT8 keydata KEY 00415 BNZ Ox04 0x00 Zon SW2 UP x eris 00417 MOV A G Pi initi 00419 A 0x01 0041B CMPO A enable interrupt 0041C DF67 4 0x69 BNZ while P amp x01 7 MOV 0x00 1 memset keycode 0 sizeof keycode p Key Data Clear Mm Sin ND FU usbf78k0r keytouch flg F SW OFF Key Flag Clear 00422 Di CHPO 00423 DDF9 BZ 0x 05 while 1 keycode KEY1 SCAN CODE keydata Press Key 00425 8800 MOV A SP 0x00 n 00427 9804 MOV SP 0x04 A I Mabe Teer keytouch Ely we F SUOMI while usbf78k0r ep status C INT1 DEV OK if P7 e 0x01 0x00 SWZ UP 00429 5107 MOV A X0x07 while P7 amp 0x01 0x00 0042B5 CALL N usbf 78k r ep status 0042E XCHW AX BC oe oe 0042F CHPW AX 0x0000 AX BC 00432 13 MOV keycode KEYl SCAN CODE keydata naz z GENT Mon Jun 21 11 46 23 2010 C SPY Processor Descriptor V4 70 1 50025 for 8K0R Mon Jun 21 11 46 23 2010 C SPY MINICUBE and TK 8 Emulator Driver Y4 70 1 50025 for 8KOR Mon
55. gure 21 C Spy Go Button 49 Figure 22 C Spy Application Control Buttons Run Mode sanoannannnnnnnnnnnnnennnnnnnnnnnnnne 49 Figure 23 C Spy Application Control Buttons Stop Mode cc ecceccseeceeeeeeeeeeeeeees 49 Figure 24 TK 78KORKE3L USB USB connector UR 50 Figure 25 TK 78KORKE3L USB switch GW 50 FIBgure 26 NOC PACE ONON pano E ER EE E E E EEN 51 Figure 27 SD Break PN NS 51 Figure 28 C Spy Stop Debugging Button 52 Figure 29 IAR Embedded Workbench Close o3 Figure 30 Troubleshooting nenne nennen nnne nnne nnn nnn nnns 55 Figure 31 EKSZONURISESLEEHFUSD DIOS E 55 FE 2 SVT OCUNMNG serere ERE T UU MT 57 Figure 39 Segment LEDS Q 59 Figure 36 Security ID entry area at the start of debuggder ccc cecceeeeeeeeeeeeeeeee eens 62 Figure 35 EW78K Create new WWorkenace esses nennen nnne 64 Figure 36 EW78K Add existing Hrolect 65 Figure 37 EW78K Add Existing Project Dialogue ccccccccccecceeceeeeeeeeeeeeeeeeseeeneeaes 65 Figure 38 Create New broiect nennen nnne nnn nnn nnns nennen nn 66 Figure 39 EW78K Create New Project Dialogue arrnnrnnnrnnnenannnnnnnannnnrnnnrnnneranenannnnnne 66 Figure 40 EW78K Untitled Workspace AA 67 melt ua iE 67 Figure 42 EW78K Save Workspace As Dialogue rrrrnnnrnnnrnnnenannnannnannnnrnnnennnennnnnannnnen 68 FU ETNE 69 Figure 44 EW78K Add Files Dialogue rarrnnnnnnrnnnnnnnnnnnnnnnnnnnnnnnnnnrnnnnnnnnnnrnnrnnrnnnrnnnnnsenn 69 Figure 45 C Spy active
56. he picture below To open use cutter to cut the dent part To short put solder on the pad Solder short pad Solder short a Open d gt Short amp R20UT0010ED0100 Rev 1 00 4 NE SAS 60 User Manual TK 78KOR KE3L USB Hardware Specification P120 connected to USB1 bus power short l P120 short detecting signal open P120 used as multipurpose I O short P16 is connected to audio circuit P16 short short open P16 used as multipurpose IO short P31 is connected to audio muting circuit P31 short short _ open P31 used as multipurpose IO short VDD AVREF AVREF short short open AVREF is separated from VDD VDD EVDD am short open EVDD is separated from VDD hor P110 and P111 are connected to 7 Segment P110 P111 short LED data latch circuit open P110 and P111 used as multipurpose I O hen These ports are connected to 7 Segment P20 P23 P50 P53 LED data latch circuit open These ports used for multipurpose IO External speaker output connecter J1 is short connected as stereo connecter open Connection for the monaural connecter Table 10 Solder Short Pad Description Note All ground signals are connected R20UT0010ED0100 Rev 1 00 AS 61 User Manual RENES TK 78KOR KE3L USB Troubleshooting Chapter 5 Troubleshooting 5 1 If you cannot find USB driver when connecting the kit Check Point 1 If you use USB hub do not use it USB hub is not supported Check Point 2 Chec
57. ick Continue Anyway to continue the installation Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for y NEC Electronics Starter Kit Virtual UART f Click Finish to close the wizard Lance 4 Click Finish to close the installation wizard R20UT0010ED0100 Rev 1 00 xQRENESAS 31 User Manual TK 78KOR KE3L USB Preparation 2 3 2 Installation on Windows 2000 Found New Hardware Wizard Welcome to the Found Mew Hardware Wizard This wizard helps you install a device driver for hardware device To continue click Next Cancel 1 Click Next to continue Found New Hardware Wizard Install Hardware Device Drivers A device driver is a software program that enables a hardware device to work with y an operating system This wizard will complete the installation for this device G USB Device device driver iz software program that makes a hardware device work Windows needs driver files for your new device To locate driver files and complete the Installation click Next What do you want the wizard ta do Search for a suitable driver for my device recommended C Display a list of the known drivers for this device sa that can choose a specific driver Back Cancel 2 Select Search for a suitable driver for my device and click Next R20UT0010ED0100 Rev 1 00
58. inker v5 0 0 2 32 Copyright 1987 2010 IAR Systems AB 3 015 bytes of CODE memory 458 bytes of DATA memory 65 absolute 200 bytes of CONST memory Errors none Warnings none Total number of errors 0 Total number of warnings 0 v Download the application and start the debugger Errors D Warnings 0 NUM A Figure 18 IAR Embedded Workbench Download and Debug In case of starting a debug session for the first time the following C Spy Hardware Setup Dialogue is opened automatically Later you can modify the configuration only in the debug session selecting the menu Emulator gt Hardware Setup User Manual TK 78KOR KE3L USB Experiences MINICUBE2 Hardware Setup for f8KOR T8F10265654 FFFFFFFFFFFFFFEFFFFF apeten all sate break Noe vies setup TOOLO TOOL1 e larget Wu Gi i L Fwa Lonnect NHI E Hot Eonmmect Internal ROM zl 00000 Og 1FFFF Internal ROM 128 Kbytes U FDF L OsFFEFF Internal HAM 9192 bytes Figure 19 C Spy Hardware Setup Dialogue TAR Embedded Workbench IDE EECH main c cpu init usbf78k0r init a imis iru 003F6 B main c 003F7 SUBU SP 0x0A E optbyte c MOV A 0x04 B usbf 8k r hi 87 void main void Mu FDEFO3 CALL N init E Output enable interrupt l 00400 717 F EI menset keycode 0 sizeof kevcode Key Data Clear 91 Return values Ge SE zu DE 0x0008 BC ida E iu 00407 EF8 MOVW AX SP 93 Overvi
59. ion Remark Supplementary information Numerical representations Binary XXXX or xxxxB Decimal XXX Hexadecimal xxxxH 3 List of Abbreviations and Acronyms Abbreviation Fulfom CS78K C Spy for 78K EWT8K Embedded Workbench for 78K Input Output Least Significant Bit Most Significant Bit opecial Function Register Universal Serial Bus Acronyms Full Form All trademarks and registered trademarks are the property of their respective owners R20UT0010ED0100 Rev 1 00 AS 6 User Manual RENES 4 Related Documents The related documents indicated in this publication may include preliminary versions However preliminary versions are not marked as such Document Title 78KOR KE3 L USB USB HID Human Interface Device RO1ANOOO09EDO100 Class Driy r 78KOR KE3 L USB USB CDC Communication Device R01AN0008ED0100 Class Driver User s Manual 78KOR Kx3 L 16 bit Single Chip LANDE JE VON Microcontrollers Table 1 Related Documents R20UT0010ED0100 Rev 1 00 AS 7 User Manual RENES Table of Contents Chapter 1 Introduction 12 Chapter2 Preparation 13 2 1 Development Tools Goftware 13 2 2 Installation of Development Tools 14 221 E ut VEE 1 61 PACK Le EEE EE 14 2 2 2 Installation of Development Tools rrrrannrnnannnrnnnnrnnnnnrrnnnnnnnnrnrnnnenrnnnernnnnnnnnnsnnnnnennnnennnnnene 14 2 2 3 Installation of WriteEZ5 Flash brogrammer 24 2 2 4 Installation of Sample Applcatons 27 2 3 VPN 29 2 3 1 I
60. itch SW1 Setting axxo a err os core e ove euo CR ei e i SKO INS e Gr i Rag HE me ia Teen f SNE e ii II x LESS F HEU TK 78KORKE3L USB Jumper amp Switches After the switch settings are completed connect the PC to USB2 on TK 78KOR KE3L USB with USB cable If the Found New Hardware Wizard is started install USB driver with referring 2 3 USB Driver Installation R20UT0010ED0100 Rev 1 00 xQRENESAS 46 User Manual TK 78KOR KE3L USB Experiences 3 7 Start C Spy Debug Session To start the C Syp debugger use either the Download and Debug button of the tool bar or select the menu item Project gt Download and Debug or use the keyboard and press STRG D IAR Embedded Workbench IDE B x File Edit View Project Tools Window Help D Sagal elol AVY KNE gt xem bi Inkz8f 1026 64 a 1 O once tomi EE NE SI SQUE SNR tp ED i z BR 2 XLINK command file template for 78KOR microcontroller uPD78F1026 64 i 377 EI GO 78K0R_Kx3L HID MEAM 4 7 This filecan be used to link object files from the 76KOR La C main c 577 Assembler A78KOR and the C C compiler ICC78KOR Output 6 I E intrinsics h Tis This file is generated from the device file E io78f1026_64 h B DF102664 78K L Eio78f1026 64 exth EE Copyright C NEC Corporation 2009 main h 10 Format version V3 00 File version V1 00 E string h LL f
61. ject and series of actions such as program creation using the editor source management build and debugging are managed One or more projects can be combined in one workspace The same project may also be included in different workspaces A workspace is a collection of projects containing on information about the configuration of each project Editor Window ini x JF IAR Embedded Wor oench IDE File Edit View Project Tools Window Help AMEN ae FEIER Dpg a eser na X J 4YTw uE 8 5 ui Workspace xime CH fol Messages Workspace Window Ready D Ln 1 Col 1 hNMwM Z4 Figure 7 EW78K Main Windows Message Window Workspace window A window in which project names source files include file and generated output files are displayed using a tree structure Message window A window in which the build execution messages are displayed Editor window A window to create all kind of source files R20UT0010ED0100 Rev 1 00 xQRENESAS 39 User Manual TK 78KOR KE3L USB Experiences What is a project A project is the unit that is managed by EW78K A project refers to an application system and environment development based on EW78K EW78K 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 compiler assembler linker and debugger The file name forma
62. k r keytouch flg F SW ON I TLLA if P7 amp OxOl 0x00 SW2 UP SERE while iP7 0x01 x lf 113 SW2 OFF WAIT 114 e us seyoade KEY1 SCAN CODE keydata Bress Key Da 116 while usbf78k r ep status C INTL DEV DE ASKOR Kx3L HID m 4 M Adrar nn ee mmmn E Meroe odo TETT A a zl Ready Ln 115 Col 17 mum Zz Figure 45 C Spy active Breakpoint You get an overview about all defined breakpoints by selecting View gt Breakpoints R20UT0010ED0100 Rev 1 00 xQRENESAS 70 User Manual TK 78KOR KE3L USB Other Information IAR Embedded Workbench IDE File Edit View Project Debug Emulator Tools Window Help Dax El X Blo c TY Y xEs e mWweSelweblzEietizr aars ond Works spac e main P 27 98 UINT8 keycode REPORT DATA LENGTH Een KALD 99 UINTS keydata KEY 7 main c 100 E optbyte c 101 initi E usbf 8k r c i 102 usbf 8k r hid c 103 enable interrupt E Output 104 105 TREE ker Data Clear 106 usbf78k0r keytouch flg F SW OFF Key Flag Clear pr Dy 108 while 1 109 110 if usbf78kOr keytouch flg F SW ON I CG Jl if P7 amp OxOl 0x00 SW2 UP 112 while P7 e Ox01 OxO0 a hx SW2 OFF WAIT 114 e us keycode KEY1 SCAN CODE keydeta Press Key Da EDS while usbf78k r ep status C INTL DEV OK alib usbf78kOr data send keycode sizeof keycode C I
63. k if you installed Starter Kit USB Driver in 2 3 USB Driver Installation If not install the driver Check Point 3 If above two 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 2 3 USB Driver Installation After the installation make sure you go through 2 3 3 Completion of USB Driver Installation to confirm the USB 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 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 switches on the kit are correct with referring 3 6 Check Board Setting Check Point 3 Confirm the USB driver installation with referring to 2 3 3 Completion of USB Driver Installation Check Point 4 If above three 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 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 ID Code sooo ccc Figure 34
64. nclude include file folder SIC source file folder EWT8K project project file folder ewp project file eww Workspace file inf CDC USB driver folder R20UT0010ED0100 Rev 1 00 xQRENESAS 36 User Manual TK 78KOR KE3L USB Experiences Chapter 3 Experiences 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 Embedded Workbench for 78K Integrated Debugger C Spy for 78K You will use the programs that you prepared in 2 2 4 Installation of Sample Applications 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 The overall steps are as follows J eee Figure 5 Overall Steps to Start a Debug Session R20UT0010ED0100 Rev 1 00 xQRENESAS 37 User Manual TK 78KOR KE3L USB Experiences 3 1 Start Embedded Workbench for 78K Let s start using the development tools First start the Embedded Workbench Select Windows Start Menu gt Program gt IAR Systems Embedded Workbench for Renesas 78K V4 70 Kickstart EW7SK starts IAR Embedded Workbench IDE File Edit View Project Tools Window Help D g leelo o z 4 Y 3 x be 49 BEN OE S 2 Workspace IAR Information Center For Renesas IAR Information Center for Renesas
65. ng the TK 78KOR KE3L USB Please follow the instruction below to install the driver Starter Kit USB Driver must be installed on the PC The driver is included in the Embedded Workbench package please refer to 2 2 Installation of Development Tools to install the Embedded Workbench first CAUTION Do not use a USB hub for connecting TK 78KOR KE3L USB First connect the TK 78KOR KE3L USB USB2 to PC with USB cable Figure 2 USB Connection Depending on the version of Windows OS the installation will be differed Please check your Windows version and follow the instructions Windows XP gt Chapter 2 3 1 Installation on Windows XP Windows 2000 Chapter 2 3 2 Installation on Windows 2000 After the installation go to Chapter 2 3 3 Completion of USB Driver Installation R20UT0010ED0100 Rev 1 00 xQRENESAS 29 User Manual TK 78KOR KE3L USB Preparation 2 3 1 Installation on Windows XP Found New Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps you install software for MEL Electronics Starter Kit Virtual UART Fa 7 x Ce If your hardware came with an installation CD P nr floppy disk insert it now What do you want the wizard to da C Install the software automatically Recommended Click Nest to continue x Back Cancel 1 Select Install from a list or a specific location Advanced and click Next Found New Hardware Wizard E Please choose you
66. nstallation on Windows Ab 30 2 3 2 Installation on Windows 2000 32 2 3 3 Completion of USB Driver Installation rrrrnrernnnnrrnnrrrrnnnrrrnnnerrannernnnrnnnnrnnnanennnnnennnnnen 35 PAST une Ee ele E 36 Chapter 3 Experiences 37 3 1 Start Embedded Workbench for Oh 38 3 2 What is Embedded Workbench for 9 39 3 3 Open WORKS arrene 41 A POLEN 43 29 TEEN 44 936 Check B ard SNE PNE MM 46 3 7 Start C Spy Debug Geseion ccc ccecceecceeeceeeceeeceeeeeecaeeseeesaeeseeeseeseeeseeeseeees 47 Ao TRUMADDIICATION Progra pix io vh POP DEA DIT DH CI DH IHELIP EPA EPOTU CIR PbA UIN 49 SSC NEE de e e elle gen E een BE 51 9 10 Close C Spy Debug SESSO D 52 3 11 Close Embedded Workbench mmn 53 Chapter 4 Hardware Specification 54 41 Layo torharaware TUNCHON S 4 592502 052975 Udets epa det ocupa deve sepu detis e erer orar OPE urere 55 4 2 Layout of solder short pad and test pad erranrennrnannnnrnnrnannnernarnnnenernannnernnsnnee 59 4 3 Hardware Functions EEE 56 4 3 1 VL 56 SOE ON 57 4 8 8 SW3 RESET SW 57 EN 57 EE EE FER EEE EE n 57 2506 PP 58 C AR EEE EE EE EE 58 4 3 8 LED1 POWER 58 40 PUES SEE LE D E 59 4 3 10 ENN 60 4 3 11 NN SG 60 R20UT0010ED0100 Rev 1 00 234 NES AS User Manual 4 3 12 1 m 60 4 3 13 i1 PIOS 60 4 3 14 dj 60 4 3 15 Wo
67. ply to the xxx xx Group Make sure to refer to the latest versions of these documents The newest versions of the documents listed may be obtained from the Renesas Electronics Web site Document Description oe EAN Document No Type Title Data Sheet Hardware overview and xxx xx Group R01DSxxxxEJXXXX electrical characteristics Datasheet Hardware specifications pin assignments memory maps peripheral function specifications electrical User s characteristics timing xxx xx User s manual for charts and operation manual for Hardware description Hardware Note Refer to the application notes for details on using peripheral functions This User s manual XXX XX Series Description of CPU User s instruction set manual for Software User s manual for Software RO1USxxxxEJXxxx Information on using peripheral functions and mE application examples Application Available from Renesas Sample programs Information on writing programs in assembly language and C Note Electronics Web site Renesas Technical Update Product specifications updates on documents etc R20UT0010ED0100 Rev 1 00 AS User Manual RENES 2 Notation of Numbers and Symbols Conventions Data significance Higher digits on the left and lower digits on the right Active low representations xxx overscore over pin and signal name Note Footnote for item marked with Note in the text Caution Information requiring particular attent
68. pt the agreement to install WribteEz5 v1 00 r3 Trl soft Install system v2 45 cane 3 Click Agree to confirm that you accept the license agreement gt WriteEZ5 1 00_r3 Setup 5 gt Choose Install Location Choose the Folder in which to install WriteE75 v1 00 r3 a gE NESAS Setup will install writeEz5 v1 00 r3 in the Following Folder To install in a different Folder click Browse and select another folder Click Install to start the installation Destination Folder Browse Space required 2 2MB Space available 204 866 Trl soft Install system v2 45 z Back Install Cancel 4 Accept the default installation folder or use the Browse function to select any other folder of your choice Click Install to start the installation R20UT0010ED0100 Rev 1 00 xQRENESAS 25 User Manual TK 78KOR KE3L USB Preparation WriteE25 1 00_r3 Setup ml x Installation Complete E RENESAS Setup was completed successfully Completed E Show details Mullsart Install system v2 45 Cancel 5 Click Next to continue the installation WriteE25 1 00_r3 Setup ml x Completing the WrteE25 v1 00 r3 oetup Wizard wWribeEz5 v1 00 r3 has been installed an your computer Click Finish to close this wizard Back Cancel 6 As the programmer shall not be started now please unmark Run WriteEZ5 and click Finish to close the installer R20UT
69. r search and installation options Search for the best driver in these locations Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed Search removable media floppy CD ROM v Include this location in the search Hed Workbench DA 7 Bk drverssrenesas MIMICLIBE Browse C Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for pour hardware Back Cancel 2 Mark Include this location in the search and select the subfolder 78Kdrivers renesas MINICUBE of your Embedded Workbench installation folder Click Next R20UT0010ED0100 Rev 1 00 xQRENESAS 30 User Manual TK 78KOR KE3L USB Preparation Hardware Installation 1 AN The software vou are installing for this hardware MEL Electronics Starter Fat Virtual UART has not passed Windows Logo testing to verify its compatibility with Windows AP Tell me why this testing rs Important Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing Continue Anyway 3 Cl
70. ror free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein 7 Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics R20UT0010ED0100 Rev 1 00 User Manual r8RRENESAS The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office equipment communic
71. se settings bs FEKOR Kx3L CDC ew File name Save as type workspace Files Few sl Figure 42 EW78K Save Workspace As Dialogue R20UT0010ED0100 Rev 1 00 User Manual 24 NE S AS ey m Other Information 68 TK 78KOR KE3L USB 6 3 Add additional Source Files to a Project To add an additional source file to an existing project please select Project gt Add Files IAR Embedded Workbench IDE O x File Edit View Project Tools Window Help 4 Y E T TEEDE Add Group Import File List Edit Configurations Remove Create New Project Add Existing Project Options ALT F7 Source Code Control gt Make F Gompile STRG F7 Rebuild All Clean Batch build ef F Stop Build STRGHUNTBR Download and Debug STRG D Debug without Downloading Make amp Restart Debugger STRG H Restart Debugger STRG UMSCHALT R 78KOR_Kx3L HI Download D KA Messages Errors none Warnings none Total number of errors 0 Total number of warnings 0 ooo o o Add one or more files to the project Errors 0 Warnings 0 m Z Figure 43 EW78K Add Files In the following dialogue you can specify the source file to be added Please keep mind that only files listed according to the selected extension filter Add Files T8KO0R Kx3L HID Look jn Co et da t xA Cl opt byte My Recent ei ERES LU Documents d usbf7SkOr communi
72. ssembler RA78KOR V4 70 1 Assembler for the 78KOR microcontrollers This convert the assembler code for 78KOR into object code e Integrated Debugger CS78K V4 70 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 referring and changing variables using step in debugging function and SO On e Starter Kit USB Driver This is a software driver for PC to access to the USB interface of the kit e 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 e CDC 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 R20UT0010ED0100 Rev 1 00 AS 13 User Manual RENES TK 78KOR KE3L USB Preparation 2 2 Installation of Development Tools 2 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 2 2 2 Installation of Developmen
73. stration by opening the web page http supp iar com Register Confirm reg This page will also give you information on how to install the product You must confirm the registration within 14 days from when this email was sent If you have received this email in error you do not need to do anything Unconfirmed registrations are erased from our system after 14 days You cannot reply to this email Please use the Contact page on our website http www iar com contact if you have any comments or questions Best regards JAR Systems 6 Click the Hyperlink to get your requested license key to continue the installation SYSTEMS s Registration Confirmed Thank you for your registration of the product IAR Embedded Workbench for HEC 78H v 4 62 4K Kickstart Edition When installing the software you will be asked for a License Number and a License Key Please use these values License Number FATALT FLL TLL SL License Key LION TEHWUURTEBUSOLINTLEYIRMPHR4ASTSALOLSLCESFNHEOSITSHE CYRni des OF AV TABS Gus kv ba Lt amp KBLULBPFCMBAIDMEPZOZ LSVAZB4BZZUNWLSCSHPQEOXIS5YWI1A5EZ Feature EN7SK KS Version O1 WIN Temporary license iLicno xxxx xxx xxx xxxx Je expires 2035 06 18 If vau prefer vau can have the License Number and Key sent to you En email for later reference We hope that you will enjoy the product and find it easy to get started an your development project Hest regards LAR Systems Contac
74. t IAR Systems R20UT0010ED0100 Rev 1 00 AS User Manual RENES Preparation 17 TK 78KOR KE3L USB Preparation ARS Japanese Welcome to IAR Systems IAR Embedded Workbench Kickstart installation You must have a license number and an installation key to install this evaluation version of JAH Embedded Workbench Follow these steps 1 Click the IAR online registration link below to register on the IAR Systems website 2 Tou will receive an email with your licenze number and installation key within a few minutes 3 Click the Install IAR Embedded Workbench link below to start the installation hl IAR online registration Ki Install IAR Embedded Workbench du Back SIAR WWW ar com 7 Click Install IAR Embedded Workbench IAR Embedded Workbench for Renesas 78K 4 70 1 E X Welcome to the InstallShield Wizard for IAR Embedded Workbench for Renesas 78K Kick start The InstallShield Wizard wall install I Embedded Workbench for Renesas ZOE Kickstart on your computer To continue click Nest SIAR SYSTEMS 8 Click Next R20UT0010ED0100 Rev 1 00 4 NE SAS 18 User Manual TK 78KOR KE3L USB TAR Embedded Workbench for Renesas 78K 4 70 1 X SOFTWARE LICENSE AGREEMENT concerning Products WAR Embedded Workbench visuals TATE and AA PowerPact from 18R Systems AB PREAMBLE THIS SOFTWARE LICENSE AGREEMENT THE AGREEMENT J APPLIES TO PRODUCTS LICENSED BY IAR SYSTEMS
75. t Tools 1 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 Aurorun EXE Development Kit 16 bit 78KOR USB Install IAR Embedded Workbench for 78K Install WriteE25 Programmer Install TK F8RORKESL USB Sample Programs Open TK 8K RKE3L USB User s Manual Open additonal Documentation Exit d a 434 NE S AS 2 Click Install IAR Embedded Workbench for 78K R20UT0010ED0100 Rev 1 00 xQRENESAS 14 User Manual TK 78KOR KE3L USB Preparation H Japanese Welcome to IAR Systems IAR Embedded Workbench 4K Kickstart for NEC 78K QuickStart installation information Install IAR Embedded RET L Install visualS TATE Helease notes View the product documentation Install Adobe Acrobat Reader Explore the CD SIAR SYSTEMS Wea Iar com 1 amp yy KO 3 Click Install IAR Embedded Workbench for 78K H Japanese Welcome to IAR Systems IAR Embedded Workbench Kickstart installation You must have a license number and an installation key to install this evaluation version of LAR Embedded Workbench Follow these steps 1 Click the IAR online registration link below to register on the IAR Systems website 2 Tou will receive an email with your licenze number and installation key within a few minutes 3 Click the Install IR Embedded Wet beneh link below to start th
76. t is xxxxx ewp Project files are created in the directory you specify when creating a new project What is a workspace A workspace is the unit used to manage all the projects required for one application system A workspace file contains one or more project files The file name format is xxxxx eww Workspace files are created in the directory you specify when creating a new project R20UT0010ED0100 Rev 1 00 4 NE SAS 40 User Manual TK 78KOR KE3L USB Experiences 3 3 Open Workspace In this section you will use the workspace that you created in 2 2 4 Installation of Sample Applications For creating a new workspace refer to Chapter 6 Other Information Select File gt Open gt Workspace on the menu bar Then select 78KOR_Kx3L HID eww under the directory TK 78KORKE3L USB Samples78KOR Kx3L USB HID EW78K Project FIAR Embedded Workbench IDE E ll x Dew TER APP Figure 8 EW78K Open Workspace R20UT0010ED0100 Rev 1 00 ZEN ESAS 41 User Manual TK 78KOR KE3L USB Open Workspace 2lsl E E E l E gt Look in Co EW TSE Project e E PE d M p H ecent Documents Pk TOKOR Kx3L HID enn BIE Hiel p hy Computer I ei MT File name Loge Kx3LIHID eww Flaces Files of type workspace Files eww Cancel Figure 9 EW78K Open Workspace File Selection Dialogue IAR Embedded Workbench IDE File Edit View Project Tools Window Help SH
77. til the target clock signal is stable 5 Differences between Products Before changing from one product to another i e to one with a different part number confirm that the change will not lead to problems The characteristics of MPU MCU in the same group but having different part numbers may differ because of the differences in internal memory capacity and layout pattern When changing to products of different part numbers implement a system evaluation test for each of the products R20UT0010ED0100 Rev 1 00 User Manual r8RRENESAS How to Use This Manual 1 Purpose and Target Readers This manual is designed to provide the user with an understanding of the hardware functions and electrical characteristics of the MCU It is intended for users designing application systems incorporating the MCU A basic knowledge of electric circuits logical circuits and MCUs is necessary in order to use this manual The manual comprises an overview of the product descriptions of the CPU system control functions peripheral functions and electrical characteristics and usage notes Particular attention should be paid to the precautionary notes when using the manual These notes occur within the body of the text at the end of each section and in the Usage Notes section The revision history summarizes the locations of revisions and additions It does not list all revisions Refer to the text of the manual for details The following documents ap
78. tions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you 10 Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations 11 This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics 12 Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics
79. uto estension based Strict Simulator TE 78 C dialect Plain char iz FOKO E20009 Require prototypes e Signed Ce Unsigned dialect Embedded C Extended Embedded C Language conformance Enable multibyte support Enable JAR migration preprocessor extensions Figure 14 EW78K Compiler Options R20UT0010ED0100 Rev 1 00 xQRENESAS 44 User Manual TK 78KOR KE3L USB Experiences Options for node 78KOR Kx3L HID General Options C1C Compiler Assembler Custom Build Build Actions Linker Debugger IE 78 IECLIBE MINICUBE Simulator TE 78 78kn E20009 e Entry symbol Deeg by application TODOLKIT DIRS LIBS E Peme DJ Gei Figure 15 EW78K Linker Options Options for node 78KOR Kx3L HID General Options CIC Compiler Assembler Custom Build Build Actions Linker Debugger IMINICUBE QB 78KOMINI QB 78KDSsxsMINI QE MINI2 IE 78 IECLIBE MINICUBE Simulator TE 78 TeEO E70009 Figure 16 EW78K Debugger Options R20UT0010ED0100 Rev 1 00 ZEN ESAS 45 User Manual TK 78KOR KE3L USB Experiences 3 6 Check Board Settings Before connecting the PC and the TK 78KOR KE3L USB with USB you should check the setting of switch and jumper pin on the board Set the switch and the jumper pin on the TK 78KOR KE3L USB as follows Jumper Position am fo Debug Vriter Table 2 TK 78KORKE3L USB Jumper Setting SM 1 12 13 14 15 16 17 18 Table 3 TK 78KORKE3L USB Sw
80. w Status Bar i ls while usbf78kOr ep status C INT1 DEV OK aiala usbf78k r data send keycode sizeof keycode 118 memset keycode 0 sizeof keycode d Rei 119 while usbf78k 0r ep status C INTL DEV OK 120 usbf78k r data send keycode sizeof keycode Mp bnt keydatat T22 ifikeydata EXCLAMATION KEY 123 keydata KEY 124 qo dies H 126 if P7 amp 0x02 0x00 SW2 PUSH DET while P7 0x02 0Ox 00 e 78KOR Kann m 4 OTIA ATT TATT e i Open a new Live Watch window Figure 49 C Spy display global Variables while Application is running R20UT0010ED0100 Rev 1 00 xQRENESAS 73 User Manual TK 78KOR KE3L USB Other Information 6 4 4 Display local Variables Local Variables are displayed automatically in the Local Watch Window select menu View gt Locals The variable list can not be modified manually but is an automatically generated list according the currently executed function IAR Embedded Workbench IDE Dl xl File Edit View Project Debug Emulator Tools Window Help Dc Eg ci sBImc z 4 Y VE o S wd ow GR Ak Location EI keycode is Memonz xFEOUBA UINTS 8 cpu init 8l usbf78kOr init L 0 0x00 Memory 0xFE0BA UINTS eg re Lt 1 Ox00 Memory 0xFEOBB UINTS6 H Ze L 2 0x00 Memory 0xFE0BC UINTS SSS SS SS SSS SSS SSS SS SS SS SS SSS SSS SSS SS SSS SSS SSS SSS 3 0x00 Memo O
81. xFEOBD UINTS re CM o6 main function E A 0x00 Memory OxFEOBE UINTB pa B usbfrdk BE 70i ain void L 5 0x00 Memory 0xFEOBF UINT8 BER l L 5 0x00 Memory 0xFEOCO UINT8 op Mee L 7 0x00 Memory 0xFEDC1 UINT8 BE neum velnss keydata 0x04 Memory 0xFE0BS UINTS 92 N A 93 Overview 94 main routine 96 void nain void 98 UINTS keycode REPORT DATA LENGTH 99 UINT8 keydata KEY 101 initi 103 enable interrupt 104 105 Z Ke 106 Ke 107 108 while il 109 110 if usbf78k r keytouch flg F SW ON EI if P7 amp 0x01 0x00 SW2 UP 78KOR Kx3L HID 036 t ND e Mr NN wess Cash TI RB Ready MM 2 Figure 50 C Spy display local Variables User Manual TK 78KOR KE3L USB Other Information 6 4 5 Display Memory Content The complete memory area Flash and RAM area is displayed in the memory window select menu View gt Memory Changed values since the last break are marked in red ZZ IAR Embedded Workbench IDE File Edit View Project Debug Emulator Tools Window Help DMS SK EECH z 4 Y ewe E Sw olllzielmzs2m2z2xlix 96 void nain void 97 E CJ 78KOR Kx Ki main c i En B byi 98 UINT8 keycode REPORT DATA LENGTH optbyte c 99 UINTS keydata A KEY jusbf7ekor c 100 7 usbf78k0r gt 101 init Lg 73 Output Net e 103 enable interrupt 104 ios EEE gt Key Date Clear y 7 78KOR Kx3L HID fol s x Goto sl INT

Download Pdf Manuals

image

Related Search

Related Contents

brochure  Case Logic Hardshell EVA Medium Sized Camcorder Case  pliego de especificaciones técnicas particulares  Canada - Buyandsell.gc.ca  flying wish paper™  Kensington Universal Case for 9 and 10” Tablets — Black  Manuel de l`opérateur du TCM4/40  MANUEL D`UTILISATION POUR VENTILATEUR  Ministry of Defence  NXP Semiconductors PBLS4004D User's Manual  

Copyright © All rights reserved.
Failed to retrieve file