Home

HDI for LEM3664 User Manual

image

Contents

1. Select whether the NMI is controlled by evaluation module or user hardware ID code to unlock access to the user program and evaluation module firmware already resident Single step Select whether interrupts are permitted interrupts Table 3 System Configuration Options For the purposes of the tutorial ensure the settings are set to their default values 2 Click the OK button to close the System Configuration dialog box 3 If communication is successful the following message will be displayed on the status bar at the bottom of the HDI window Connection complete LEM User Manual 51 Downloading the Tutorial Program 1 Select the File gt Load Program menu option or click the following toolbar button E 2 The following window is displayed Load Program X Ho M Verify Cancel File name C ALEM3664 Project tutor D ebug tutor abs v Browse T Load only debugging information Load stack information file SNI file Figure 65 Load Program 3 Browse to the C LEM3664 Project tutor Debug folder and select the tutor d20 file 4 Click the Open button Several warning messages similar to the following will be displayed These may be acknowledged and ignored WARNING Trying to write to reserved memory between addesses 2 3 Continue showing memory write violations Figure 66 HDI Reserved Memory Warning 5 After a few moments the following window is display
2. 4 gt Build Find in Files A Version Control For Help press F1 Figure 59 Displaying the Tutorial Workspace 5 Select the Build gt Build All menu item The results of the build will be displayed ti Phase Assembler finished 2 Phase Linker starting Warning 29 Parts of segment DATAl are initialized as in module timerl even though it is of type DATA a Phase Linker finished Build Finished 0 Errors 1 Warning Build Find in Files A Version Control Figure 60 Build Results Window 6 Note a warning may be displayed This is normal 7 Close the Hitachi Embedded Workshop program and the CodeLines program LEM User Manual 47 Connecting the Evaluation Module Connect the evaluation module to the PC using the supplied USB cable Both red and green LEDs will illuminate the red LED indicating that the evaluation module is receiving power and the green LED indicating that enumeration 1s taking place Starting HDI 1 To invoke HDI click Start gt Programs gt HDI for LEM 3664 gt Hitachi Debugging Interface for LEM 3664 The HDI window will open 2 The following dialog box is displayed LEM3664 Exit C Previous session file Figure 61 Select Session 3 Click the OK button The following window 1s displayed Figure 62 Create a New Session LEM User Manual 48 4 Two options are available on this dialog box Download user Figure 63 New Session Opt
3. e Configure Overlay LEM User Manual 62 APPENDIX A Troubleshooting If the following dialog box is displayed when selecting to create a new session within HDI check that the USB cable is connected between the PC and the evaluation module HDI AN Unable to connect Try again Figure 84 HDI Unable to Connect When the cable is connected click the Yes button to retry communications When communications has been established the following dialog box will be displayed Begin session Create session Download and execute emulator finer 2202020200 Figure 85 HDI Begin Session Select the appropriate option from the list displayed and click the OK button to continue LEM User Manual 63 Frequently Asked Questions I Stepping over a sleep instruction causes HDI to run but pressing the STOP button may cause an error stating that it cannot stop the target HDI will then go link down and you must restart the target to get the connection back Creating a new Session while the disassembly window is displayed and maximised after a program has stopped running may cause HDI to close with an error message Although loading a Session in HDI will upload the program pressing GO without first resetting will cause HDI to run into the monitor code and not your program Always make sure that you reset and then GO after loading a session Please note that whitespace in the temp file
4. i Cancel Figure 32 Acrobat Reader 5 0 Setup 2 Click the Next button The following window is displayed Setup will install Reader 5 0 in the following folder To install to this folder click Next To install to a different folder click Browse and select another folder You can choose not to install Reader 5 0 by clicking Cancel to exit Setup a A Destination Folder r A a C Program Files4dobe Acrabat 5 0 Browse i Cancel Figure 33 Choose Destination Location 3 Click the Next button to accept the default destination location LEM User Manual 30 4 The necessary files will be copied from the CD ROM When installation is complete the following window 1s displayed Information 5 Thank you for choosing Acrobat Reade Figure 34 Thank You For Choosing Acrobat Reader 5 Click the OK button to return to the LEM3664 Software Tools window 6 Select the Exit option to close the LEM3664 Software Tools window LEM User Manual 31 3 LEM Functions All monitor functions are accessed through the HDI graphical user interface Program Download The monitor provides HLL debugging capability for the IAR and Hitachi compilers which support UBROF V5 0 objects SYSROF V1 0 and V2 0 objects and COFF format without stabs respectively Program Counter Breakpoint A maximum of 256 breakpoints 1s supported Execution Functions The different execution modes provided are e Ex
5. is utilised in the following two ways e It is enabled under supervisor control and is used to break out of the user program when it 1s executing e It is used by the evaluation module firmware to control execution of the user program and to report evaluation module status e SCI4 serial communication interface channel 4 is used by the evaluation module firmware to communicate with the host via port pins P87 P86 and P85 Other Considerations Standby Modes The evaluation tool is unable to determine which the mode the microcontroller is in 1 e whether the microcontroller is in sleep standby or sub sleep mode LEM User Manual 34 5 Tutorial This section of the manual will guide you through an example project building compiling and debugging session and show the major features the evaluation module provides in conjunction with the HDI When you have completed this tutorial you will be able to perform most operations necessary to debug your application For a complete description of all standard features available please refer to the Hitachi Debugging Interface User Manual If you are not using the 3664 then select an alternative timer from the table below If your microcontroller is not included in this table then no CodeLines exists for this type and you will not be able to complete the CodeLines section of the tutorial Instead the necessary source code is included on the LEM3664 CD ROM Using CodeLines to
6. recommended that the LEM3664 module is not plugged in until the HDI3664 software has been installed LEM User Manual 15 Installation of Hitachi Embedded Workshop 1 Insert the LEM3664 Software Tools CD ROM After a few moments the following window 1s displayed a menu ME x LEM3664 Software Tools Welcome to the LEM3664 Software Tools CD ROM ha a Select a choice on the left to start r S installing software or to look at the PDF Document J documentation files For help or latest information you can read the readme txt file by clicking on the symbol in the bottom right corner Please visit the HMSE website to find up to date information and support for our products You can do this by clicking on the web address below Figure 6 LEM3664 Software Tools Welcome If this screen does not display automatically launch the MENU EXE program located in the root folder of the CD ROM 2 Click Install Software The following window is displayed menu BE E LEM3664 Software Tools Hitachi Embedded Workshop Includes imited version IAR H8 300 series C compiler evaluation toolchain Information E wane f HDI3664 PC Based debugging interface monitor including support for the LEM3664 CodeLines 3664 serial No 123 Code generation software from AND Technology Research Ltd for the Hitachi 3664 devices together with specific project wizard tutorial Adobe Acroba
7. 0 Compiler Selection 17 Select the IAR TINY compiler and click the Next button The following window is displayed Figure 46 Project Details Stack and Heap Sizes LEM User Manual 40 18 Change the Stack size to 64 bytes and the Heap size to 32 bytes 19 Click the Next button The following window is displayed Report Generation 21x Repott file name C LEM3664 Project tutor tutor rpt ve V List of pin status including comments IV List of files in the project IV List of allocated on chip peripherals IV Project settings overview IV List of connected external peripherals IV Build results from ProDesk IV List of free on chip peripherals lt Back Cancel Help Figure 47 Project Details Report Generation Options 20 Click the Finish button The following window is displayed CodeLines Project Wizard Finished Efros The CodeLines Project Wizard has now Finished Fress Finish to display a list of on chip peripherals and external components for you to include in your project i Cancel Help Figure 48 CodeLines Project Wizard Has Finished LEM User Manual 41 21 Click the Finish button The Control On chip Peripherals and External Components windows will be displayed pdp CodeLines 3664 Contro I Fi tutor File Edit View Project Product Tools Window Help Oi slala a e al 2 11011010111101071111 For Help press F1 ol Z Fig
8. Create a Project l Launch CodeLines by clicking Start gt Programs gt CodeLines 3664 gt CodeLines 3664 The following window is displayed Tip of the Day EOJ Did you know Y To re size the processor graphic in the Control window click on it with the right mouse button and select Auto rrange F Show Tips on Sanip Next Tip Figure 35 Tip Of The Day 2 Click the Close button The following window is displayed LEM User Manual 35 Figure 36 CodeLines H8 3664 Startup Screen 3 Close this window 4 Select the Project gt Project Wizard menu item The following window is displayed Figure 37 CodeLines Project Wizard 5 Click the Next button The following window is displayed CodeLines Project Wizard Section 1 Project Creation Figure 38 CodeLines Project Wizard Project Creation 6 Click the Next button The following window is displayed LEM User Manual CodeLines Project Wizard Section 1 Project Creation Figure 39 Project Header File and Source File Names 36 LEM User Manual 37 7 Click the following button to display the Browse dialog box 8 Navigate to the root of your C drive Click the following button to create a new folder cH 9 For the folder name type LEM3664 Project Double click this newly created folder to open it 10 In the File name field type tutor 11 Click the Open button The CodeLines Project Wizard dialog b
9. EM User Manual 23 7 Click Next to accept the default backup directory The following window is displayed Hitachi Debugging Interface for LEM 3664 Installation Accessories Adobe Acrobat 4 0 AL ili 3664 Dr Solomon s VirusScan N EPSO FlashPath HDK 3 Figure 21 Select Start Menu Group 8 Click the Next button to accept the default Start menu group The following window is displayed Hitachi Debugging Interface for LEM 3664 Installation Figure 22 Ready to Install 9 Click the Install button to proceed with the installation LEM User Manual 24 10 If you installing on a Windows 9X platform the following window may be displayed Hitachi Debugging Interface for LEM 3664 4 The Microsoft Windows 9s virtual device driver for the Hitachi LEM USB adaptor could not be found HO will not be able to use the LEM Without this component Ik is normally installed by the plug and play features of the operating svete when it is first started after the card is Installed If this has not happened please open the Control Panel and select the Add New Hardware icon Figure 23 USB Adapter Not Found 11 Click the OK button After file copying is complete the following window is displayed Hitachi Debugging Interface for LEM 3664 Installation Installation Completed The installation of Hitachi Debugging Interface for LEM 3664 has been successfully completed Extra information is available on our webs
10. LEM User Manual Hitachi Debugging Interface Evaluation Module HDI for LEM3664 Low cost evaluation module for H8 Tiny Series of Microcontrollers User Manual Version 2 0 August 2002 LEM User Manual 2 Product Warranty This guide and associated software media has a warranty against defects in materials and workmanship for a period of one year from the date of shipment During this period Hitachi Micro Systems Europe Ltd will at its option either repair or replace products that prove to be defective The associated software is provided As 1s without warranty Limitation of Warranty The foregoing warranty does not cover damage caused by accidental misuse abuse neglect misapplication or modification No warranty or fitness for a particular purpose is offered The user assumes the entire risk of using the product Any liability is limited exclusively to the replacement of defective materials or workmanship Trademarks All products or brand names used in the manual are trademarks or registered trademarks of their respective companies When using this document keep the following in mind 1 This document may be wholly or partially subject to change without notice All rights reserved No one is permitted to reproduce or duplicate in any form a part or all of this document without the permission of Hitachi Micro Systems Europe Limited Hitachi Micro Systems Europe Limited is not responsible for any damage to us
11. SRY QOOOOFFA TCORA QOOOOFFAS TCORB QOOOOFF Ad TONTY QOQOFFAS TORVL Figure 77 Displaying Register Contents To edit an I O register either double click the register or right click the register and select the Edit menu item The following window will be displayed allowing you to enter a new value Edit byte at H OOOOFFA1 H 10 W Verify Cancel Figure 78 Editing an I O Register Summary The majority of HDI features have been demonstrated in this tutorial You should now be in a position to use this product to develop your own embedded applications LEM User Manual 59 6 Menus and Windows Detailed information on commands and the general HDI functions can be found in the Hitachi Debugging Interface User Manual Windows specific to LEM3664 are as follows Select Session Select Session Create a new session on LEM 3664 EA Exit Previous session file CALE M3664 Project stutor D ebugstutor ids Figure 79 Select Session Window This window is displayed when the File gt New Session menu option is selected From this window you may choose to create a new session or load a previously saved session file Begin Session Begin session Create session Figure 80 Begin Session Window This window is displayed when you have chosen to create a new session Two options are available on this dialog box Download user Figure 81 Begin Session Opti
12. e following e The PDIP header is supplied as part of the package for end user fitting e Once the PDIP header has been connected the _LEM3664 circuit board cannot be refitted into its original case This is to comply with the requirements of CE conformity e Ensure that the target board does not foul the underside of the LEM3664 circuit board e The TEST pin on the PDIP header must be connected to GND The procedure for connecting the internal 42 pin SDIP header to a target system is as follows 1 Remove the cover of the LEM3664 by gently prising the two case sections apart This may be achieved by inserting a flat blade screwdriver into the holes located at each end of the case 2 Solder the supplied PDIP header to the circuit board 3 Connect the LEM3664 evaluation module to the target board using the 42 way PDIP header ensuring that the TEST pin is connected to GND LEM User Manual 14 Software Installation Software Components The different software components are Hitachi Embedded Workshop Hitachi Debugging Interface for the LEM3664 CodeLines for the LEM3664 Software Installation Overview It is recommended that the following installation sequence be followed Installation of Hitachi Embedded Workshop Installation of HDI3664 Installation of CodeLines 3664 Optional installation of Adobe Acrobat Reader SS WN eR Note The USB driver is installed along with the installation of HDI3664 It is
13. ecute 1 Run mode 2 Step mode a Step in b Step over C Step out e Stop Memory Functions Memory supporting commands are General memory set functions Memory query Memory get Fill verify and verify fill LEM User Manual 32 Register Functions The LEM provides functions that allow retrieval of a CPU register or retrieval of all the CPU registers Register supporting commands perform e Request register block values e Request single byte register e Request single long word register Trace Buffer The LEM can capture up to four levels of program branch Intermediate instructions are filled from a program disassembly between program branches Other Functions Further commands supported are e Definition of LEM capabilities e Read Write I O register LEM User Manual 33 4 User Program Considerations The following gives details on the restrictions placed on the user program due to the operation of the low cost evaluation module Interrupts and Exceptions Interrupts Used by the Evaluation Module The evaluation module uses several interrupts to communicate with the host PC and control user program execution The following table lists the interrupts reserved by the evaluation module Vector Number Vector address H 02 to H 03 H 04 to H 05 H 06 to H 07 H OE to H OF H 18 to H 19 H 28 to H 29 Table 2 Interrupts used by the Evaluation module Vector 7 is the NMI vector and
14. ed SS xl r i Module name D LEM test stuffisleepisleep Debugisleep d20 5 Areas loaded 00000000 00000033 00000800 OOO00FB1 OOOOFBSO OOOOFBS2 Figure 67 Confirmation of Areas Loaded 6 Click the OK button LEM User Manual 52 Running the Tutorial Program Select the Run gt Reset CPU menu option and then select the Run gt Go menu option If program execution needs to be verified attach an oscilloscope to pin 26 P76 TMOV and observe the signal being generated from the program Viewing the program Changing the program display The code window can display source level and purely assembly code With a C source code window open click using the right mouse button From the short cut menu click Go to disassembly to view a disassembly of the code Setting a Program Counter Breakpoint With a C source code window open double click the BP column adjacent to the address for which a breakpoint is to be set The following black marker will appear indicating a breakpoint has been set and is enabled e To disable a breakpoint double click the marker changing its colour from black to red Running a Program To start program execution select the Run gt Reset Go menu option press the Shift key and the F5 key or click the Reset Go toolbar button The Go option may also be used either by selecting the Run gt Go menu option pressing the F5 key or clicking the Go toolbar button
15. el Note that the program counter must have a valid address To set the program counter left click the desired code line click the right mouse button and select the Set PC Here menu option LEM User Manual 53 Running Program to Cursor A convenient form of running a program is to use the Go To Cursor command This is achieved by simply setting the cursor where you want the program to stop Click the right mouse button with the mouse pointer in the program window and select Go To Cursor button from the pop up window menu Alternatively the Run gt Go to Cursor menu option or the following toolbar button may be used to achieve this Bie Stopping When a user program is executing the status bar displays RUNNING To stop program execution select the Run gt Halt Program menu item press the ESC key or click the following toolbar button Di Stepping Over a Function To step over a C function select the Run gt Step Over menu item or click the following toolbar button P Stepping Into a Function To step into a C function select the Run gt Step In menu item or click the following toolbar button Stepping Out a Function To step out of a C function select the Run gt Step Out menu item or click the following toolbar button P LEM User Manual 54 Viewing a Trace of Execution The chip maintains a list of the last 4 branch instructions executed This trace can be viewed by s
16. electing the View gt Trace menu item or by clicking the following toolbar button The following trace window will be displayed Address 4ssenb ler SOUrce opcode 0000 ooo00Ds8 5470 RTS oooi OOOOOCES 40EA BRA Gt 0002 ooo00cD4 sroooa04 JSR a elTurnLEDion 0003 ooo00a04 sDFO elTurnL MOv void clTurnLED1on void 0004 0000006 6DF1 MOV W 0005 DDO0DOACS 6DFZ MOV W 0006 oooooaOA GDFS MOV WT 0007 0DO0ODAOC 6DF4 MOV W 0008 ODOODOACE 6DF5 MOV W 0009 0D00O0A1O 6 amp DF6 PMOV W 0010 DDO0DOALZ 7FD47070 PBSET PIRI 0x80 0011 0000OA1LE 6D76 PMOW W 0012 o0000n18 6D75 PMOV W 0013 ODODOALA 6D74 MOV W 0014 DDODOALC 6D73 PMOV W 0015 DDOODOALE 6D72 PMOV W 0016 0000OAZO 6D71 MOV W 0017 DDO0DOAZ2Z 6D70 PMOV W 0018 00000DAZ4 5470 RTS D Figure 68 Trace Window The instructions marked in the Valid column with are the valid branch instruction held in chip and through which execution is known to have passed All other instructions those displayed between valid branches are interpolated by the LEM software from the known source code information Note that in some circumstances the interpolated code may not be showing the route taken by the execution between the two branches In particular it will not show interrupt code Looking at Memory Memory contents may be viewed by selecting the View gt Memory menu item or by clicking the following toolbar button The following dial
17. er equipment resulting from accidents or any other causes during the operation according to this document LEM User Manual 3 Contents LEM User Manual 4 PU Registers I O Registers 6 LEM User Manual 5 1 Introduction The LEM is a low cost evaluation module for the 3664 3664N 3672 3687 and 3694 members of the Hitachi H8 Tiny family of microcontrollers This manual describes the functions supported by the evaluation module for HDI for use with these microcontrollers Abbreviations In this manual the following abbreviations will be used HDI Hitachi Debugging Interface HLL High Level Language LEM Low Cost Evaluation Module Features HDI provides C level debugging for targets that use the E10T interface and firmware The following main features are supported by HDI Flash programming of user code Real time program execution Program download Program Counter breakpoints Step step over step out and go functions Memory set verify fill verify fill query Register functions Trace buffering The LEM3664 is not designed for use as a production programmer and therefore should not be used in such a manner LEM User Manual 6 Overview The target hardware LEM3664 board for HDI has the main hardware components as shown below I O Interface Supply Power LED Cable Reset P S Monitor E10T Target Connected SUPERVISOR S 4 0 Control LEVEL i CONVERSION Enumerato
18. imum PULSE1 Driver Info Peripheral pin connection Timer I Show used peripherals pins Header file name C LEM3664 Project tutorSPULSE1 h a Source file name JONLE M3664 Project tutor PULSE1 c a Description i output Figure 52 Adding the Pulse Output Driver 26 Change the Name for component item to PulseOutput LEM User Manual 43 27 Click the OK button The following window is displayed Driver Properties 2 x Driver type Pulse Output Close Name for component item PulseOutput Pin text FO Driver Info Properties Modify Set default clock and start function Use all Stop function o Enable interrupt function Disable interrupt function T Clear interrupt function Is interrupt requested function E Pulse output peripheral Timer Initialisation Initialise function cllnitialisePulseO utput oa Description Pulse output Figure 53 Pulse Output Driver Properties Dialog Box 28 Click the Use all button then double click Pulse output peripheral The following window is displayed x Interval X Event Counter A Pulse Output X Divider Output X User Defined Count min E Count max ps Period ps 2 Frequency Hz 4es006 Error E r Lead half cycle count j Lead half cycle 100 Lead half cycle error as I Lead half cycle high Initialise Output Pin MV Start pulse out
19. ions 5 For the purposes of this tutorial select Download and execute emulator firmware the default option LEM User Manual 49 System Configuration l After you have selected the Download and execute emulator firmware option from the Begin session dialog box the following dialog box is displayed System Configuration Ea Controller resides Target controller Hrd6Ed g C LEM using SOIF C Via E107 interface Power supply threshold p oo Viole 16 00 meseelarie ele NMI control Single step interrupts Eyalution module contol I Permit interrupts il Weer FROM Includes LEM firmware Kk O DK g I code hex Cancel Figure 64 System Configuration Dialog Box Note that some options will not be available depending on the chosen settings for the Target controller and Controller resides sections Clicking one of the following radio buttons causes certain options in the dialog box to become selectable e LEM standalone e LEM using SDIP e Via E1OT interface The following table lists each option and the circumstances for which it is available Power supply Specify the voltage to be used Unavailable threshold using LEM in standalone mode Clock Select whether user clock source used and 1f so its frequency Unavailable if in standalone mode User clock source mandatory if using E10T interface optional if using SDIP LEM User Manual 50 _ interface NMI control
20. ite http www hmse com To uninstall this update use the Add Remove Programs icon in Control Panel and select Hitachi Debugging Interface for LEM 3664 from the list Press the Finish button to exit this installation 4 Back ancel Figure 24 Installation Completed 12 Click the Finish button to return to the LEM3664 Software Tools window LEM User Manual 25 Installation of CodeLines 3664 1 Click the CodeLines 3664 option on the LEM3664 Software Tools window The following window is displayed Figure 25 CodeLines 3664 Welcome Screen 2 Click the Next button The following window is displayed Figure 26 Software License Agreement LEM User Manual 26 3 Click the Yes button to indicate your agreement to the Software License Agreement The following window is displayed Figure 27 User Information 4 Type your name company name and product serial number You may type any alphanumeric sequence for the serial number 5 Click the Next button The following window is displayed Choose Destination Location Figure 28 Choose Destination Location LEM User Manual 27 6 Click the Next button to accept the default destination location The following window is displayed Setup Type Figure 29 Setup Type 7 Click the Next button to select a Typical setup type The following window is displayed Select Program Folder Ones DI for LEM 3664 Hitachi Embedded Work
21. n v3 50 Figure 14 Setup Complete 10 Click the Finish button to return to the LEM3664 Software Tools window LEM User Manual 20 Installation of HDI3664 1 Click the HDI3664 option on the LEM3664 Software Tools window The following window is displayed Hitachi Debugging Interface for LEM 3664 Installation xj Figure 15 HDI3664 Welcome Screen 2 To read the release notes click the Read Release Notes button otherwise click the Next button The following window is displayed Software License Agreement x Figure 16 Software License Agreement LEM User Manual 21 3 Click the Next button to indicate your agreement to the Software License Agreement The following window is displayed Hitachi Debugging Interface for LEM 3664 Installation Figure 17 Select Components 4 Click the Next button to install all the components The following window is displayed Hitachi Debugging Interface for LEM 3664 Installation Figure 18 Additional Information LEM User Manual 22 5 Click the Next button to accept the default choices The following window is displayed Hitachi Debugging Interface for LEM 3664 Installation Ea Figure 19 Select Destination Directory 6 Click the Next button to accept the default installation directory The following window is displayed Hitachi Debugging Interface for LEM 3664 Installation xj Figure 20 Select Backup Directory L
22. og box shown will be displayed Open Memory Window X Address am OK Cancel Format a LEM User Manual 55 Figure 69 Selecting Memory By Address The Address entry can be either a pure address or a symbol A typical memory window with the data grouped as word and displayed as hex and decimal values is shown below Byte Memory H OO00FB80 AOAC TF Figure 70 Memory Window To edit memory contents move the mouse cursor to the value you want to change and double click to display the following dialog box Edit byte at H OOOOFBC4 IY Verify Cancel Figure 71 Editing Memory Contents Type the new value and click the OK button What Else Is There The other main windows include the System Status CPU register and I O register windows System Status The System Status window details the current setting for the session including target platform memory usage and events 1 e breakpoints Open this window by selecting the View gt Status menu item or use following toolbar button LEM User Manual 56 A window similar to the following is displayed System Status Oo 0 x Item Status Target System Evaluation Module Connected Session Name C LEM3664 Project tutor Debug tutor hds Program Name C LEM3664 Project tutor Debug tutor abs Platform A Memory A Events fo Figure 72 System Status Session Window Click the Platform tab to display further status information System Sta
23. ons If the Download user program option 1s selected a further window is displayed LEM User Manual 60 File name Browse Cancel Figure 82 Load a File This window enables you to specify the name of file to be programmed into the H8 3664 either by typing the name directly or by clicking the Browse button locating the program file and clicking the Open button Note that the program file must conform to the Motorola S specification System Configuration System Configuration E4 Controller resides Target controller H8 3664 C LEM using SDIP C Via E107 interface Clock User clock f 6 00 Requency ne Single step interrupts Power supply threshold 5 00 vate HMI control s Evalution module cantal W Permit interrupts e Weer ROM Includes LEM firmware OF it ID code hex a Cancel Figure 83 System Configuration Dialog Box This window is displayed whenever an option is selected on the Begin Session window or if the Setup gt Configure Platform menu option is selected A full description of the fields available on this window is given in the Tutorial section of this user manual LEM User Manual 61 Availability of HDI Menu Options Note that the following HDI menu options are not available when used with the LEM3664 View menu e Performance Analysis Window e Profile List e Profile Tree Memory menu e Configure Map
24. ox will be re displayed CodeLines Project Wizard Section 1 Project Creation Name C LEM3664 Project tutor pdp Main header file name C LEM3664 Project tutor h ee Main source file name C LEM3664 Project tutor c a Click on Finish to create the new project and to change the project settings lt Back Finish Cancel Help Figure 40 Displaying Project Header File and Source File Names 12 Click Finish The following window is displayed CodeLines Project Wizard Section 2 Project Details Gunes Section 2 Project Details The CodeLines Project Wizard will now guide you through the setting of the project details i Cancel Help Figure 41 Project Details LEM User Manual 38 13 Click the Next button The following window is displayed Figure 42 Project Details Main Options 14 Click the Next button The following window is displayed Figure 43 Project Details Processor Options 15 For the Processor select HD64F3664BP Change the Clock fc frequency to 16 0 MHz LEM User Manual 39 16 Click the Next button The following window is displayed startup INTRS 1 INTRS 2 INTRSY 3 INTRS 4 INTRS 5 INTRSY6 INTNMI Trap instructi TRAPINSTO Trap Instructi TRAPINST1 Figure 44 Project Details Interrupts Click the Next button The following window is displayed IAR TINY Compiler Figure 45 Project Details 30
25. path in Windows 2000 causes problems This may occur when compiling your first project Please check the file names Stepping through 2 or more instructions when the step rate is set to slow may cause Command Not Ready to be displayed Increase the rate value in the Step Program Dialog box to overcome this issue 64 LEM User Manual APPENDIX B ASCII Code Table
26. pporting a 64 KByte address space H8 3664 and 3664N Memory Map H 0000 Vector Area H 0400 H 0800 Free Flash H 7FFEF H F780 Monitor Stack Data H FB80 On chip RAM 1 KByte H FF80 Internal I O Registers H FFFF Figure 2 H8 3664 Memory Map End Of Memory LEM User Manual 9 H8 3672 Memory Map H 0000 H 0400 H 0800 H 3 FFF H F780 Monitor Stack Data H FB80 On chip RAM 1 KByte H FF80 Internal I O Registers H FFFF End Of Memory Figure 3 H8 3672 Memory Map H8 3687 Memory Map H 0000 H 0400 H 0800 H DFFF es On Chip RAM H EFFF H F700 I O Registers H F77F Monitor Stack Data H FB80 On chip RAM 1 KByte H FF80 Internal I O Registers End Of Memory H FFFF Figure 4 H8 3687 Memory Map LEM User Manual H8 3694 Memory Map H 0000 H 0400 H 0800 H 7FFF H F730 I O Registers H F74F Monitor Stack Data H FB80 On chip RAM 1 KByte H FF80 Internal I O Registers H FFFF Vector Area Figure 5 H8 3694 Memory Map 10 End Of Memory LEM User Manual 11 Hardware Installation The procedure for hardware installation is dependant on whether you are connecting the low cost evaluation module to a target system using the external E10T interface or the internal 42 pin SDIP header If you are connecting the evaluation module to a target system using the external E10T interface u
27. put V Enable output J7 Enable interrupt J Enable standby mode Figure 54 Changing Pulse Output Properties 29 Change the Frequency to 1000 Hz 30 Change the Lead half cycle to 10 31 Select Lead half cycle high LEM User Manual 44 32 Click the Initialise Output Pin button The following window is displayed Device P76 TMOV fal Pin 140 mod Interrupt edae t rpa Pb CMOS output Bisingjed N channel output Falling edae ae a CE in Set function c p di fe Toman puller ME mae m omenean Nose elinmaton m Output latch v C Logic 1 Logic 0 Figure 55 Initialisation of Output Pin 33 Change the I O mode to CMOS output Change the Output latch to Logic 1 Click the OK button 34 Clear the Enable interrupt tick box Click the OK button 35 The Driver Properties dialog box will be re displayed 36 For the pin text type Pulse 37 Click the Close button 38 Select the Project gt Build menu item 39 The project will be built with the results of the build being displayed in the Output window uilding Project reating report file reating C startup file reating IO header file eating dbsct c file eating stacksct h file eating sbrk c file eating sbrk h file eating vect c file eating vect h file ating HEW project file ating HEW workspace file culating mirror bytes edutput ing IO include file ma
28. r LED User Target Reset P S Monitor Target Connected 42 Way Shrink DIP Header Control Onboard M 16 MHz 8 3664 Oscillator heal ain an an annie etait USB INTERFACE 3 USB Cable e a e NR Evaluation module Board Boundary USB PORT ON Optional only for use with H8 3664 Figure 1 LEM3664 The evaluation module has one USB port one E10T Interface and one 42 pin SDIP header The USB port is connected to the corresponding port on the PC using a standard USB cable supplied with the evaluation module The E10T interface enables connection to the target system using the supplied cable The 42 pin SDIP header enables direct connection to the target system PCB LEM User Manual T 2 Installation System Requirements Hardware The minimum hardware configuration required to install HDI with the LEM3664 is as follows e IBM PC or 100 compatible with a 486 or better A Pentium processor is recommended 1 free USB port 32 MB or more of memory Mouse recommended VGA monitor 80 MB of hard disk space CD ROM Drive to install the tools and tutorial files Software The operating system for the PC to which the evaluation module will be connected must be one of the following Windows 98 Windows ME Windows 2000 Windows XP LEM User Manual 8 System Specification MCU Operating Modes The H8 Tiny series of microcontrollers have a single mode of operation su
29. rk ing main header fil ting main source fil ing drivers utput t 0 ris 0 ing s Figure 56 Project Build Results LEM User Manual 45 Using Hitachi Embedded Workshop to Compile and Link the Project 1 From CodeLines select the Tools gt Compiler IDE menu item to launch the Hitachi Embedded Workshop or launch Hitachi Embedded Workshop from your Start menu The following window is displayed Welcome i Ea m Options m Create a new project workspace EROS eeeeeeeeeeeeeeeeeseseseeseeseeeseeeseeseeeeeseeeeeeseeeeseeseeeseeeees Cancel Open a recent project workspace Administration pas C Browse to another project workspace Figure 57 HEW Welcome Screen 2 Select Browse to another project workspace and click OK The following window is displayed Look jn Qtw ics gl c Files of type Workspaces hws Cancel Z Figure 58 Open Project Workspace 3 Browse to the C LEM3664 Project folder and double click the tutor folder LEM User Manual 46 4 Select the tutor workspace and click the Open button The following window is displayed 3 tutor Hitachi Embedded Workshop File Edit Project Options Build Tools Window Help Pee a E Osea S Bel wl TA tutor E tutor B E Project Files cstartup c B Dbsct c PulseQutput c Sbrk c tutor c Vect c m on H Projects J Navigation
30. se the following procedure 1 Ensure the target board has a 14 way interface compatible with the 0 1 pitch E10T Tiny interface header cable used by the LEM3664 4K7 pull up resistors are recommended on each of the five signals to the H8 Tiny device The specification of this interface serial directions with reference to the target system 1s described in the following table Function Description 3664F N 3672F Pin Function Description 3664F N 3687F 3687F 3694F Pin 3694F amp 3672F Pin Serial Clock P8 7 z GND Ground Vss Gnd on LEM GND Ground Vss Serial Transmit P8 6 A GND Ground Vss Target NMIn NMIn UVCC Detect target Vcc supply voltage Gnd on LEM GND Ground Vss Serial Receive P8 5 A GND Ground Vss RESETn Target RESETn RESn UCONNECT Detect whether Vss target connected Table 1 Pin Assignment for the E10T Tiny Interface 2 OOOO OOOO I O00 OO 13 H8 3664F Device 14 Way Connector Diagram 1 Pin Numbering of Connector on User s System and Example Pull up Resistor Diagram LEM User Manual 12 2 Ensure that pin 14 UCONNECT is connected to GND on the target board 3 Plug one end of the supplied cable into the E10T interface on the LEM3664 4 Plug the other end of the supplied cable into a compatible E10T interface on the target board LEM User Manual 13 If you are connecting the evaluation module to a target system using the internal 42 pin SDIP header please note th
31. shop Internet Explorer Online Services tartUp Figure 30 Select Program Folder 8 Click the Next button to accept the default program folder name 9 The necessary files will be copied from the CD ROM LEM User Manual 28 10 When Setup has completed the installation the following window is displayed Figure 31 Setup Complete 11 Click the Finish button to return to the LEM3664 Software Tools window LEM User Manual 29 Installation of Adobe Acrobat Reader Product documentation 1s supplied as PDF files requiring Adobe Acrobat Reader to be installed on your computer If you do not already have this program installed on your computer complete the following steps 1 Click the Adobe Acrobat Reader option on the LEM3664 Software Tools window The following window is displayed Acrobat Reader 5 0 Setup x Welcome to the Reader 5 0 Setup program This program will install Reader 5 0 on your computer It is strongly recommended that you exit all Windows programs before running this Setup program Click Cancel to quit Setup and then close any programs you have running Click Nest to continue with the Setup program WARNING This program it protected by copyright law and International treaties Unauthorized reproduction or distribution of thie program or any portion of it may result in severe civil and criminal penalties and will be prosecuted to the maximum extent possible under law
32. t Reader This is required to read the online documentation from outside of this installer menu You can install it here if you do not already have it Exit www hmse com www andtr com Figure 7 LEM3664 Software Tools Installation Choices LEM User Manual 16 3 Click Hitachi Embedded Workshop The following window is displayed InstallShield Wizard X Welcome to the InstallShield Wizard for Hitachi Embedded Workshop with IAR Tiny Toolchain The InstallShield Wizard will install Hitachi Embedded Workshop with IAR Tiny Toolchain 3 50a on your computer To continue click Next Figure 8 Installation Welcome screen 4 Click the Next button The following window is displayed License Agreement Please read the following license agreement carefully Press the PAGE DOWN key to see the rest of the agreement HITACHI MICROSYSTEMS EUROPE LIMITED the Licensor which expression shall include its subsidiaries agents successors and assigns is authorised to license the Software the Software contained in the package and upon opening the sealed package the Licensee accepts a non exclusive non transferable Licence to Use as hereinafter defined one copy of the Software on a single computer system the System as a Single User which means only one Licensee user may Use the Software and the x Do you accept all the terms of the preceding License Agreement If you choose No the setup
33. tus Oo ol x Monitored signals for E10T header WCC SDIP VCC E10T header RESET PDIP RESET SDIP connected E1LOT header connected A Session Platform Memory 4 Events Figure 73 System Status Platform Window LEM User Manual 57 CPU Registers Contents of the CPU registers can be viewed and amended using this window Open this window by selecting the View gt Registers menu item or click the following toolbar button Fil Registers QO000000 QO000000 QO000000 QO000000 QO000000 QO000000 QOQOF AsO 000404 aeea Figure 74 Registers Window To edit a register either double click the register or right click the register and select the Edit menu item The following window will be displayed allowing you to enter a new value Register ERO Value Set As C Whole Register ance Figure 75 Editing a Register I O Registers Contents of the I O registers can be viewed and amended using this window Open this window by selecting the View gt I O Area menu item 140 Registers Interrupt Controller Address Break Controller Low Power Control Flash Memory Controller I 0 Ports watchdog Timer Serial Communication Interface 3 IIC Bus Interface Controller 4 D Converter Figure 76 I O Registers Window LEM User Manual 58 Double click a device to display its I O registers amp 170 Registers OR x T1mer Y OOOOFFAQ TCRO OOOOFFAL TC
34. ure 49 CodeLines Control On Chip Peripherals and External Components Windows 22 In the On chip Peripherals window locate the Timers section and double click Timer V 23 Click the Pulse Output tab The following window is displayed Device Timer x Interval X EventCounter X Pulse Output x Divider Output x User Defined Count min Count max s CO Period ps po Frequency Hz s006 Error E Lead half cycle count Poo Lead half cycle fico Lead half cycle error in T Lead half cycle high Initialise Output Pin IV Start pulse output IV Enable output J7 Enable interrupt T Enable standby mode Cancel Initialise Add Driver siali Figure 50 Initialisation of the Pulse Output for Timer V LEM User Manual 42 24 Click the Add Driver button The following window is displayed Add Driver 2a x Driver type ia Cancel Name for component item 11 characters maximum TIMER Driver Info Peripheral pin connection Timer y M Show used peripherals pins Header file name C LEM3664 Project tutor TIMER T h Z Source file name Ic SLEM3664 Project tutorS TIMER 1 c ne Description m Figure 51 The Add Driver Dialog Box 25 From the Driver type list select Pulse Output The following window is displayed Add Driver 21x Driver type Pulse Output Cancel Name for component item 11 characters max
35. will close To install Hitachi Embedded Workshop with IAA Tiny Toolchain v3 50a you must accept this agreement lrstallohreld Figure 9 Software License Agreement LEM User Manual 17 5 Click the Yes button to indicate your agreement to the Software License Agreement The following window is displayed InstallShield Wizard Choose Destination Location Select folder where Setup will install files Figure 10 Choose Destination Location 6 Click the Next button The following window is displayed InstallShield Wizard Setup Type Select the Setup Type to install Figure 11 Choose Setup Type LEM User Manual 18 7 Leave the Typical option selected and click the Next button The following window is displayed InstallShield Wizard Select Program Folder Please select a program folder CodeLines 300L HDI for LEM 3664 MadOnion com PowerQuest PartitionMagic 6 0 StartUp Fistellarieya Figure 12 Select Program Folder 8 Click the Next button to continue The following window is displayed Start Copying Files Review settings before copying files Figure 13 Start Copying Files LEM User Manual 19 9 Click the Next button File will be copied from the CD ROM After a few moments the following window will be displayed InstallShield Wizard InstallShield Wizard Complete 3 Setup has finished installing Hitachi Embedded Workshop with 50a on your computer AR Tiny Toolchai

Download Pdf Manuals

image

Related Search

Related Contents

COM 122 INTRO TO INTERNET THEORY BOOK  Série de Solution - Greenway Water Technology  DIGラベルされたDNAを直接検出する  顕微鏡総合 - 株式会社 ミツトヨ  - Careway  Char-Broil 463270614 barbecue  programme de la formation  [型番ー ERK803ーW,ERK8032W,ERK8033W,ERK8034W  manuel d`utilisation  User and Installation Guide  

Copyright © All rights reserved.
Failed to retrieve file