Home

User`s Manual: Low-Voltage Starter Kit for Motor Control

image

Contents

1. Figure 8 10 General Options Selecting the C Library User s Manual U18220EE4VOUMOO 31 Chapter 8 32 Using the IAR Embedded Workbench Options for node SK BLDC_HAIl_ 714 x Category C C compiler Assembler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Figure 8 11 General Options Setting the Stack and Heap 8 4 Compiler Options Options for node SK BLDC HAII 714 X Category Factory Settings General Options Language Optimizations Output List Preprocessor Diagnostic 4 gt Assembler Custom Build Build Actions Language Linker fC Debugger C Embedded G IE 78 C Evtended Embedded C IECUBE Automatic extension based MINICUBE Simulator Require prototypes TK 78 C Relaxed ISO ANSI C Strict ISO ANSI Enable multibyte support Enable IAR migration preprocessor extensions Figure 8 12 Compiler Options Language Settings User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Chapter 8 Options for node SK BLDC HAll 714 x Category Factory Settings General Options Language Optimizations Output List Preprocessor Diagnostic 4 gt Assembler Custom Build Build Actions Linker Debugger IE 78 Enabled transformations IECUBE Common subexpression elimination MINICUBE Loop unrolling Simulator Function inlining TK 78 Code motion
2. NEC User s Manual Low Voltage Starter Kit for Motor Control Documen t No U18220EE4VOUMOO Date published January 2008 NEC Electronics 2008 Printed in Germany Legal Notes e The information in this document is current as of November 2007 The information is subject to change without notice For actual design in refer to the latest publications of NEC Electronics data sheets or data books etc for the most up to date specifications of NEC Electronics products Not all products and or types are available in every country Please check with an NEC Electronics sales representative for availability and additional information No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Electronics NEC Electronics assumes no responsibility for any errors that may appear in this document NEC Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this document or any other liability arising from the use of such products No license express implied or otherwise is granted under any patents copyrights or other intellectual property rights of NEC Electronics or others e Descriptions of circuits software and other related information in this document are provided for illustrative purposes in semiconductor produ
3. Dual line spacing 222102 a agnos ics i Structured asse ibl l includec Figure 8 19 Assembler Options Listings Note All other Assembler Options can be left as the default setting 36 User s Manual U18220EEA4AVOUMOO Using the IAR Embedded Workbench Chapter 8 8 6 Linker Options Options for node SK BLDC_HAIl_714 Category Factory Settings General Options C C compiler Output Extra Output define Diagnostics List Config Proce 4 gt Assembler Custom Build Build Actions Secondary output file Sk BLDC H ll 14 d26 None for the selected format Debugger IE 78 ia Debug information for C SPY Siml IV With runtime control modules on B With 1 0 emulation modules Buffered terminal output v Allow C SPY specific extra output file 9 Diner Jutput format fintelextended Format variant None Module local symbols Include all fer fire con Figure 8 20 Linker Options Primary File Output Options for node SK BLDC HAIl 714 ed Category Factory Settings Output Extra Output ttdefine Diagnostics List Config Proce gt IV Generate extra output file Debugger IE 78 IECUBE MINICUBE Simulator Output format inte extended TK 78 Format variant None v Figure 8 21 Linker Options Secondary File Output User s Manual U18220EE4VOUMOO 37 Chapter 8 Using the IAR Embedded Workbench Options for node
4. Or press the Load File symbol in the ICON taskbar The following screen should open MM QB Programmer 0 x File Device Help Begx ss N File name BLOC Hali 714 V2 Files of type S rec Hex files rec s hex Cancel A p Pulse 0 Range Chip Freq 20 00MHz Multiply 1 00 l i ril hi NUM Hex File Selection Locate the file as shown in the window from the downloaded IAR project The file will be located as follows saved directory BLDC_Hall_714_GUI Debug Exe Select the file BLDC_714_GUI hex and press the OPEN button This will close the LOAD file window The following should be displayed on the main screen gt Open Load File Success read Load file The Flash programming setup is now complete Now press the AUTOPROCEDURE button to start the programming sequence The following sequence should be seen gt AutoProcedure Epv Blank check Block 000 Not blank Erase need User s Manual U18220EE4VOUMOO 23 Chapter 7 24 Note 7 2 Programming the Microcontroller Erasing Erase Chip PASS Program Chip 10 20 30 40 50 60 70 80 90 100 PASS Verify Chip 10 20 30 40 50 60 70 80 90 100 PASS AutoProcedure Epv PASS gt The Verify Chip operation is enabled by setting the Read Verify after Program option in the Advanced Tab of the Device Setup Window The 78F0714 devic
5. QB Programmer Next the device needs to be set up from the menu follow the following sequence Device gt Setup Or press the Spanner symbol in the ICON taskbar The following screen should appear User s Manual U18220EEA4VOUMOO 21 Chapter 7 Programming the Microcontroller lt q QB Programmer File Device Help J Le Z wia INE Device Setup Device Setup v On Target Frequency 20 00 Multiply rate 1 00 Figure 7 5 Device Setup Set the details for the COM port Speed etc as shown above Note Enter your COM port number as this will vary Next press the PRM File Read button and the following screen should appear Select the 78F0714 prm file and press the Open button M QB Progammer i i OCOOCOCOCOC S EE nf xl File Device Help Bim We 7 Bia te Devicesetu O x gt QB Programmer startup Programmer Command standby Standard Advanced vean gt gt Device Setup Open Parameter File Read F Look in O PRM 78F0714_V112 t ck EJ gt f gt Device Setup 4 Ready Figure 7 6 Parameter File Read 99 User s Manual U18220EEA4VOUMOO Programming the Microcontroller Chapter 7 Figure 7 7 Then press the OK button to return to the main menu system The text in the main screen should read gt Device Setup Parameter File Read Pass gt Next press the select the HEX file to be programmed from the Menu File gt Load
6. SK BLDC HAll 714 Factory Settings General Options C C compiler Output Extra Output define Diagnostics List Config Proce gt Assembler Custom Build Always generate output Range checks Build Actions v Segment overlap warnings Generate errors No global type checking C Generate wamings Debugger Disabled EE WaMu EDGE MINICUBE Suppress all wamings Simulator Suppress these diagnostics TK 78 Treat these as warnings Treat these as errors Figure 8 22 Linker Options Diagnostic settings Options for node SK BLDC HAll 714 Factory Settings Output Extra Output define Diagnostics List Config Proce gt v Generate linker listing v Segment map Symbols Debugger C None IE 78 Ag IECUBE E ik MINICUBE Module map Simulator TK 78 Figure 8 23 Linker Options Generate MAP File Output 38 User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Chapter 8 Figure 8 24 Note 8 7 Note Options for node SK BLDC HAll 714 RI Category Factory Settings General Options C C compiler Output Extra Output define Diagnostics List Confia Proce 4 gt Assembler Linker command file Custom Build IV Override default TOOLKIT_DIR config Ink 781071 4 xcl m Build Actions Debugger IE 78 IECUBE Override default program entry MINICUBE Entrylabel program start Simulator C Defined by ap
7. Singapore 307684 Tel 6253 8311 http www sg necel com NEC Electronics Korea Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam Ku Seoul 135 080 Korea Tel 02 558 3737 http www kr necel com Readers Purpose Organization Legend Note Caution Numeric Notation Prefixes Preface This manual is intended for users who want to understand the functions of the low voltage starter kit for motor control This manual presents the hardware manual of the low voltage starter kit for motor control This system specification describes the following sections Kit Contents Hardware Setup Standalone Operation Drive and Motor Protection Software Setup Using the IAR C Compiler and Source Code Debugger Download and Debug the Code GUI Operation Symbols and notation are used as follows e Weight in data notation Left is high order column right is low order column e Active low notation xxx pin or signal name is over scored or xxx slash before signal name Memory map address High order at high stage and low order at low stage Additional remark or tip Item deserving extra attention Binary xxxx or xxxB Decimal xxxx e Hexadecimal xxxxH or Ox xxxx representing powers of 2 address space memory capacity e K kilo 210 1024 e M mega 220 10242 1 048 576 e G giga 230 10243 1 073 741 824 User s Manual U18220EE4VOUMOO 7 Table of Contents Chapter 1 Intr
8. Type based alias analysis Enable callt runtime library calls Byte alignment of data Figure 8 13 Compiler Options Optimisation Options for node SK BLDC HAII 714 X Category Factory Settings General Options Language Optimizations Output List Preprocessor Diagnostic gt Module type Assembler Custom Build Build Actions Override default Linker Program Module Debugger Library Module IE 78 IECUBE MINICUBE T Object module name mei v Generate debug information Figure 8 14 Compiler Options Output Set for Debug User s Manual U18220EE4VOUMOO 33 Chapter 8 Using the IAR Embedded Workbench Options for node SK BLDC HAll 714 x Factory Settings Language Optimizations Output List Preprocessor Diagnostic 4 gt Custom Build v Output list file Build Actions v Assembler mnemonics Debugger IE 78 Output assembler file IECUBE Include source MINICUBE Include compiler call frame information Simulator TK 78 OK Cancel Figure 8 15 Compiler Options Compiler Listings Options for node SK BLDC HAll 714 x Category Factory Settings General Options Language Optimizations Output List Preprocessor Diagnostic 4 gt Assembler Custom Build Ignore standard include directories TOOLKIT_DIR SINC Build Actions TOOLKIT DIR NNCACLIBS Linker Additional include directories one per line Debugger IE 78 IECUB
9. 1 http www necel com Santa Clara CA 95050 2554 U S A Tel 408 5886000 http www am necel com Europe NEC Electronics Europe GmbH Arcadiastrasse 10 40472 Dusseldorf Germany Tel 0211 65030 http www eu necel com United Kingdom Branch Cygnus House Sunrise Parkway Linford Wood Milton Keynes MK14 6NP U K Tel 01908 691133 Succursale Francaise 9 rue Paul Dautier B P 52 78142 Velizy Villacoublay C dex France Tel 01 30675800 Tyskland Filial Taby Centrum Entrance S 7th floor 18322 Taby Sweden Tel 08 6387200 Filiale Italiana Via Fabio Filzi 25 A 20124 Milano Italy Tel 02 667541 Branch The Netherlands Steijgerweg 6 5616 HS Eindhoven The Netherlands Tel 040 2654010 User s Manual U18220EE4VOUMOO Asia amp Oceania NEC Electronics China Co Ltd 7th Floor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 P R China Tel 010 82351155 http www cn necel com NEC Electronics Shanghai Ltd Room 2511 2512 Bank of China Tower 200 Yincheng Road Central Pudong New Area Shanghai 200120 P R China Tel 021 58885400 http www cn necel com NEC Electronics Hong Kong Ltd 12 F Cityplaza 4 12 Taikoo Wan Road Hong Kong Tel 2886 9318 http www hk necel com NEC Electronics Taiwan Ltd 7F No 363 Fu Shing North Road Taipei Taiwan R O C Tel 02 27192377 NEC Electronics Singapore Pte Ltd 238A Thomson Road 12 08 Novena Square
10. 2 Remove jumpers 2JP5 2 5 JP5 3 6 and 2JP7 1 2 3 Ensure that link 2SB24 is open User s Manual U18220EE4VOUMOO 25 Chapter 8 Using the IAR Embedded Workbench Z d iv uw J en tt Y WA i i 7 fdr 1 et ar li e f LG a i gt Ket 20 11 EE err ELE y P E 112230 A a wi g gt RIS TH end cae 24 afi jar a CT A 73 ri 5 SAS XS Po a WPI PeP 3399 293 mIPl PIi P 3 Qus ai rs alit 2JP5 Microcontroller Board OCD Configuration 2JP7 Figure 8 1 iSM mrri MN 2SB24 Figure 8 2 Microcontroller Board OCD Configuration zm Reconnect the M 78F0714 board to MC IO board Attach the on chip debugging emulator s target connector to 2JP7 on the M 78F0714 and the USB cable to your computer as shown below 26 User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Chapter 8 g Aa y A L m un wo E iyu wa 2 C E E B i Ja p r Lx rit JS BS044 Figure 8 3 OCD Debugger Unit Connection The MC 78F0714 must be operated at 20 MHz This requires the use of the external 20 MHz oscillator supplied with the kit which needs to be mounted in the socket inside the OCD unit Please refer to the on chip debugger user s manual for information about how to attach the external oscillator 8 3 IAR Embedded Workbench Start up 1 Open the IAR workbench The following Screen should be opened Note the exact display may vary depending on if this
11. E MINICUBE Simulator TK 78 Defined symbols one per line Preprocessor output to file Preserve comments Generate Hine directives Figure 8 16 Compiler Options Pre Processor Settings Note All other Compiler Options settings can be remain as the default settings 34 User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Chapter 8 8 5 Assembler Options Options for node SK BLDC_HAIl_714 x Category Factory Settings General Options C C compiler Language Output List Preprocessor Diagnostics Extra Options v User symbols are case sensitive Custom Build Build Actions Allow mnemonics m first column Linker Allow directives m first column Debugger IE 78 Enable multibyte support IECUBE MINICUBE Macro quote characters Simulator lt gt TK 78 Figure 8 17 Assembler Options Language Settings Options for node SK BLDC HAll 714 Factory Settings General Options C C compiler Language Output List Preprocessor Diagnostics Extra Options Custom Build v Generate debug information Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Figure 8 18 Assembler Options Output set for Debug User s Manual U18220EE4VOUMOO 35 Chapter 8 Using the IAR Embedded Workbench Options for node a i Linker Debugger dem IECUBE MINICUBE ulator Simulator 1K78 r Cu define Intemalisymbols
12. al U18220EE4VOUMOO Chapter 1 Figure 1 1 Introduction The low voltage starter kit for motor control MC LVKIT 714 is a complete 3 phase motor control evaluation system for NEC Electronics microcontroller application specific standard products ASSP s for motor control The kit contains all necessary hardware and software to quickly set up and run a low voltage brushless DC motor BLDCM Motor Control Starter Kit User s Manual U18220EE4VOUMOO 9 10 Chapter 2 Kit Contents MC 78F0714 microcontroller board containing the uPD78F0714 ASSP microcontroller MC I O interface board Connects the microcontroller board to the power module Low voltage power module MC PWR LV containing the inverter MOSFET BLDC motor Pitman N2311 12V motor or e Ametek 150093 50 24V motor FW7362 15 DC power supply 20 MHZ oscillator For use with an On Chip Debug Unit For information about the electrical characteristics and hardware functions of the uPD78F0714 microcontroller refer to PD78F0714 User s Manual U16928bEJ1VOUD00 For the instruction descriptions refer to the 78KO Series Instruction User s Manual U12326E User s Manual U18220EE4VOUMOO Chapter 3 Hardware Setup The kit can be purchased as one unit with all three boards connected as shown below Replacement board can be ordered separately nuts Dar a A q ta y rp ft t LZ FI n iiA ici wr t P AEVO Figure 3 1 MC LV KIT 714 Kit Configur
13. ated specifications governing the device 6 INPUT OF SIGNAL DURING POWER OFF STATE Do not input signals or an I O pull up power supply while the device is not powered The current injection that results from input of such a signal or I O pull up power supply may cause malfunction and the abnormal current that passes in the device at this time may cause degradation of internal elements Input of signals during the power off state must be judged separately for each device and according to related specifications governing the device User s Manual U18220EE4VOUMOO America NEC Electronics America Inc 2880 Scott Blvd Regional Information Some information contained in this document may vary from country to country Before using any NEC product in your application please contact the NEC office in your country to obtain a list of authorized representatives anddistributors They will verify Device availability Ordering information Product release schedule Availability of related technical literature Development environment specifications for example specifications for third party tools and components host computers power plugs AC supply voltages and so forth e Network requirements In addition trademarks registered trademarks export restrictions and otherlegal issues may also vary from country to country NEC Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki Kanagawa 211 8668 Japan Tel 044 435511
14. ation Ls To attach the motor connect the phase U V and W terminals to the J3 connector block on the MC PWR LV power board and the Hall sensor terminals to the J5 connector block on the MC IO control board Table 3 4 Motor Connections Motor Terminals I O Board Power Board MC IO MV PWR LV Motor terminal connections are shown in Figure 3 2 and Figure 3 3 User s Manual U18220EE4VOUMOO 11 Chapter 3 Hardware Setup Thai Ec niire a 2 Funan T5 Yl z E A A Pa m kN db Figure 3 2 Motor Phase Connections l Figure 3 8 Hall Sensor Connections Figure 3 2 and Figure 3 3 Pitman Motor shown for reference See Table 3 1 for equivalent Ametek motor connections 12 User s Manual U18220EE4VOUMOO Chapter 4 Figure 4 1 Figure 4 2 Note Standalone Operation For Stand alone use i e without the GUI please check that the following jumpers and links are as defined below Microcontroller Board 2JP5 Pins 2 7 Shorted Pins 3 5 shorted 2JP1 Pins1 2 shorted 2JP6 Pins 1 2 shorted 2JP8 Pins 2 3 shorted 2JP9 Pins 2 3 shorted 2JP10 Pins 2 3 shorted 25B24 shorted I O Board JP1 Pins 2 3 shorted JP2 Pins 2 3 shorted JP3 Pins 2 3 shorted JP11 Pins 1 2 and 3 4 shorted JP5 Pins 1 2 and 3 4 shorted Low Voltage Power Board e SB24 Open e SB25 Shorted e JP2 Shorted Example software to run the motor is pre programmed into the
15. cribe IAR 78KO embedded Workbench development tool environment how to install it on your computer and how to rebuild and download executable code to the microcontroller s flash memory Before proceeding with the tools installation however refer to all of the documentation for the starter kit On Chip Debugger tool and the IAR Embedded Workbench Please note that a 16Kbyte code limited version is included with the On Chip Debug unit and can be used to run the example software Please note that a Flash Programmer On Chip debugging tool or IAR Embedded workbench are not included in this package These items are available from your local NEC Electronics Distributor or contact your local NEC Electronics sales office Software Installation 1 lf a version of the IAR tool is not already installed then install the IAR embedded Workbench tool as per the instructions provided by IAR 2 Ensure that if not already that the example software has been downloaded from the NEC starter kit web site and unzipped into an suitable location The example software can operate on any revision of either the IAR Kick Start or IAR Full versions However it may be necessary to define your own project and workspace This is described later in this chapter MC LVKIT 714 Setup for On chip Debugging To set up the MC LVKIT 714 starter kit for debugging follow the steps below 1 Disconnect the M 78F0714 micro board by separating it from the MC IO board
16. ct operation and application examples The incorporation of these circuits software and information in the design of a customer s equipment shall be done under the full responsibility of the customer NEC Electronics assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits software and information While NEC Electronics endeavors to enhance the quality reliability and safety of NEC Electronics products customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely To minimize risks of damage to property or injury including death to persons arising from defects in NEC Electronics products customers must incorporate sufficient safety measures in their design such as redundancy fire containment and anti failure features NEC Electronics products are classified into the following three quality grades Standard Special and Specific e The Specific quality grade applies only to NEC Electronics products developed based on a customer designated quality assurance program for a specific application The recommended applications of an NEC Electronics product depend on its quality grade as indicated below Customers must check the quality grade of each NEC Electronics product before using it in a particular application Standard Computers office equipment communications equipment test and measurement equipment audio and vis
17. d a Flash Programmer is required not included in the Starter Kit Two programmers are available 1 PG FP4 Full Programmer 2 QB Programmer MiniCube 2 On Chip Debug Low Cost Programmer PG FP4 Programmer QB Programmer MiniCube2 The Graphical Interface for either of these programmers can be downloaded from the NEC Electronics Development tools web site In this guide we have shown only the MiniCube2 QB Programmer The interface for the microcontroller board is the same for both programmers 1 Itis easier to remove the Microcontroller board from the starter kit to program the device However it is possible to program the device while connected to the I O board The set up of the programmer is slightly different although the actual programming of the device is the same Programming the microcontroller with the board attached to the kit is described in section 7 2 of this user guide 2 Older programmers such as the PG FPL can still be used with this device Please refer to the previous version of this user guide for details on how to use this programmer User s Manual U18220EE4VOUMOO0 19 Chapter 7 Programming the Microcontroller 7 1 Progamming with the Microcontroller Board disconnected Download the following files The MiniCube2 QB programmer Flash Programming Graphical Interface From the NEC Electronics Tool download web site The Appropriate IAR Work bench project with or without the GUI Fro
18. ded debugee C Pragram FilesJAR Systeme Embedded Workbench 4 04 78l3ProjectsBLDC Hei 21 4DebugyExelSK BLDC HAR 714 d26 Wed Aug 23 14 46 35 2006 Target reset OCD Control Code v1 01 Device chipnsme u9P078F0714 07141 file version V1 10 Boerdinfo 00008004 produc id 4000 version B rmwere version 01 10 xz Log ad Ek A I A 1417 Integrated Debugger Main Window IAR Embedded Workbench IDE File Edi View Project Debug Emulator Tc D a Bg amp uu T gt 9 S ES ES d a ze a ff 4 d r T e a a e Workspace aa Reset Stop Step Step Step Next Runto Run Exit When Lit Over Into Out Statement Cursor Debugger Debugger Task Bar Icons User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Chapter 8 ZB TAR Embedded Workbench IDE File Edit View Project Debug Emulator EM _ Messages tdl fr Kk Cx Workspace 7 44 Source Browser M E Breakpoints carrier control fauka_ m Disass Sm F QAA dddhkkiss 3 de Bi NEC ELECTRON Memory beet EARE ocn Watch t Locals 5 To TARGET PM dt MODULE QUE aD DESCRIPTI Call Stack Terminal I O ft Code Coverage f tt Profiling f tttttt kt kit IAR Embec ft zi Compiler dn Assembler obey Linker fk kk kk Figure 8 32 Debug Menus User s Manual U18220EE4VOUMOO 45 Chapter 8 46 Using the IAR Embedded Workbench IAR Embedded Workbe
19. e New Project gt Select Empty Project gt OK Enter a project name and set the location for the project This can be the same location as the downloaded example software or a new location e Add the Source files to the project C Source Files Project gt Add Files Locate and select all the C source files e Main c e Fault c e Carrier c Press OPEN Repeat the operation for the Assembler file Project gt Add Files When the Selection window opens select Files of Type gt Assembler Files Select the assembler file e SEC OPT s26 Press OPEN All these file should now appear in the Project Window Left Hand Side of the IDE as shown previously Build Rebuild the Project To build the project press the make icon in the task bar as shown below I ba ve E e D 4 rol main Make Button The build results and any errors or warnings will be displayed in the Messages window at the bottom of the IDE These should be corrected before moving on to the Debugging section User s Manual U18220EEA4VOUMOO 41 Chapter 8 42 8 10 Figure 8 28 Note Using the IAR Embedded Workbench Debugging Once the project has been built without errors the user can now start the debugging session This is done by pressing the Debug icon in the task bar 1 I Start the Debug Session The debugger will connect to the OCD unit and download the code to the Flash memory on the microcon
20. e has now been reprogrammed with the example program using the graphical interface To re program the stand Alone again follow the same procedure as above but download the SK BLDC_HALL_714 IAR project instead The file to be programmed is SK BLDC_HALL_714 hex Progamming with the Microcontroller Board connected The only difference from the procedure defined above is that the QB programmer switches need to be set as shown below a Switch M1 M2 is set to M2 78KO0 b Switch 3 T 5 is set to T Target Power Supply Connect the QB programmer as described previously and ensure that once the setup is completed the 15V DC power supply is connected to the starter kit and switched on User s Manual U18220EE4VOUMOO Chapter 8 Using the IAR Embedded Workbench 8 1 8 2 As already explained the example software for use with the starter kit comprises two versions e Sensored BLDC control without the Graphical Interface GUI e Sensored BLDC control with the Graphical interface GUI As described above the kit is supplied pre programmed for use in Stand Alone mode This is without the GUI The complete example project program for the IAR 78KO Embedded Workbench development tool environment can be downloaded from the motor control web site as detailed in starter kit package i e where this manual was downloaded The software is supplied in source format and can be modified as required The following sections des
21. e material All test and measurement tools including work benches and floors should be grounded The operator should be grounded using a wrist strap Semiconductor devices must not be touched with bare hands Similar precautions need to be taken for PW boards with mounted semiconductor devices 4 STATUS BEFORE INITIALIZATION Power on does not necessarily define the initial status of a MOS device Immediately after the power source is turned ON devices with reset functions have not yet been initialized Hence power on does not guarantee output pin levels I O settings or contents of registers A device is not initialized until the reset signal is received A reset operation must be executed immediately after power on for devices with reset functions 5 POWER ON OFF SEQUENCE In the case of a device that uses different power supplies for the internal operation and external interface as a rule switch on the external power supply after switching on the internal power supply When switching the power supply off as a rule switch off the external power supply and then the internal power supply Use of the reverse power on off sequences may result in the application of an overvoltage to the internal elements of the device causing malfunction and degradation of internal elements due to the passage of an abnormal current The correct power on off sequence must be User s Manual U18220EE4VOUMOO judged separately for each device and according to rel
22. e the motor use the controls in the GUI window The user has the same controls as described for the Stand Alone mode Start Stop Clockwise Anti Clockwise Speed increase decrease 3 It is also possible to change the PID parameters from the GUI interface Please note that changes can only be made when the motor is stopped To change the PID parameters click on the tuning key symbol Figure 6 3 Launching PID Parameter Window The tuning window will open allowing the user to change the values of P or D constants Feedback PID LK c Figure 6 4 PID Parameter Window User s Manual U18220EE4VOUMOO 17 Chapter 6 18 GUI Operation The new parameter values will be down loaded to the starter kit into the internal RAM when the motor is restarted again To make the changes permanent the user will have to modify the definitions in the original IAR project files control h and then rebuild the project This requires a licensed version of either IAR Embedded Workbench Full Version or IAR Embedded Workbench Kick otart Version The three PID values that require changing are define KP DEF define KI DEF define KD DEF Set these parameters to the values shown in the Tuning Window of the GUI User s Manual U18220EE4VOUMOO Chapter 7 Figure 7 1 Figure 7 2 Note Programming the Microcontroller If the user wishes to modify the program in the 78F0714 device on the microcontroller boar
23. is a new installation User s Manual U18220EE4VOUMOO 27 Chapter 8 Using the IAR Embedded Workbench 7 IAR Embedded Workbench IDE Dega tels el rr NR REN mE _ lt Q A Shohih AN crc ca Ce A EO C E cai aac cay ada JANA REI ac cult ls Ns PAR A AA ccc alr CO Ud cala Ud AA cnc a da a EC Figure 8 4 IAR Workbench Opening Screen 2 Next open the IAR Workspace by following the sequence and locating and then selecting the appropriate workspace file as shown below File gt Open gt Workspace gt BLDC LVSK 714 ed Workbench EM Fie Ede View Ajet Took Window Help OF hI oi melon p oh ite 12 E 2S 9 HL X POTERE T E m EE REUS T DE an EIR LR T RIDERS IS IEEE TERE ICT TIERONE LEON oe X is emia a TP CRIAM CIEL 2I yer ET poe Le als Fie nerve ptocivsk 714 E f e of type Worbspace Fies nmm j Cancel Figure 8 5 IAR Workbench Project Selection Once the Workspace open the display should look something close to that as shown in Figure 8 6 28 User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Figure 8 6 Chapter 8 This shows the workspace where the project is located and has opened either the BLDC non GUI or BLDC GUI project The display shows the following project files Left Hand side window Project File Source Header Map etc Bottom Build Debug messages when the project is re built or the debugger is active e The main centre display shows any open fi
24. ive Memory Breakpoint Usage titt titt IAR Embedded W f Compiler Assembler Note The Live Watch does not operate in real time on the On Chip Debug Unit User s Manual U18220EE4VOUMOO
25. ject can be downloaded from the Motor Control starter kit web site To program the hex file BLDC 714 GUl hex into the microcontroller please refer to section 7 Once the Graphical Interface program has been programmed ensure that the jumpers on the microcontroller board are returned to the settings described in chapter 4 above It is necessary to locate the following files on to the PC in order to connect to the starter kit The two programs should always be located together in the same directory MotorPanel exe GUI Application Motor inf set up file To operate the PC GUI a Female Female RS232 serial cable with crossover is required Not supplied Connect the PC serial port to the starter kit J9 DB 9 RS232 connector with an RS232 serial cable The pin connection of the RS232 cable needs to be as follows crossover GUI RS232 Cable Connections Signal Name PC Connection Starter Kit connection RxData x Da To launch the communication program Run the MotorPanel exe application program and the following window should open 1 Select the appropriate COM port on your PC and click OK Connect Port x Port Name cows i Cancel i PC COM Port Selection User s Manual U18220EE4VOUMOO GUI Operation Chapter 6 The GUI will launch if the connection is established Motor Panel Brushless DC Motor BLDCM Figure 6 2 BLDC Motor Control GUI 2 To operat
26. les in a tabbed form The file can be viewed by selecting the relevant Tab in the wind Any of the files shown can be opened by double clicking on the file in the Project left hand side window Debugging windows are described later TAR Embedded Workbench IDE f e Edt Yew Propet Tool Window Help OFS Ae Were IRR EREREERHARERERRAERAERERHREERARVHAM ER RUENSTATHERERWRARH ERREER ER REAREVRR REERERHERHEERH RETA Files 24 3 NEC ELECTRONICS Europe 04 07 2006 e rs ask BLDC HA 714 nf PROGRAM ALDC Motor Control with Hall sensors end speed BI Ei cemer c z 120 degree Trepesoidel Drive 3 B control c Without Graphical Control Interface GtI D Output p TARGET uPD78F0714 MC LVKIT 714 D controt h ainicube s Minicube Support end device configuretion y D intrinsics h DESCRIPTION Sets up the internal flesh ares as follOws B i078F0714 h 30H Option Byte B manh PH Security Level B faute c Fr F e menc svari B sec opt s26 AR Embedded Workbench Ou n Compiler V4 40A Assembler V GA Linker V4060A J RA ASES CIDE nee SEC OPT ORL oxe0 PUBLIC OPT OFT DR Ox0 0x0 f 8 Internal Ring 0scillator can be s ped by software 1 Internal Bing Oscillator cannot be stopped by software RE x64 PUBLIC RSY RSU DB Ox0O2 0xff Uxff 0wff Oxff Oxff Oxff Oxf f Oxf f Ox ff ff 6 OCD disabled flesh memory retained when ID authentication failis 3 flash memory erased when ID code a
27. m the NEC Electronics Motor Control Starter Kit web site Uncompress and Install the QB programmer GUI software Run the SETUP application Save and uncompress the IAR Workbench project For Flash programming no changes to the jumper settings on the Microcontroller board are necessary Check that the switches on the QB programmer are set as shown below a Switch M1 M2 is set to M2 b Switch 3 T 5 is set to 5 Then attach the QB programmer to connector 2J2 on the microcontroller board using the 16 pin cable wv 4 i 21 Eg s d haere de Ww a gn m e t v ra Bred hid IIT MA a m FP 2 usta 22 2 3 NTPi PI P3 PP it FLASH SELF AR EAP FLASH MOINES i61 Bi Th d TL uU mu tt q en t l ee riz anos t Flash Programming Connector 2J2 Figure 7 83 Microcontroller Board Flash Connection Copy the 78F0714 Flash programming parameter file 7 8F0714 prm into the installation directory for the QB programmer program installation path PG FPL PRM This file is included with the IAR project download Once the Microcontroller board is configured and the programmer connected to the PC open the Flash programming Graphical interface PG FPL 20 User s Manual U18220EE4VOUMOO Programming the Microcontroller Chapter 7 The following Screen should appear Note the text may differ after the 15t two lines om s BP as Figure 7 4 MiniCube 2 Programmer GUI
28. microcontroller s flash memory After the motor is connected the program is ready to run the motor as soon as the 15VDC power supply is plugged into J6 of the MC IO board and power switch SW1 on the MC PWR LV power module is turned ON When the kit is powered up or reset the LED displays SELF indicating that the kit is in standalone mode and you can use the pushbuttons and potentiometer on the MC IO board to control the motor Stand Alone Operation Three seconds after power up the LED displays the current start up set speed Initial Speed Display Ametek motor starting speed is 500 RPM User s Manual U18220EE4VOUMOO 13 Chapter 4 14 Caution Standalone Operation After power up in standalone mode the motor can be operated as follows 1 Press the START STOP button to run the motor Turn the potentiometer clockwise to increase the speed of the motor or counter clockwise to decrease the speed of the motor 3 The LED will display the actual motor speed calculated from the Hall sensor interrupts The display can be toggled between actual and demanded speed by use of the MODE button 4 Press the FORWARD or REVERSE button to change the rotation direction 5 Press START STOP to stop the motor If the potentiometer position is set to higher speeds and the motor rotation is suddenly reversed an error condition may occur due to a timeout or over current detection and the motor will stop operating To reboot press
29. nch IDE File Edit View Project Debug Emulator Tools Window Help Dc Gl 12 Workspace Add Files Add Group Import File List Edit Configurations Remove Create New Project Figure 8 33 Debug Views Windows YF IAR Embedded Workbench IDE include include JP x rol faulta main sec KEKKKKFKKKKKELRKKEKLKKEKKEKEKLEKKLEKKKESI ELECTRONICS Europe 04 07 2006 Add Existing Project PROGRAM BLDC Motor Control u came 120 degree Trapezoic lE contrc Options AER Without Graphical Cc faulta Source Code Control TARGET uPD78F0714 MC LVKl 2 main MODULE main c I O Process sec c Make F7 DESCRIPTION Reads I 0 board swit GOutpu Compile CTRL F7 Calculate SPEED and Rebuild All Clean titt Batch build F8 f kk IAR Embedded Workbench Stop Build Debug CTRL D Compiler V4 404A Del Assembler V4 40A bi Linker V4060A JE EE skhhsEsExkkkExkkEsXEkkEkkEkdExksksxkkkkskss lt stdlib h gt nain h File Edit View Project Debug Emulator Tools Window Help D dg 5 Ba E xmszxz Workspace si SK BLDC_HAII_Z1 2 carrier c a R control c La 2 faulta c a main c sec_opts26 LG Output Figure 8 34 Emulator Debug Options Breakpoint Toggle During Run Hardware Setup Mask Option Pseudo Emulation Live Watch Setup Trace Setup Timer Setup Edit Events Edit Sequencer Trace Function Trace L
30. noise etc the device may malfunction Take care to prevent chattering noise from entering the device when the input level is fixed and also in the transition period when the input level passes through the area between VIL MAX and VIH MIN 2 HANDLING OF UNUSED INPUT PINS Unconnected CMOS device inputs can result in malfunction If an input pin is unconnected it is possible that an internal input level may be generated due to noise etc causing malfunction CMOS devices behave differently than Bipolar or NMOS devices Input levels of CMOS devices must be fixed high or low by using pull up or pull down circuitry Each unused pin should be connected to VDD or GND via a resistor if there is a possibility that it will be an output pin All handling related to unused pins must be judged separately for each device and according to related specifications governing the device 3 PRECAUTION AGAINST ESD A strong electric field when exposed to a MOS device can cause destruction of the gate oxide and ultimately degrade the device operation Steps must be taken to stop generation of static electricity as much as possible and to quickly dissipate it should it occur Environmental control must be adequate When it is dry a humidifier should be used It is recommended to avoid using insulators that easily build up static electricity Semiconductor devices must be stored and transported in an anti static container static shielding bag or conductiv
31. oduction 000 9 Chapter 2 Kit Contents 0 10 Chapter 3 Hardware Setup 00 11 Chapter 4 Standalone Operation 0 0 0000 13 Chapter 5 Drive and Motor Protection 15 Chapter 6 GUI Operation 0 0 0 16 Chapter 7 Programming the Microcontroller 19 7 1 Progamming with the Microcontroller Board disconnected 20 7 2 Progamming with the Microcontroller Board connected 24 Chapter 8 Using the IAR Embedded Workbench 25 8 1 Software Installation ssseeeeeeeee ns 25 8 2 MC LVKIT 714 Setup for On chip Debugging 0 ccc ees 25 8 3 IAR Embedded Workbench Start up 0 0 ccc ee eee eee ee 2f 8 4 Compiler Options a veces ie REA eh bb ee Y ua X WEE AAA WA Ea CO RR ER 32 8 5 Assembler Options x REERE seis Se a 35 8 6 Linker ODUOHNS 227252 ei LEE ERR Dx eee eh uc bitrate td axe to es 37 8 7 Integrated Debugger Selection 0 s s sn 39 8 8 Workspace and Project Setup if the example is not compatible with the installed IAR 41 WONKDONGCIN tn a pale ert ea 8 9 Build Rebuild the Project ess oret X koh ha ee Ree oa a de c a ete wa ace 41 8 10 DEDUGGING REC PPEBEMEREER 42 8 User s Manu
32. plication TK 78 Search paths one per line TOOLKIT_DIR LIB E Raw binary image File Symbol Segment Align oe OK Cancel Linker Options Linker Command File Selection The Linker Control File must match the device selected The remainder of the Linker setup can be left as the default setting Integrated Debugger Selection The Extra Option section can be ignored User s Manual U18220EE4VOUMOO 39 Chapter 8 40 Figure 8 25 Figure 8 26 Using the IAR Embedded Workbench Options for node SK BLDC_HAIl_ 714 x General Options C C compiler Setup Extra Options Plugins Assembler Custom Build Driver Build Actions MINICUBE QB 78KOMINI QB 78KO0Sx x MINI QB MINI2 Linker v Runto mi IE 78 IECUBE S MINICUBE end ci Sadala Use macro file TK 78 Integrated Debugger Selection Options for node SK BLDC HAII 714 Ix MINICUBE Simulator TK 78 Description Eee code coverage in the debugger Location C Program Files IAR Systems Embedded Workbench 4 04 Originator IAR Systems Version 4 6 2 0 ok En Integrated Debugger Plug in Selection User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Chapter 8 8 8 Workspace and Project Setup if the example is not 8 9 Figure 8 27 compatible with the installed AR workbench e Set anew workspace File gt New gt Workspace e Create a new Project Project gt Creat
33. tart Debugger Compiler V4 40A Assembler V4 40A Linker V4060A J BHEAARAEERARAAKERAREGDREFLREFLREFREAEEREREBERAREADREFRELRAERAEREASE Figure 8 7 Project build options Options for node SK BLDC HAll 714 x C C compiler Assembler Custom Build Build Actions Device Near constant location jn 78K0 uPD78F0714 Tl MinorROM1 7 IE 78 NoDIVUW MULU Start address o F1 000 IECUBE MINICUBE Size Kbytes fi 6 00 Simulator TK 78 Code banking Heg address OxFFF3 Bank address 0x8000 No of banks Bank size Kbytes fe Figure 8 8 General Options Setting the Target Device 30 User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Options for node SK BLOC HAll 714 i x C C compiler Assembler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Chapter 8 Target Output Library Configuration Library Options Stack Heap gt Debug Obj List files Debug List Figure 8 9 General Options Setting the Output Locations Options for node SK BLDC HAll 714 E X C C compiler Assembler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Target a Output Library Configuration Library Options Stack Heap _4 gt Description Use the legacy C runtime library file STOOLKIT_DIRS LIB CLIB cI78ks1 126 0 T DIRSALIBXCLIBNCIZ8ks1 25 Configuration file
34. the RESET switch on the MC IO board adjust the potentiometer to a lower speed and restart To control the motor from the Graphical Interface GUI from your PC please refer to section 6 User s Manual U18220EE4VOUMOO Chapter 5 Drive and Motor Protection The starter kit and the motor are protected against unexpected events such as overload motor stall and malfunction of the Hall sensors If such faults are detected the motor stops rotating and the fault conditions are displayed on the seven segment LED For details on the protection functions implemented in hardware consult the user s manual for MC PWR LV low voltage power module The sample code software also has built in fault detection algorithms as an extra measure of protection Consult the software manual for details In standalone SELF mode the LED displays the following fault conditions Motor over current O C e Motor stall fault o Hall sensor fault H A L L In the Graphical Interface mode PC the LED displays PC all the time and the GUI will displays all fault conditions Refer to section 6 for more information User s Manual U18220EE4VOUMOO 15 Chapter 6 GUI Operation Table 6 1 Figure 6 1 To operate the motor from the PC GUI the Hex file for the motor control software including the GUI interface will need to be programmed into the Flash memory of the 78F0714 microcontroller The complete IAR embedded Workbench pro
35. trol Interface GUI Lr d TARGET m p73 8FO714 MC LVKIT 714 4 J MODULE main c 1 0 Processing and I Control 2 DESCRIPTION Beads 1 0 board switoes and updates 7 seg LEDsplay calculate SPEED end executes PID alyotithe every 20 s FA OPED EAPO OLEDLOROR ODED DODDEORDOLOBEDODEEBEDOLEBODLDLODEBEDDODOROLEDEEDELODDDD fPEPEPRILDDDAEBEPDPIBLEPEPLPLIBDPEPRBEOBEPDEBIDODBIDPLIBODBEEDEELPREDEDEPEPDL BODE Y y IAR Embedded Workbench d Compiler V4 40R s7 Assembler v4 0x Pii pie Linker vaoia 7 Pint mr P a A x finciude xstdlib n f inciude nein h x ystten ini Main functions seen ODF CALL start void msin INTPO on t Char sv eaa char tap sw 0 OxdE06 system initi 7 Det start D Sta f INTP oni 7 e A B ensbie interrupti abe power ip 2 62 MOV A E ven 73 MOV B ciear W TNI cle 9A6AUB CALL clear VDTM if sys fiag FLG OFF Dur 8E24FB MOV aya i ia ificw ccw wait FLG_OFF s No Ed SIE d x00 stop_tieg FLG Off i No DED sw get sw i aad Sw vj s zos i an oe a L S os x Leg Wed Aug 23 14 46 28 2006 OSPY Processor Descriptor for 78K0 and 78K0S V4 404A Wed Aug 23 14 46 28 2006 C SP Y MINICUBE Emulator Driver for 78K0 V4 404 Wed Aug 23 14 46 24 2006 Downiced completed and verification successful Wed Aug 23 14 46 34 2006 Loa
36. troller board Once downloaded the debugging window will open as shown below in Figure 8 29 The IAR embedded Workbench provides an integrated debugger so the debugging window opens as part of the IDE If the debugger is run for the first time in a new project the following set up window will open This is to set the basic function of the debugging hardware i e Mini Cube or IECube etc User s Manual U18220EE4VOUMOO Using the IAR Embedded Workbench Chapter 8 MINICUBE Hardware Setup for 78K0 78F0714 E x me umt Clock board C Evstemal C System Clock board External Default Fall safe break WAIT TARGET RESET n View setup NMI 7 INTERNAL RESET start address Length z Internal ROM 00000 Ox FFF Internal ROM 32 Kbytes OxFBOO OxFEFF Internal RAM 1024 bytes Hemave Remove l Figure 8 29 Debugging Initial Hardware Setup Ensure that the settings are as defined above Note Ifthe Main Clock shows the Clock board detected then ensure that this is selected User s Manual U18220EE4VOUMOO 43 Chapter 8 44 Figure 8 30 Figure 8 31 Using the IAR Embedded Workbench SOBPEPEDAEPEPEPRPLEBEPEDEDEDBELOEDEPEDDEEEPEOEEEEEBERBEDEDPDPLEEDEDDE NEC ELECTRONICS Europe 04 07 2006 PROGRAM BLDC Notor Control with Hall sensors and speed PID 120 degree Trapesoidel Drive y Without Graphical Con
37. ual equipment home electronic appliances machine tools personal electronic equipment and industrial robots Special Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime User s Manual U18220EE4VOUMOO systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems life support systems and medical equipment for life support etc The quality grade of NEC Electronics products is Standard unless otherwise expressly specified in NEC Electronics data sheets or data books etc If customers wish to use NEC Electronics products in applications not intended by NEC Electronics they must contact an NEC Electronics sales representative in advance to determine NEC Electronics willingness to support a given application Note 1 NEC Electronics as used in this statement means NEC Electronics Corporation and also includes its majority owned subsidiaries 2 NEC Electronics products means any product developed or manufactured by or for NEC Electronics as defined above User s Manual U18220EE4VOUMOO 3 Notes for CMOS Devices 1 VOLTAGE APPLICATION WAVEFORM AT INPUT PIN Waveform distortion due to input noise or a reflected wave may cause malfunction If the input of the CMOS device stays in the area between VIL MAX and VIH MIN due to
38. uthentication fails FEND aa SK BLOC MAR 714 f da gt Ready DR AR Embedded Work BD 2392905859995 Workspace amp Project open screen 3 he build options for the project can then be set or changed using the following menus The build options are entered as shown in Figure 8 7 below then ensure all the options are as shown in Figure 8 8 to Figure 8 11 below User s Manual U18220EE4VOUMOO 20 Chapter 8 Using the IAR Embedded Workbench File Edt view Project Tools Window Help ee E ee ee ee I gt amp vz 3 9 wp d amp OF VF 3 main sec op FHLAAAARARARRELDRASDRADRASDRALRARAARADREARRERRERRAARRAAKRREAH Import File List Remove SK BLD carrie Create New Project ELECTRONICS Europe 04 07 2006 PROGRAM BLDC Motor Control with Hall sens contrc MU Get Sh i20 degree Trapezoidal Drive A Ou go ETT Without Graphical Control Interfa B co TARGET uPD78F0714 MC LVKIT 714 B intr Source Code Control MODULE control c Peripheral Control Bio Make F7 DESCRIPTION Initialization of timers ports B me Compile CTRLAF7 push buttons and potentiometr UA 2 faulta Rebuild ali Reads A D displays target or act Z main clean on LED display ES Batch build i F8 FAAAASAAAAAAAARASS AAS AASAASAAASAAAAAARASARESRASRAARAAREAS Stop Build FAAAEASAASASESAESAASA SASHA SAAS ASHESAEASAESAREAEF RAE RASERAES IAR Embedded Workbench Debug CTRL D Make amp Res

Download Pdf Manuals

image

Related Search

Related Contents

Kensington Back Case for iPhone® 5/5s - Black    Super Talent Technology PCIe DX1 64GB  野菜栽培セット 4号 ワイルドストロベリー  Samsung Blu-ray-spiller J5900  12” x 35 1/2” - Pdfstream.manualsonline.com  Ⅳ 資料編 - みなかみ町  NGM-Mobile Forward Zero 8GB 4G White  Notebook-PC Benutzerhandbuch  FDR(PDF/1148KB)  

Copyright © All rights reserved.
Failed to retrieve file