Home

UM MC-CPU-78K0RIC3 CPU Daughter Card

image

Contents

1. PORT12 4 3 LED latch enable signal LD LED1 and LD LEDO PORT3 1 0 LED latch enable signal LD_LED3 and LD LED2 When P83 P83 0 Normal operation state push buttons for operation control is connected to these ports Comparator Hall Sensor and Motor Position Encoder Signal Inputs for uPD78KOR IC3 SB26 P120 IC3 C DH lt n TPP1_Px 1 3 5 SB27 O_O PX ENCA 1 3 5 SB28 P121 13 LDH DALO INTP2 PY 1 3 5 SB29 MU lt gt PX ENGB 13 5 SB30 P3213 lt DHH HLO NTP3 PZ 1 3 5 SB31 O DUH2 gt px_enez 13 5 The comparator hall sensor inputs and motor position encoder signals are connected directly to the uUPD78KOR IE3 The uUPD78KOR IC3 however is required to multiplex the signals Users must connect solder jumpers for the selected signals The INTP1 PX INTP2 PY and INTP3 PZ are multiplexed signals between comparator and HALL sensor inputs Motor Speed Measurement SB32 1 3 5 P17_P52 C D INTP1_PX 1 3 5 SB33 1 4 lt gt ntP2_Py 1 3 5 SB34 44 O lt NTP3 PZ 13 5 SB35 19 O lt gt FL0_KR 1 Figure 4 12 Speed Measurement Selection 24 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 Hardware Design Descriptions Chapter 4 4 12 P17 MC CPU 78KORIE3 and P52 MC CPU 78KORIC3 are timer capture inputs for the internal timers A selected INTP1 PX INTP2 PY or INTP3 PZ signal is input to timer capture input to measure
2. Back EMF comparator signals Back EMF Comparator CMPU CMPV CMPW from power module connected to interrupt inputs of CPU ANIO IU ANI IV Motor phase current ANI2 IW Low side current detect E connected to A D Current Sense Signals Motor shunt current ISHUNT Low side current detect connected to A D Over current detect signal from power module connected PALIBIE to TMOFFO or TMOFF1 of Safety Control Signals 78KORIx3 TRIP CPU generated signal to turn off power to Power MOSFET User s Manual U19825EE1VOUMOO An Overview of MC IO Interface Chapter 3 Categories Signal Names Phase Voltage Detect V U V V V W Description of Signals Motor phase voltage detect signal connected to A D inputs of CPU Power Module Temperature ANI7_TMP Power module temperature sense signal connected to A D input of CPU The above signals are coming from power module MC PWR LV through 40 pin cable interface These signals are connected to two 100 pin connectors on the MC I O Board The microcontroller inputs and outputs are connected to these signals when the CPU Daughter Card is connected to the MC I O board through two 100 pin connectors 3 3 Signal Positions on the 100 pin Connectors Table 3 3 Signals on MC I O J1 Connector P1 Connector on MC CPU 78KORIC3 J1 Pin J1 Signal J4Pin J4 Signal Notes 1 RS232 Host Interface Signals J1
3. Category Factory Settings General Options C C Compiler Assembler Custom Build Setup Extra Options Plugins Build Actions Linker Driver MINICUBE QB 7SKOMINI OB 8K0SxxxMINI GB MINI2 d IE 78 IV Runto IECUBE MINICUBE ee Simulator m Setup macros TK 78 Use macro file Device descriptions Override default TOOLKIT DIRSNCONFIGNDDFNio78f 235 64 ddl I Figure 7 23 Integrated Debugger Selection User s Manual U19825EE1VOUMOO 63 Chapter 7 MC CPU 78KORIC3 with IAR Embedded Workbench 64 Figure 7 24 Note 7 9 Options for node BLDC_HALL120_78KORIE3 H xj Category Factory Settings General Options C C Compiler Assembler Custom Build Setup Extra Options Plugins Build Actions Linker Select plugins to load IE 78 Code Coverage IECUBE JORTI RTOS MINICUBE Profiling Simulator iv Stack TK 78 Description pike awareness for SEGGER emb0S Location IC Program Files IAR Systems Embedded Workbench Kick Originator 5 egger Microcontroller Systeme GmbH Version 2 0 5 0 Integrated Debugger Plug in Selection The Extra Options section can be ignored Workspace and Project Setup if Not Compatible with the Installed IAR Workbench 1 Setanew workspace File gt New gt Workspace 2 Create a new Project Project gt Create New Project gt Select Empty
4. FLMDO 8 AVREF C D VDD KR 1 3 4 5 SB21 P121 X1 INTP4 qt gt P121 IC3 P422 X2 EXCLK INTP5 q4 L lt gt P422 IC3 1 3 RESETB KR LL L5 RESET _B REGC4 12 DREG 1 P20 IC3 P20 ANIO P21 1C3 P21 ANI1 P22 IC3 P22 ANI2 P423 XT1 4 8 5 P123 108 P23 C3 P23 ANI3 P24 C3 P24 ANI4 P25_IC3 P25 ANI5 P124 xT2 2 gt P124 Ic3 P26 C3 P26 ANIG P27 C3 P27 ANI7 P420 INTPO EXLV1 1 P420 IC3 P30 IC3 P30 SO10 TXD1 TO11 P3171C3 P31 SHO RXD1 SDA10 INTP1 P32_IC3 P32 SCK10_B SCL10 IN P83 CMP1M P83_P83 1 3 5 P82 CMP1P TMOFF1 INT P82_P82 1 3 5 P81 CMPOM PX_TRIPB 1 3 5 P80 CMPOP TMOFFO INT P80_P80 1 5 1 3 5 PWM 0 P10 TIO2 TO02 1 3 5 PWM 1 P11 TIO3 TOO3 1 3 5 PUM 2 P12 TIO4 TOO4 1 3 5 PWM 3 P13 TIO5 TO05 1 3 5 PWM 4 P50 TIO6 TO06 P73 TXDO TO10 L8 5 RS232 TXD 1 3 5 1 3 5 PWM 5 P51 TIO7 TOO7 1 3 5 P17_P52 P52 SLTVSLTO P72 INTP6 RXDO gt r8232_RXD 1 3 5 1 3 TOOLO P40 TOOLO 1 3 TOOL1 P41 TOOL1 P g g gt E a Ls Figure 4 1 4 2 Signals on uPD78KORICS3 Special treatment for the REGC signal REGC is connected to GND through 0 47uF capacitor Used EIA A size tantalum capacitor Power Source Selection When the MC CPU 78KORIC3 CPU Daughter Card is connected
5. Time sec start in open loop until final time is reached then switch to closed loop control Initial the length of time in seconds to run open loop up to the set RPM and PWM Middle the length of time in seconds to run open loop up to the set RPM and PWM Final the length of time in seconds to run open loop up to the set RPM and PWM RPM e The startup RPM speed for each phase initial middle and final Current mA Used for current control mode not covered in this document PWM e The startup max PWM for each phase initial middle and final User s Manual U19825EE1VOUMOO 47 48 Chapter 7 7 1 7 2 MC CPU 78KORIC3 with IAR Embedded Workbench The example software for use with the MC CPU 78KORIC3 CPU Daughter Card is for a HALL sensored BLDC motor with 120 degree trapezoidal control for standalone GUI operation The MC CPU 78KORIC3 CPU Daughter Card is supplied pre programmed The complete example project program for the IAR 78K Embedded Workbench development tool environment can be downloaded from the motor contro 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 describe IAR 78K 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
6. 238A Thomson Road 12 08 Novena Square 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 Remark Numeric Notation Prefixes Preface This manual is intended for users who want to understand the functions of the MC CPU 78KORIC3 CPU Daughter Card for motor control This manual presents the hardware manual of the MC CPU 78KORIC3 for motor control This system specification describes the following sections Jumper Descriptions Hardware Setup e Schematics 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 explanation of Note in the text Item deserving extra attention Supplementary explanation to the text Binary xxxx or xxxB Decimal xxxx 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 U19825EE1VOUMOO 7 Table of Contents Chapter 1 Introd
7. between VIL MAX and VIH MIN due to 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 cont
8. 003 RS232 RXD J1 004 RS232 CTS J1005 RS232 TXD Connects to RS232 transceiver interface U23 J1 006 RS232 RTS 2 PX ITRIP Signal from Power Module J1 011 PX ITRIP J4 02 PX ITRIP ee ae ee 3 Speed Adjust Potentiometer and other A D J1 023 ANI4 Spd Pot ANI4 adjust speed pot use A D J1 024 ANI5 ISHUNT J4 07 ANI5 ISHUNT From power module shunt current signal J1 025 ANI6 SPARE J4 04 ANI6 SPARE Spare A D input 4 PX TRIPB Signal to turn off power to power MOSFETs J1 031 PX TRIPB J4 19 TRIP Signal from CPU to turn off power to power MOSFETs Use GPI O on 78KOR Ix3 Table 3 4 Signals on MC I O J2 Connector P2 Connector on MC CPU 78KORIC3 J2Pin J2 Signal J4Pin J4 Signal J5Pin J5 Signal 5 LD LED data latch signals for the 7 segment LED displays J2 015 LD LEDO J2 006 LD LED1 Use GPI O on 78KOR J2 017 LD_LED2 Ix3 J2 018 LD LED3 6 LED x common data lines for 7 segment LED displays J2 009 LED A J2 000 LED B S GPI O on 78KOR J2 021 LED C User s Manual U19825EE1VOUMOO 15 Chapter 3 An Overview of MC IO Interface J2Pin J2 Signal J4Pin J4 Signal J5Pin J5 Signal J2 022 LED D J2 003 LEDE J2 024 LEDF J2 025 LED G J2 026 LED DP 7 PWM signals Motor phase control signals IU IV IW J2 029 PWM_O J4 21 HI
9. 45 Chapter 6 Operation of the MC CPU 78KORIC3 Changes can be made in this view and sent down to the MC CPU 78KORIC3 CPU Daughter Card Simply make the appropriate changes and click on the Send Parameters to uC Current A D Parameters Gain for current shunt value amplification e Offset to correct any known constants Current Limits mA Used for current control mode not covered in this document Speed Limits RPM Max the maximum RPM speed setting for the motor Min the minimum RPM speed setting for the motor Max Rate the acceleration deceleration rate in RPM sec 6 2 7 Change the Startup Settings It is also possible to change the open loop time RPM for open loop and starting PWM settings by selecting the following tab as shown below Gauges PID Gains Setup Initial Middle Final o RPM feo foo mo puo po ms C Current Control Voltage Control Send Parameters to uC Get Parameters from uC Ensure Voltage Control is selected Figure 6 12 GUI Startup Settings To read back the current startup settings from the MC CPU 78KORIC3 CPU Daughter Card click on the Get Parameters from uC button and the GUI will be updated 46 User s Manual U19825EE1VOUMOO Operation of the MC CPU 78KORIC3 Chapter 6 Changes can be made in this view and sent down to the MC CPU 78KORIC3 CPU Daughter Card Simply make the appropriate changes and click on the Send Parameters to uC
10. Run the Motor Using Speed Control Mode 0c cece eee ees 43 6 2 5 Change the PID Settings 2 0 0 e cece eens 43 6 2 6 Change the Setup Settings 0 0 cece cette tenes 45 8 User s Manual U19825EE1VOUMOO 6 2 7 Change the Startup Settings 0 ccc c eee eee 46 Chapter 7 MC CPU 78KO0RICS3 with IAR Embedded Workbench dis ieanvebee ege E aa s dise orante ak oh Mee Se Shape dud edt 48 7 1 Software Installation suuseusssssesessesees n 48 7 2 Switch Settings and Connecting the MINICUBE2 Luuslesseessuss 48 7 3 IAR Embedded Workbench Startup 0000 e eect ete eee 49 7 4 General Options osse rendo a ae Aa eta nee dated ped ee 52 7 5 Compiler Options 00 nent teens 55 7 6 Assembler Options iana 2 0 50 joie okie Me ed a pud eee eee es 58 7 7 Linker Options c nardi i a eek ok CE a xe ea Qe BEES tor Sand ak d d Gd 60 7 8 Integrated Debugger Selection 0 0 ccc tte eens 63 7 9 Workspace and Project Setup if Not Compatible with the Installed IAR Workbench 64 7 10 Build Rebuild the Project 0 00 cece eee 65 7 11 DeDUGGING oc es tA abe decl eae edu US e oleate RES fag BUR tk Ee tea n 65 Chapter 8 Appendix eet etes 71 User s Manual U19825EE1VOUMOO 9 10 Chapter 1 Figure 1 1 Introduction The MC CPU 78KORIC3 CPU Daughter Card is designed to form part of the low voltage starter kit for mo
11. Welcome to the NEC MC GUI Setup Wizard e es The installer will quide you through the steps required to install NEC MC GUI on your computer Description Set WARNING This computer program is protected by copyright law and international treaties Unauthorized duplication or distribution of this program or any portion of it may result in severe civil or criminal penalties and will be prosecuted to the maximum extent possible under the law Launch the NEC MC GUI Wizard Follow the instructions until the installation is complete To Use GUI Software Start the NEC GUI application software by selecting it from the programs list ee DE I To Start NEC GUI After selecting the program you may see a Comm error dialogue box appear A Comm error try again NEC GUI Comm Error Dialogue Box If this occurs then simply click on OK as many times as the box appears You will be able to set the serial port number in the application software The application will launch and you should see the main user interface as shown below User s Manual U19825EE1VOUMOO Operation of the MC CPU 78KORIC3 Chapter 6 NEC Motor Control 78KOR IE3 KIT loj xl File Setup Serial Port comi7 Gauges PID Gains Setup Startup Motor Speed RPM Shunt Current Amps PWM Duty Cycle 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 1 11 ime Seconds Clear Data Figure 6 6 NEC GUI Main Display
12. amp functions To demonstrate these convenient features any one of the listed analog signals may be selected by connecting the solder jumper for the selected signal Note SB52 is fitted as default setting for over current detection and HI Z control User s Manual U19825EE1VOUMOO 27 Chapter 5 Flash Programming with a Flash 28 Programmer This section describes the steps necessary to modify the program in the MC CPU 78KORIC3 microcontroller using a Flash Programmer not included in the MC CPU 78KORIC3 CPU Daughter Card Two programmers are available PG FP5 Full programmer e MINICUBE2 On chip debugger programmer Figure 5 1 PG FP5 Programmer Figure 5 2 MINICUBE2 On chip Debugger Programmer 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 The interface for the microcontroller board is the same for both programmers User s Manual U19825EE1VOUMOO Flash Programming with a Flash Programmer Chapter 5 5 1 5 2 5 3 Download the Following Files Download the appropriate AR project folder which contains all the required source code for the application Download the MINICUBE2 QB programmer Flash programming graphical interface Download the appropriate IAR Workbench from the AR web site or use the KickStart CD supplied with the MINICUBE2 The full IAR development tool can b
13. does not use sub clock see Signal Assignments and Signal Multiplexing The uPD78KORIC3 main clock is selected by JP7 The EXCLK input of pJPD78KORICS3 P122 IC3 can be used as an interrupt input receiving comparator signal or motor position encoder input when internal clock is used JP7 JP7 1 to JP7 2 P122 ICS3 EXCLK X2 External Clock JP7 3 to JP7 4 P122 IC3 PX ENCZ Position Encoder Signal JP7 5 to JP7 6 P122 IC3 INTP8 PZ Comparator HALL Sensor Signal Target System Connector 630000000049 6400000000850 3 10 02 480 O47 E OO U2 OO Oo Oo oo 00 oo Oo Ooo Ooo 2 rows x 8 Oo Oo 2 54 mm pitch 15O O16 48 32 340 033 OO000000 OOOOOOOO 19 31 Target System Connector Diagram Target system connector is provided all around uPD78KOR IE3 to be connected to the users target system It has same pin outs with uPD78KOR IES3 Tthe uPD78KOR IC3 does not share the target system pins User s Manual U19825EE1VOUMOO 21 Chapter 4 MC CPU 78KORIC3 Hardware Design Descriptions 22 4 8 Optional RS232 UART Connections Figure 4 7 The MC I O board provides optional RS232 UART connections to a host PC This section describes RS232 circuit and describes the use of RxD and TxD inputs of the microcontroller vecas 16 1 C3 1uF 4 Ci 2 Tr T P Cl luF Ve Cl V 4 Ca CH MAX2S2CWE TOUT Loop Back b ro T Mock 4 AR GND Jumpers Footprint Oniy 11 14 TXD BD9 qm 85 o RS232 TXD be i 1038 10 7 RTS DB9 74
14. fuse or motor Checking this box will force all timer output pins to a high impedance state during break conditions User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Figure 7 28 Figure 7 29 AR Embedded Workbench IDE Fie Ed amp view Project Debug Emdator Tools Window Mel OSU ss mmo of AVY REE Pio IH BP IS 25 m 23 2 ISP Sisco ee EH amp CBLDC HALL129 78KORIE3 Debug Ha B GUL support Ha By nitesise_herdware c Biinterrugit heridiers c By men mooc DESOG POKT MODE OUT 1308 DRUG PORT 93 ve 01701 FDACI3 cL intet scupiune 12 D174 FD A25 CAIL Wi init LEDPORT LED port set up E init TIMER interval timer 01707 FDiDi6 CALL Wii 1 1 O17UB FABL CAL WX i r ENPNIENISEENEN n r3 ax 017DF 32041 S E S D17E2 FD8 l CAL Ne DI7EE FE cIRy AX DI7ES 324040 wove BC D17E3 _ FDAel4 CALL oN O17EC 3DE803 wove ar D T0313 CHI Nd sit defined SPIMIT amp vss 15 Motor SetModa NDTOP MODE EMEED 017F2 309600 Xo AI 01 FD5714 CALL Wi q Wotor SetCarrier 20 ME NWotor SetDeadcime i 917F8 EH 3 Nov x ApS muc xe uo ee Building configuration BLDC HALL120 78K0RIE3 Debug Updating build tree Configuration is up to date Integrated Debugger Main Window IAR Embedded Workbench IDE Fi
15. measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots Special Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime User s Manual U19825EE1VOUMOO 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 U19825EE1VOUMOO 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
16. 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 overcurrent Q C Motor stall fault FAIL Hall sensor fault HALL Software overcurrent S OC In the graphical interface mode PC the LED displays P C all the time and the GUI will display all fault conditions Please refer to the chapter on GUI operation MC CPU 78KORIC3 in GUI Operation The following information covers the installation and use of the remote control GUI application software The interface for the PC GUI is already built into the example software programmed into the MC CPU 78KORIC3 CPU Daughter Card so it is not necessary to reprogram the device in order to use the GUI operation If for any reason it is necessary to reprogram the device the complete IAR Embedded Workbench project can be downloaded from the Motor Control starter kit web site To reprogram the MC CPU 78KORIC3 CPU Daughter Card please refer to the chapter on flash programming To operate the PC GUI with the MC CPU 78KORIC3 CPU Daughter Card you will need a PC RS232 serial comm port and a RS232 cable configured as a DB9 Female Female crossover which is not included in any of the motor control starter kits and must be supplied by the user Connect the PC serial port to the starter kit JO DB 9 RS232 connector with
17. sistm RS232 RTS Po L 188 1 p d EEE 12 13 RXD_DB9 213 Blan RS232 RXD ox 185 L 1 n i 9 8 CTS DB9 81 is RS232 CTS ox i i me hmas 15 1M 742 8P L L ds Loop Back a GND_IS GND GND IS GND 15 GND 15 RS232 Transceiver Circuit on the MC I O On the MC CPU 78KORIC3 CPU Daughter Card RS232 TXD is the outgoing signal form microcontroller to host PC RS232 RXD is the incoming signal from host PC to microcontroller Looking from host PC transmit output is connected to RXD_DB9 Likewise receiving input of the host PC is connected to TXD_DB9 input The MC CPU 78KORIC3 UART inputs and outputs are connected to RS232 RXD and RS232 TXD according to the above signal directions User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 Hardware Design Descriptions Chapter 4 4 9 LED Data Loading The LED data latch is implemented on the MC I O board The MC CPU 78KORIE3 assigns port signals for LED data and control signals for latch enable Micro Board MC TV O Board 8 Bit DATA Signads LD Lead DATA into Latch 3 A B A 3 a i g 5 3 E Es Figure 4 8 LED Data and Load Enable Connections Table 4 4 Port Assignments for for LED Segment Data PORT5 3 0 LED Segments LED_A through LED_D PORT2 3 0 LED Segments LED_E through LED_DP PORT3 3 2 Latch Enable LED Digit 1 0 PORT14 1 0 Latch Enable LED Digit 3 2 4 9 1 MC CPU 78KORIC3 Port Assignments for LED Segm
18. theRS232 serial cable The pin connection of the RS232 cable needs to be as follows crossover User s Manual U19825EE1VOUMOO Operation of the MC CPU 78KORIC3 Chapter 6 Table 6 1 6 2 1 RS232 Cable Connections Signal Name PC Connection dudes DCD not used Pin 1 Pin 1 Rx Data Pin 2 Pin 3 Tx Data Pin 3 Pin 2 DTE Ready Pin 4 Pin 4 Signal Ground Pin 5 Pin 5 DCE Ready Pin 6 Pin 6 RTS Pin 7 Pin 8 CTS Pin 8 Pin 7 Ring Indicator not used Pin 9 Pin 9 The MC CPU 78KORIC3 CPU Daughter Card requires the following comm port settings Baud rate 57600 DataBits 8 Stop Bits 1 Parity None Handshake None GUI Software Installation The zip file NECGUI zip contains all the files needed to install the NEC GUI application software Simply extract the files to a folder named NECGUI and then click on the setup exe application as shown below User s Manual U19825EE1VOUMOO 39 Chapter 6 Operation of the MC CPU 78KORIC3 40 Figure 6 3 6 2 2 Figure 6 4 Figure 6 5 fir C Documents and Settings HopkinsS Desktop Scott Release NE nl xl File Edit View Favorites Tools Help ay Qs 5 7 J Search Folders lay xs x e E Address C C Documents and SettingslHopkinsS1DesktopAScott Release X Go j 583KB Windows Installer P 18 05 2009 13 46 B setup exe 421KB Application 18 05 2009 13 46 il NEC MC GUI elg xl
19. 69 Chapter 7 MC CPU 78KORIC3 with IAR Embedded Workbench IAR Embedded Workbench IDE File Edit View Project Debug Emulator Tools Window Help Z amp Luo I5 2 Breakpoint Toggle During Run Workspace Mask Option Pseudo Emulation Live Watch Setup ee a GBLDC_HALL120_78K cp d GUI suppart c Timer Setup Initialise hardware c Edit Events E Interrupt handlers c Edit Sequencer a E main mcio c Trace ela motor c Function Trace ae sub_mcio c Live Memory C Output Breakpoint Usage Enable Flash Self Programming Hash Programming Emulation PG FPx Security Flags Setting Emulation Flash Shield Setting DEBUG_PORT_MODE DEBUG_PORT 0 Motor SetupFunc init LEDPORT init TIMER BLDC HALLT120 78KORIE3 Figure 7 32 Emulator Debug Options Note The Live Watch does not operate in real time on the on chip debug unit 70 User s Manual U19825EE1VOUMOO Chapter 8 Appendix Schematics descriptions for the MC CPU 78KORIC3 CPU Daughter Card are attached to this document Use the Attachments tab for access lower left side of the screen User s Manual U19825EE1VOUMOO 71
20. 9825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Figure 7 1 7 3 Note Switch 3 T 5 is set to T Locate the MINICUBE2 16 pin connector J2 and attach the MINICUBE2 programmer using the 16 pin cable Power ON the MC IO interface module x 8282 0 Ar6 SHOd f X 8087 h D e 4 Flash Programming Connector J2 Connecting the MINICUBE2 to the CPU Daughter Card IAR Embedded Workbench Startup Open the IAR Workbench The following screen should be opened The exact display may vary depending on if this is a new installation User s Manual U19825EE1VOUMOO 49 Chapter 7 MC CPU 78KORIC3 with IAR Embedded Workbench 50 Figure 7 2 Figure 7 3 T IDE File Edt Wew Project Tools Window Help Duga telel 13 E gt hh as EN IAR Workbench Opening Screen 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 HALL120 78KORIES3 Dbackup_sowce_te LD bachup seuice 12032009 Det TM Fie nave ELDE HALT20 T amp KORIE Y eve E Flos di type wortanace Fies eve zi Cael Ready IAR Workbench Project Selection Once the workspace open the display should look something close to that as shown in the figure below This shows the workspace where the project is located and has opened the BLDC project The di
21. AVREF AVREF AVREF to VDD KR via SB21 KOR IC3 34 AVSS GND KOR IC3 35 P27 ANI7 P27 IC3 ANI7 TMP When P83 P83 0 KOR IC3 36 P26 ANI6 P26 IC3 ANI6 SPARE en portas ANi input KOR IC3 37 P25 ANI5 P25 IC3 ANI5 ISHUNT KOR IC3 38 P24 ANI4 P24 IC3 ANI4 SPD POT LED DP When P83 P83 1 LED G Configure port as Data port LED F LED E 26 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 Hardware Design Descriptions Chapter 4 4 13 Optional Selection for P80_P80 CMPOP OA1 and P82 P82 Comparator Input 2 5 Figure 4 13 Comparator Op Amp Selection Input P80 P80 SB36 2 Fo Fo Fo Fo Fo Fo rt h UJ wo eo I ANI IV 2 3 5 UJ E o ANI2_IW 2 3 5 ies R N ANI3 TEMP 2 3 5 U EIN iS 2 ANI4_SPD_POT 2 3 5 W EI o 2 ANI5_ISHUNT 2 3 5 vo i oo 2 ANI6_SPARE 2 3 5 UJ a o H ANI7_TMP 2 3 5 PX ITRIP 3 e B37 ANIO IU 2 3 5 2 3 5 P82 P82 UJ oO ies A ies A wo ies A a ive D N U AB ie UJ a zx UJ oO wo Po Fo Ie Lo Lo Fo Fo lel b ANIO IU 2 3 5 ANI IV 2 3 5 ANI2 IW 2 3 5 ANI3 TEMP 2 3 5 ANI4 SPD POT 2 3 5 ANI5_ISHUNT 2 3 5 ANIG SPARE 2 3 5 ANI7 TMP 2 3 5 PX ITRIP 3 The P80 IE3 and P80 IC3 may be used as comparator functions or op
22. C C Compiler Assembler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Figure 7 7 General Options Setting the Output Locations m Options for node BLDC_HALL120_78KORIE3 General Options C C Compiler Assembler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Library fie ie Zantiguratian fie Figure 7 8 General Options Selecting the C Library User s Manual U19825EE1VOUMOO 53 Chapter 7 MC CPU 78KORIC3 with IAR Embedded Workbench Options for node BLDC HALL120 78KORIE3 C C Compiler Assembler Custom Build Figure 7 9 General Options Setting the Stack and Heap 54 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 7 5 Compiler Options Options for node BLDC HALL120 78KORIE3 L Discard Unused Publics Assembler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Figure 7 10 Compiler Options Language Settings User s Manual U19825EE1VOUMOO 55 Chapter 7 MC CPU 78KORIC3 with IAR Embedded Workbench Options for node BLDC HALL120 78KORIE3 Li C C Compiler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Figure 7 11 Compiler Options Optimisation Options for node BLDC HALL120 78KORIE3 LI C C C
23. E Simulator TK 78 defines Internal symbols Macro execution into gt Dualline spacing Lines page NEM M kl I structured assembly lines Jab spacing Hi HINCIUGe E RT tees Figure 7 17 Assembler Options Listings User s Manual U19825EE1VOUMOO 59 Chapter 7 MC CPU 78KORICS3 with IAR Embedded Workbench 7 7 Linker Options Options for node BLDC HALL120 78KORIE3 General Options C C Compiler Assembler Custom Build Build Actions eminal Gutput Wutput format fin z Format vanant Ne z Figure 7 18 Linker Options Primary File Output 60 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Options for node BLDC HALL120 78KO0RIE3 General Options C C Compiler Assembler Custom Build Build Actions v Overii BLDC_HALL120_78KORIE3 hex Figure 7 19 Linker Options Secondary File Output in Options for node BLDC HALL120 78KORIE3 General Options C C Compiler Assembler Custom Build Build Actions Linker Figure 7 20 Linker Options Diagnostic Settings User s Manual U19825EE1VOUMOO 61 Chapter 7 MC CPU 78KORIC3 with IAR Embedded Workbench Options for node BLDC HALL120 78KORIE3 Category Factory Settings General Options C C Compiler Assembler Custom Build Output Extra Output ttdefine Diagnostics List Config Proce 4 gt Build Actions JV Ge
24. M1 e Switch3 T 5is setto 5 supplies power to the CPU daughter card Locate the MINICUBE2 16 pin connector J2 and attach the MINICUBE2 programmer using the 16 pin cable e The MC CPU 78KORIC3 is now ready to flash program User s Manual U19825EE1VOUMOO 35 36 Chapter 6 Note 6 1 6 1 1 Operation of the MC CPU 78KORICS3 When the MC CPU 78KORIC3 CPU Daughter Card is attached to the motor control evaluation platform it will be referenced as MC LVKIT 78KORIC3 The user should note the following references and documents for correct operation There is only one IAR source code project for the HALL Sensored BLDC with 120 degree trapezoidal control for standalone GUI operation application and it is designed to run the MC CPU 78KORIC3 CPU Daughter Card or the MC CPU 78KORIE3 CPU Daughter Card or the 78KORIX3 SPINIT kit hardware The user is only required to change a single definition in one of the project header files in order to select between the three In the IAR project folder BLDC_HALL120_78KORIES find the file common h at the beginning of the file there are 2 definitions simply comment out the incorrect target hardware define which target hardware to use define 78KORIE3SPINIT define MCCPU78KORIES define MCCPU78KORIC3 The code example above would compile for target hardware MC CPU 78KO0RIES MC CPU 78KORIC3 in Standalone Operation For standalone use i e without the GUI please check that the fo
25. NEC User s Manual MC CPU 78KORIC3 CPU Daughter Card For use with the Low Voltage Motor Control Starter Kit Documen t No U19825EE1VOUMOO Date published June 2009 NEC Electronics 2009 Printed in Germany Legal Notes The information in this document is current as of May 2008 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 Descriptions of circuits software and other related information in this document are provided for illustr
26. 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 3 Add the Source files to the project C Source Files Project gt Add Files Locate and select all the C source files Main_mcio c Sub_mcio c Initialise_hardware c Interrupt_handlers c Motor c GUI support c User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 7 10 Figure 7 25 7 11 Figure 7 26 Note Press OPEN All these files 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 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 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 7 3 Debug Start the Debug Session The debugger will connect to the OCD unit and download the code to the Flash memory on the microcontroller board Once downloaded the debugging window will open as shown below in Figure The IAR Embedded Workbench provides an integrated debugger so the debugging window opens as pa
27. TOOL1 C 5544 3 2 SS Tone 2 P1 TOOL1 JP9 P2x2 Figure 4 4 Flash Debug Header Schematic Table 4 3 Flash Debug Jumper Settings OPEN when Mini Cube2 has internal connection for RXD and JP4 OPEN TXD Other cases Refer to User s Manual insert JP4 OPEN when Mini Cube2 is Connected for Debugging or OPEN JP6 Flash Program Connected Insert Jumper for Normal Operation JP8 4 to JP8 3 Connect TOOLO Output to Mini Cube2 for Debug Flash ir Program JP8 2 to JP8 1 Connect TOOLO to P1 Connector for Users to use TOOLO as Port pin JP9 4 to JP9 3 Connect TOOL1 Output to Mini Cube2 for Debug Flash Jus Program JP9 2 to JP9 1 Porte TOOL1 to P1 Connector for Users to use TOOL1 as 20 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 Hardware Design Descriptions Chapter 4 4 6 Main Clock and Sub Clock Figure 4 5 4 7 Figure 4 6 Note VDD KR o C16 0 1uF VOD KR us u9 1 xT2 SN74AHC1GU04DBVR T SNTAAHC1GUO4DBVR o t Lo EXCLK X2 1 R11 d Y2 100 Ww NA 1 xT1 TP 32 KHz R15 2M a m MC 405 L sue wn WW NA BIAS RESISTOR J R16 Y1 100 OHMS 4 3 L JP7 P 3x2 20 MHz P122_1C3 Spy 65 Hs INTP3_PZ 1 3 5 Hen 48 PX ENCZ 1 3 5 C18 ak Hc49US C19 sot PX ENCE OA 18PF 18PF NA NA Main Clock and Sub Clock Schematic A sub clock oscillator 32 KHz crystal is connected to uPD78KORIES only The uPD78KORICS
28. U CPU signal PNM 0 J2 080 PWM 1 J4 27 LO U CPU signal PWM 1 J2 083 PWM 2 J4 23 HI V CPU signal PWM 2 J2 034 PWM 3 J4 29 LO V CPU signal PWM 3 J2 037 PWM 4 J4 25 HI W CPU signal PWM_4 J2 038 PWM 5 J4 31 LOW CPU signal PWM 5 8 SPD MSR select one from INTP1 PX INTP2 PY INTP3 PZ ior seo Mss M 9 Temperature sense signal from power module J2 044 ANI7 TMP J4 09 ANI7 TMP 10 INTP1 PX INTP2 PY INTP3 PZ to interrupt inputs J2 047 INTP1 PX J443 CMP U UU m J2 048 INTP2 PY J415 CMP V E Meer J2 051 INTP3 PZ J417 CMP W EE Ren For 11 Phase current sense signals from power module J2 052 ANIO IU J4 01 ANIO IU Current Sense Phase U J2 055 ANH IV J4 03 ANI1 IV Current Sense Phase V J2 056 ANI2 IW J4 05 ANI2 IW Current Sense Phase W 12 ANIS TEMP Motor temperature sense signal J2 059 ANI3 TEMP J5 08 ANI3 TEMP aaa a GY 13 Encoder signals PX ENCA PX ENCB PX ENCZ J2 060 PX ENCA J5 11 ENC A J2 063 PX ENCB J5 10 ENC B J2 064 PX ENCZ J5 03 ENC Z 14 Operation control push buttons GPI O pins on the J2 067 START 78KOR Ix3 J2 068 FORWARD J2 071 REVERSE J2 072 MODE 16 User s Manual U19825EE1VOUMOO Chapter 4 MC CPU 78KORIC3 Hardware Design Descriptions 4 1 An Overview of Signal Connections for the MC CPU 78KORIC3 CPU Daughter Card 1 3 4 5 VDD_KR C13 U5 Ww O 1uF uPD78KOR IC3 AVREF 1 1 FLMDO_KR C 5
29. View User s Manual U19825EE1VOUMOO 41 Chapter 6 Operation of the MC CPU 78KORICS 6 2 3 Set the Serial Port Number Figure 6 7 Figure 6 8 42 The first step should be to set the serial port to the correct port number RE NEC Motor Control 78KOR IE3 KIT File Setup Gauges PID Gains Setup Startup C ung COMS Motor Speed RPM JCOM10 f b 4 4 4 4 Shunt Current Amps PWM Duty Cycle 9o Wj Qu n Setting the Comm Port Number The speed RPM text box will display No Comm when communication is interrupted a ini xl SerialPort COM8 Operation Speed Control C Current Control C Voltage Control T 4 T t No Comm Displayed Once communications is established then the speed RPM text box will display the speed and the GUI can be used as normal User s Manual U19825EE1VOUMOO Operation of the MC CPU 78KORIC3 Chapter 6 6 2 4 6 2 5 Run the Motor Using Speed Control Mode To operate the motor in speed control mode select Speed Control from the operation menu see below and 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 BEI NEC Motor Control 78KOR IE3 KIT EN nl x File Setup Serial Port Gauges PID Gains Setup Statup Speed RPM Mo
30. ainer static shielding bag or conductive 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 U19825EE1VOUMOO judged sep
31. aki Kanagawa 211 8668 Japan Tel 044 4355111 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 U19825EE1VOUMOO 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
32. ar The following screen should appear Figure 5 6 QB Programmer 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 78F1213 prm file and press the Open button 32 User s Manual U19825EE1VOUMOO Flash Programming with a Flash Programmer Chapter 5 E QB Programmer tm z ni x File Device Help E a Bis Zal NV Device Setup AR startup gt Command standby Standard Advanced gt Parameter File Read Sees Rend cr Ty nx qe Setup Look in S PRM 78F1235_E1004 x cf EB Cancel Device Setup E 78F1201 prm i 78F1223 prm gt gt Device Setup 78F1203 prm E 78F1224 prm 3 76F1211 prm E 78F1225 prm 5 76F1213 prm E 78F1233 prm t 78F1214 prm poa prm Filename 78F1235 prm Files of type PRM Files PRM Cancel ZA r Ready nm 2 Figure 5 7 Parameter File Read 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 select the HEX file to be programmed from the menu File gt Load Or press the Load File symbol in the ICON taskbar The following screen should open User s Manual U19825EE1VOUMOO 33 Chapter 5 Flash Programming with a Flash Pro
33. arately for each device and according to related specifications governing the device 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 U19825EE1VOUMOO 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 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 Kawas
34. ative purposes in semiconductor product operation and application examples The incorporation of these circuits software and information in the design of a customer s equipment shall be done under the full responsibility of the customer NEC Electronics assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits software and information e 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
35. be defined as an INTP4 Port User s Manual U19825EE1VOUMOO 25 Chapter 4 MC CPU 78KORIC3 Hardware Design Descriptions KOR_IC3 Pin Name Signal Name PE Signal Descriptions KOR IC3 12 REGC REGC Common REGC 0 47uF cap KOR IC3 13 vss GND KOR IC3 14 VDD VDD KR KOR IC3 15 P30 SO10 TxD1 TO11 P30 IC3 PX REVERSE P83 P83 0 LD LED2 P83 P83 1 KOR IC3 16 P131 SI10 RxD1 SDA10 P31 IC3 PX MODE P83 P83 0 LD LED3 P83 P83 1 KOR IC3 17 P32 SCK10 B SCL10 N P32 IC3 INTP3 PZ SB30 INTP3 PZ PX ENCZ SB31 PX ENCZ KOR IC3 18 P73 TxDO TO10 RS232 TXD RS232 TXD KOR IC3 19 P72 INTP6 RxDO RS232 RXD RS232 RXD KOR IC3 20 P41 TOOL1 TOOL1 Dedicated for QB16P debug KOR IC3 21 P40 TOOLO TOOLO TOOLO KOR IC3 22 P52 SLTI SLTO P17 P52 SPD MSR SPD MSR INTPx Px KOR IC3 23 P51 TIO7 TOO7 PWM 5 PWM 5 LO W RealTime Outputs KOR IC3 24 P50 TI06 TOO6 PWM 4 PWM 4 HL W KOR IC3 25 P13 TI05 TOOS PWM 3 PWM 3 LO V KOR IC3 26 P12 TIO4 TOO4 PWM 2 PWM 2 HI V KOR IC3 27 P11 TIO3 TOO3 PWM 1 PWM 1 LO U KOR IC3 28 P10 TIO2 TOO2 PWM 0 PWM 0 HLU KOR IC3 29 P83 CMP1M P83 P83 P83 P83 Dedicated Multiplexer Select Need 10K pull down for default Also used for FLMDO JP3 KOR IC3 30 P82 CMP1P TMOFF1 INT P82 P82 Sen 2 KOR IC3 31 P81 CMPOM PX TRIPB PX TRIPB P81 IC3 PX TRIPB KOR IC3 32 P80 CMPOP TMOFFO INT P80_P80 PX ITRIP P83 IC3 PX ITRIP KOR IC3 33
36. downloaded from the NEC Electronics motor control website In order to modify the source code the IAR development environment is required and a time limited version can be acquired directly from the IAR website or a code limited trial version is included in the MINICUBE2 on chip debugger programmer or the full IAR development tool can be purchased from NEC Electronics or through an NEC Electronics franchised distributor This User s Manual covers details which are specific to the MC CPU 78KORIC3 CPU Daughter Card and not the complete evaluation kit Please see the User s Manual for the MC LVKIT 714 which covers the standalone operation of the evaluation kit For information on the GUI please see the relevant section User s Manual U19825EE1VOUMOO 11 Chapter 2 MC CPU 78KORIC3 CPU Daughter Card Specifications The MC CPU 78KORIC3 CPU Daughter Card supports uPD78KOR IE3 and uPD78KOR IC3 microcontrollers The specifications for these microcontrollers are uPD78KO0R Ix3 Features Flash Self Programming with Boot Swap Function Flash Shield Window Function Built In On chip Functions On chip Debugging Function On chip Power on Clear On chip Watchdog Timer On chip Multiplier Divider On chip BCD Adjustment 1 0 Ports Timer TAU 12 channel x 16 bit 40 MHz TAU Timer Array Unit e Watchdog Timer On chip Motor Control Option Unit On Chip Comparator Operational Amplifier Serial Interface SAU e UART LIN e CSI e Simplifi
37. e purchased from NEC Electronics or through an NEC Electronics franchised distributor Uncompress and install the QB programmer GUI software run the SETUP application Save and Uncompress the IAR Workbench Project Uncompress the folder containing the MC CPU 78KORIC3 project to a local folder This folder contains all the source code and IAR environment information required to build and compile both the debug files and the hex flash files Switch Settings and Connecting the MINICUBE2 To prepare the MC CPU 78KO0RIC3 for flash programming follow the steps below Power OFF the MC IO interface module and plug in the MC CPU 78KORIC3 CPU Daughter Card Check that the switches on the MINICUBE2 are set as shown below Switch M1 M2 is set to M1 Switch 3 T 5 is set to T Locate the MINICUBE2 16 pin connector J2 and attach the MINICUBE2 programmer using the 16 pin cable Power ON the MC IO interface module User s Manual U19825EE1VOUMOO 29 Chapter 5 Flash Programming with a Flash Programmer Ip X H038 7 N L Flash Programming Connector J2 Figure 5 8 Connecting the MINICUBE2 to the CPU Daughter Card Copy the uPD78F 1213 Flash programming parameter file 78F1213 prm into the installation directory for the QB programmer program or into a specific area which can be reached by the browse facility installation path QBP PRM This file is included with the IAR project download Once
38. ectors All control signals are placed on the two interface connectors at pre selected positions This method enables multiple Motor Control CPU Daughter Cards to interface with the MC I O interchangeably Therefore it is important to know the motor control signals used This section provides general overview of module interfaces so that users can become familiar with the system The next section provides specific information how the MC CPU 78KO0RICS signals are interfacing with the system Motor Control Interface Signals Signal on MC I O J5 14 Pin Terminal Block Categories Signal Names Description of Signals Motor position encoder signals Motor Position Encoder ENC A ENC B ENC Z connected to interrupt inputs of CPU HALL effect sensor input HALL Effect Sensor Signal HALL 1 HALL 2 HALL_3 connected to interrupt inputs of CPU Motor temperature input Motor Temperature Input ANI3 TEMP connected to A D converter input of CPU The signals on 14 pin terminal block are the sensor signals from the motor unit These signals are input to microcontroller on the CPU Daughter Card through MC I O module Table 3 2 Signals on MC I O J4 40 Pin Ribbon Cable Categories Signal Names Description of Signals VCC 15V Power input to MC I O board System Power VCC 5V Regulated 5V Power HI U HI V HW High side FET Drive PWM Signals PWM Signals from CPU LO U LO V LOW Low side FET Drive
39. ed IC 10 Bit Resolution A D Converters 2 5uS conversion time Power Supply Voltage e Vpp 2 7 Voc 5 5 Voc User s Manual U19825EE1VOUMOO Chapter 3 An Overview of MC IO Interface 3 1 General Descriptions of MC IO Interface with Motor Control Micro Boards The MC CPU 78KORIC3 CPU Daughter Card provides controller functions for motor control operation It processes and determines microcontroller actions from various sensor inputs The Motor Control Evaluation System consists of Power Module MC PWR LV e Motor Control I O Module MC I O MC CPU 78KORIC3 CPU Daughter Card this product The power module MC PWR LV drives the motor and provides sense signals through the 40 pin ribbon cable J5 The MC I O board sends and receives signals to the power module via the 40 pin ribbon cable at J4 and the 14 pin terminal block at J5 and provides user interface and operation control functions The removable CPU Daughter Card is connected to the MC I O board as shown below CPU Daughter Card MC PWR LV MC I O Figure 3 1 MC CPU 78KORICS installed on MC IO Board OL Mmcimss 0 NEC P2 pe M 78KOR 3 f P1 OL Psecioesvs O J1 FX8C 100P SV6 Figure 3 2 MC IO and MC CPU 78KORIC3 CPU Daughter Card User s Manual U19825EE1VOUMOO 13 Chapter 3 An Overview of MC IO Interface 14 3 2 Table 3 1 The MC CPU 78KORIC3 CPU Daughter Card control signals use two 100 pin high density conn
40. ent Data C14 0 1uF C15 0 1uF 1 3 4 5 VDD_KR 1 3 4 5 VDD_KR H U6 U7 7 SAN SN74CBT3257CPW TSSOP 16P SN74CBT3257CPW TSSOP 16P P20 IC3 4 4A B B1 ANIO IU 1 3 5 P24 IC3 41A B ti ANI4 SPD POT 1 3 5 P21_IC3 2a Sai ANI 13 5 P25 IC3 2A 9 mi ANIS ISHUNT 1 3 5 P22 IC3 ij 3e Hit ANI IW 13 5 P26 IC3 SEA 38 Hi ANIG SPARE 1 3 5 P23 iC3 4A 4B1 ANI3 TEMP 1 3 5 P27 IC3 4A 4B1 ANI7 TMP 1 3 5 182 H gt LED A 1 3 5 182 4 LED E 13 5 282 H LED B 1 3 5 282 H LED F 1 3 5 1 3 5 P83_P83 tis OQ 3p2 10 LED C 1 3 1 3 5 P83_P83 1 10 13 3 5 s O sg LED G 1 3 5 oB amp 452 13 LED D P does amp 482 H3 LED DH 35 R12 R13 10K 10K When P83 P838 1 e PORT2 7 0 LED Segments LED DP through LED A When P83_P83 0 Normal operation state allowing real time control signals to be connected to uPD78KOR IC3 User s Manual U19825EE1VOUMOO 23 Chapter 4 MC CPU 78KORIC3 Hardware Design Descriptions 4 9 2 4 10 4 11 MC CPU 78KO0RIC3 Port Signal Assignments for LED Data Load Control C17 0 1uF 1 3 4 5 VDD_KR KS U10 x SN74CBT3257CPW TSSOP 16P P123 IC 1A 8 Bi PX START 1 3 5 P124 1C 24 S cB PX FORWARD 1 3 5 P30 iC3 3A 381 PX REVERSE 1 3 5 P31_IC3 4A 4B1 PX MODE 1 3 5 182 LD LEDO 1 3 5 Ase ees od o 282 LD LED 1 3 5 RT P834 D gt s 382 LD LED2 1 3 5 r BdoEsB amp 482 LD LED3 1 3 5 R14 10K When P83 P83 1
41. grammer xq QB Programmer mz ioj x File Device Help F BaD se N gt GB Programmer startup Programmer gt Command standby QB Programmer V2 22 Parameter File Read Fi 1 4 05 Sce Reed Pac ES OOO a e E Device Setup Look in amp Exe e Er E3 Parameter File Read F gt BLDC HALL120 78KORIE3 eval hex pen Load File Parameter file gt Cancel Load File Rea gt gt Open Load File Cancel Load File Rea gt gt Open Load File Filename BLDC HALL120 78KORIE3 evalhex Files of type S rec Hex files rec s hex Cancel p A IREE Pulse 0 Speed 1Mbps Range Chip Freq Internal OSC Multiply 1 00 Num 2 Figure 5 8 Hex File Selection 34 Locate the file as shown in the window from the downloaded IAR project The file will be located as follows saved directory BLDC_HALL120_78KORIC3 Debug Exe Select the file BLDC_HALL120_78KORIC3 hex and press the OPEN button This will close the LOAD file window The following should be displayed on the main screen 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 User s Manual U19825EE1VOUMOO Flash Programming with a Flash Programmer Chapter 5 Figure 5 9 Note 5 4 E QB Programmer loj xl File Device Help LEO JB Z 5x N gt Aut
42. he it generates RESETB KR e When Mini Cube2 is not connected RESETB X is connected to RESETB KR by jumper JP6 18 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 Hardware Design Descriptions Chapter 4 4 4 FLMDO Flash Programming Mode Setting Signal VDD KR o U1 74AHC1G126DBVR 3 FLMDO R2 10K JP3 P2X1 L lt gt P83_P83 2 3 5 Figure 4 3 FLMDO Flash Programming Mode In normal operation FLMDO Input is pull down to GND by a 10K Resistor When MINICUBE2 is connected FLMDO is driven by MINICUBE2 For Flash Self Programming Mode FLMDO is Driven by P83 of IE3 P83_P83 To use P83 P83 for Mode setting JP3 should be connected Table 4 2 FLDMO Jumper Settings Jumper Condition Description of Functions FLMDO is driven by MINICUBE2 if connected Open FLMDO is pulled down by 10K resistor to GND for normal operation JP3 Connected During Flash self programming FLMDO can be driven by P83 User s Manual U19825EE1VOUMOO 19 Chapter 4 MC CPU 78KORIC3 Hardware Design Descriptions 4 5 16P FLASHDEBUG HEADER RxD RESETB_KR 1 2 TOOLO_QB lt D gt 2 TXD 4 VDD KR 1 24 5 JP4 n_ P2X1 4 RESETB X H 13 14 FLMDO 1 15 16 TOOL1 QB R6 10K 1 2 To0L0 lt gt 4 3 a pone 2 P1 TOOLO JP8 P2x2 1 2
43. hown in Figure 7 5 below and then ensure all the options are set according to the remaining figures below X IAR Embedded Workbench IDE File Edi View Project Tools Window Help nee FFARR Add Group Import File List Edit Configurations Remove Create New Project Add Existing Project Source Code Control LI Make F7 Comple CTRL F a E intere Rebuild Al s Cm 2 2 2 2 2 2 2 2 Bin Batch build FB io L Bio ter Bull CyRL Sreak B U amp rtBuf RX BUFF SIZE UART RX buffer r B md UartRead p read pointer Ha E main Debug CTRL D _UartWrite_p write pointer Make amp Restart Debugger La C3 Ou CE ugg UartErrStat UART error code 7 I EB intrins B io78f eae ae Rant M III M EE IE M DIEI ELSE L in a Project Build Options User s Manual U19825EE1VOUMOO 51 Chapter 7 MC CPU 78KORICS3 with IAR Embedded Workbench 7 4 General Options Options for node BLDC_HALL120_78KORIE3 C C Compiler Assembler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Bank address Figure 7 6 General Options Setting the Target Device 52 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Options for node BLDC HALL120 78KO0RIE3 General Options
44. le Edi View Project Debug Emulator Tce D c bd GP meelo oa gt gt gt gt P E Reset Stop Step Step Step Next Runto Run Exit When Lit Over Into Out Statement Cursor Debugger Debugger Task Bar Icons User s Manual U19825EE1VOUMOO 67 Chapter 7 MC CPU 78KORIC3 with IAR Embedded Workbench 68 B carrier c control c Main c 2 monitor csi tthhhht PHAR ARERR He E XEREEREREETEREREEEEERERETEEEETEEETET 1 0 Main Control Loop amp Task function Sequence ennes init OSC system init Set up start AD Start AD conversi enable interrupt Global Interrupts Figure 7 80 Debug Menus User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Figure 7 31 7 IAR Embedded Workbench IDE File Edit View Project Debug Emulator Tools Window Help 1 Workspace Source Browser Breakpoints Disassembly Memory Symbolic Memory Register Watch Locals Statics Auto Live Watch Quick Watch Call Stack Terminal 1 0 Code Coverage Profiling Stack o E E Dlliig L ESESESESESES 2 Toolbars wv Status Bar Debug Views Windows DRIE3 De v Build 46 Find in Files Tool Output L Debug Log i ELE motor c m Find In Trace void nain void Hardware Set DEBUG PORT MODE DEBUG PORT 0 Motor SetupFunc init LEDPORT init TIMER User s Manual U19825EE1VOUMOO
45. llowing jumpers and links are as defined below CPU Daughter Card Jumper Settings Please ensure that jumper settings are as detailed below JP1 Pins 1 2 shorted JP2 Pins 1 2 shorted JP4 Pins 1 2 shorted JP6 Pins 1 2 shorted JP8 Pins 3 4 shorted JP9 Pins 3 4 shorted 2SB22 shorted 2SB1 shorted Operation Example software to run the motor is pre programmed into the microcontroller s flash memory After the motor is connected the program is ready to run the motor as soon as the 15 VDC 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 User s Manual U19825EE1VOUMOO Operation of the MC CPU 78KORIC3 Chapter 6 Figure 6 1 Figure 6 2 Note Caution 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 Standalone Operation Three seconds after power up the LED displays the current start up set speed The speed setting mode is indicated by the decimal point on the last display digit On speed set mode Off displays actual speed A Mecha TE SSIS NN mm SEY Indicates speed set mode ON Initial Speed Display Pressing the mode key toggles between speed set mode and actual speed display mode Pittman motor starting speed is 300 RPM After power up in standalone mode the mot
46. motor speed The P17_P25 can also be used for setting Flash self programming mode Use of Signals Signal Assignments and Signal Multiplexing The uPD78KOR IC3 is a 38 pin device whereas the UPD78KOR IES is a 64 pin device In order to provide necessary real time operation signals and operation control signals for the MC I O board it is necessary to multiplex uPD78KOR IC3 signals The UPD78KOR IE3 has 64 pins and it is not necessary to multiplex the microcontroller port pins KOR_IC3 Pin Name Signal Name A Signal Descriptions KOR IC3 01 P23 ANI3 P23 IC3 ANI3 TEMP When P83_P83 0 KOR_IC3_02 P22 ANI2 P22 IC3 ANI2_IW LA pert as AN npn KOR_IC3_03 P21 ANI14 P21_IC3 ANI1_IV KOR_IC3_04 P20 ANIO P20_IC3 ANIO IU LED D When P883 P83 1 LED C Configure port as Data port LED B LED A KOR IC3 05 P120 INTPO EXLVI P120 IC3 INTP1 PX Puis ae Per PX ENCA SB27 PX ENCA CMP_I V W or HALL 1 2 3 or V IAVAW KOR IC83 06 RESET B RESETB KR QB16 PinO2 Reset KOR IC3 07 P124 XT2 P124 IC3 PX FORWARD P83 P8320 LD LED1 P83 P83 1 KOR IC3 08 P123 XT1 P123 IC3 PX START P83 P8320 LD LEDO P83 P83 1 KOR IC3 09 FLMDO FLMDO KR QB16P Pin14 FLMDO KOR IC3 10 P122 X2 EXCLK INTP5 P122 IC3 EXCLK X2 podia clock input to Xe Require 20MHz Oscillator Biasing Circuit KOR IC3 11 P121 X1 INTP4 P121 IC3 INTP2_PY SB28 INTP2_PY PX_ENCB SB29 PX ENCB When P122 X2 EXCLK receiving ext clock signal then P121 X1 can
47. ndow of the GUI Motor SetSpeedKp 0 150 Motor SetSpeedki 0 005 Motor SetSpeedKd 0 001 Please note that only speed control mode is described in this manual The full version of the NEC GUI manual Motor Control Graphical User Interface Users User s Manual U19825EE1VOUMOO Operation of the MC CPU 78KORIC3 Chapter 6 6 2 6 Figure 6 11 Manual will further discuss all other operational modes and settings While the other control modes shown in the GUI will operate the motor this operation and subsequent performance cannot be guaranteed The term Motor Tuning is defined as the adjustment of motor start values motor stop values and the PID values in order to improve the motor speed tracking control during normal running Change the Setup Settings It is also possible to change the speed limits current limits and current A D parameters by selecting the following tab as shown below Gain fi Offset o m Gain A D Offset Current A D Par A D 0 1023 Min 10 Max Rate m m4 sec m Gain A D Offset A D 0 1023 Speed Limits RPM Max 5000 Min 300 Max Rate i RPM sec Send Parameters to uC Get Parameters from uC GUI Setup Settings Current Limits m 1023 To read back the current setup settings from the MC CPU 78KORIC3 CPU Daughter Card click on the Get Parameters from uC button and the GUI will be updated User s Manual U19825EE1VOUMOO
48. nerate linker listing Debugger V Segment map File format IE 78 Symbols Text IECUBE C None HTML MINICUBE C Symbol listing iiim Mocks ma Lines page feo V Module summary Include suppressed entries JV Static overlay map Figure 7 21 Linker Options Generate MAP File Output Options for node BLDC HALL120 78KORIE3 Category Factory Settings General Options C C Compiler Assembler Custom Build Output Extra Output Hdefine Diagnostics List Config Proce gt Build Actions Linker command file IV Override default st OOLKIT_DIR CONFIGSInk78A1 235 64 xcl al Debugger IE 78 IECUBE MINICUBE Simulator Override default program entry TK 78 Entry label program start C Defined by application Search paths one per line TOOLKIT DIRSALIBN E Raw binary image File Symbol Segment Align ee ees I Figure 7 22 Linker Options Linker Command File Selection 62 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Note TheLinker control file must match the device selected The remainder of the Linker setup can be left as the default setting 7 8 Integrated Debugger Selection Caution The MINICUBE debugger must be selected when using the MINICUBE2 and when using the onboard USB interface DO NOT SELECT THE TK 78 debugger option Options for node BLDC_HALL120_78KORIE3 eo EE
49. oProcedure E pv x PB EE ee Programmer Blank check Chip Not blank Erase need QB Programmer V2 22 Erasing Firmware V4 05 Erase Chip PASS Program Chip SEE s Name UPD78F1235 Es Firmware 1 00 30z Firmware 1 40 Parameter file 50 Name 78F1235 prm 60 Version E1 00a 70 Load fi 80 r oad file ane Name BLDC HALL120 78K RIE3 1 DO Date 2009 04 30 15 42 38 P ASS Chksum 43 amp 7h AutoProcedure E py PASS sete DERI gt i File checksum Type Chksum Ares S RAP Donnection to device gt Port U amp RT ch Pulse 0 Speed 1Mbps Range Chip Freg Internal OSC Multiply 1 00 E Ready NUM VA QB Programmer AutoProcedure The Verify Chip operation is enabled by setting the Read Verify after Program option in the Advanced tab of the Device Setup window The 78KORIC3 device has now been reprogrammed with the example program which is suitable for both standalone operation and remote operation using the GUI Please make a backup copy of the original hex file before programming or running the compiler To program the MC CPU 78KORIC3 while not connected to the MC IO module To prepare the MC CPU 78KORICS for flash programming follow the steps below e Unplug the MC CPU 78KORIC3 CPU Daughter Card from the MC IO module Check that the switches on the MINICUBE2 are set as shown below Switch M1 M2 is set to
50. ompiler Discard Unused Publics Ri I Program Module F Library Module Figure 7 12 Compiler Options Output Set for Debug 56 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Options for node BLDC HALL120 78KORIE3 Li C C Compiler Discard Unused Publics Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE Simulator TK 78 Figure 7 13 Compiler Options Compiler Listings Options for node BLDC HALL120 78KORIE3 Li t gt Discard Unused Publics Figure 7 14 Compiler Options Pre Processor Settings User s Manual U19825EE1VOUMOO 57 Chapter 7 MC CPU 78KORICS3 with IAR Embedded Workbench Note All other compiler options settings can remain as the default settings 7 6 Assembler Options Options for node BLDC HALL120 78KO0RIES Figure 7 15 Assembler Options Language Settings 58 User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Options for node BLDC HALL120 78KO0RIE3 General Options C C Compiler Assembler Custom Build Build Actions Linker Debugger IE 78 IECUBE MINICUBE TK 78 Figure 7 16 Assembler Options Output Set for Debug Options for node BLDC_HALL120_78KORIE3 General Options C C Compiler I AS Custo Build Actions Linker v Debugger Iv Include header IE 78 IECUBE wd m MINICUB
51. or can be operated as follows Press the START STOP button to run the motor e Turn the potentiometer clockwise to increase the speed of the motor or counter clockwise to decrease the speed of the motor e 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 e Press the FORWARD or REVERSE button to change the rotation direction 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 the RESET switch on the CPU Daughter Card adjust the potentiometer to a lower speed and restart To control the motor from the Graphical Interface GUI from your PC please refer to the chapter on GUI operation User s Manual U19825EE1VOUMOO 37 Chapter 6 Operation of the MC CPU 78KORIC3 38 6 1 3 6 2 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
52. r LED Data Load Control 24 4 10 Comparator Hall Sensor and Motor Position Encoder Signal Inputs for uPD78KOR IC3 24 4 11 Motor Speed Measurement uuuussesseseeles esee 24 4 12 Use of Signals Signal Assignments and Signal Multiplexing 25 4 13 Optional Selection for P80_P80 CMPOP OA1 and P82 P82 Comparator Input 27 Chapter 5 Flash Programming with a Flash Programmer 28 5 1 Download the Following Files Lusuuseessssessele eee 29 5 2 Save and Uncompress the IAR Workbench Project Lssuususs 29 5 3 Switch Settings and Connecting the MINICUBE2 Lssuuseessess 29 5 4 To program the MC CPU 78KORIC3 while not connected to the MC IO module 35 Chapter 6 Operation of the MC CPU 78KORICS 36 6 1 MC CPU 78KORIC3 in Standalone Operation uuu luulluslusluuss 36 6 1 1 CPU Daughter Card Jumper Settings 0 0 cece cence ees 36 6 1 2 Operation x iode cete tad ant editus rus acce riesen cde te cu xanh o m eo diee a E 36 6 1 3 Drive and Motor Protection 00 0 ccc eee ees 38 6 2 MC CPU 78KORIC3 in GUI Operation uuuselsseeese eene 38 6 2 1 GUI Software Installation lisiseisleseleleesee eee 39 6 2 2 To Use GUI Software cage eck dees er eee bee eee wd aaa eee 40 6 2 3 Set the Serial Port Number 000 00 cece eee teen eee 42 6 2 4
53. rt 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 MINICUBE2 User s Manual U19825EE1VOUMOO 65 Chapter 7 MC CPU 78KORIC3 with IAR Embedded Workbench Figure 7 27 Notes 66 MINICUBE2 Hardware Setup for 78KOR 78F123564 Time unit nsec m ID code FFFFFFFFFFFFFFFFFFFF Erase flash before next ID check o jo 0x00000 OxOFFFF Internal ROM 64 Kbytes OxFF300 OxFFEFF Internal RAM 3072 bytes r Main clock Sub clock Glock board Glock Board Default External External System C System Fail safe break None v MHz None v kHz View setup r Flash programming Target power off m Target connect Permit Permit l TODLO Not Permit Not Permit r Pin mask Peripheral break Target fa WAIT m TARGET RESET Iv A tirer C Connect Nel INTERNAL RESET B serial etc Not Connect r Memory map Start address Length Type Internal ROM m Add Remove Remove All Debugging Initial Hardware Setup Ensure that the settings are as defined above 1 If the main clock shows the Clock board detected then ensure that this is selected 2 If debugging with a motor connected check the A timer box in the peripheral break settings as shown above to avoid damaging the motor driver devices
54. splay shows the following project files e Lefthand side window Project file source header map etc User s Manual U19825EE1VOUMOO MC CPU 78KORIC3 with IAR Embedded Workbench Chapter 7 Figure 7 4 Figure 7 5 Bottom build debug messages when the project is re built or the debugger is active e The main centre display shows any open files 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 inc lade include intrinsics h amp includa 1078 1235 64 h include 107801235 64 ext h unsigned char s UartPuf EX BOFT SITE UNKT XX buffer char s Uarthead p read pointer char s Vertirite p write pointer wasigned char s UertirrStat UART error code prototype func Ha Bi motore B motorh wasigned char unsigned Char Get Dart void Read VertSuf void UART receive UART date buffer read I B sub mc m wsigned char Wait Uartivoid UART weit for new data in buffer vosa Send Uart umsigned char UART send x BLDC HALLT20 zokontea fi al x tog Rany I MWP EE S Workspace amp Project Open Screen The build options for the project can then be set or changed using the following menus The build options are entered as s
55. the Microcontroller board is configured and the programmer connected to the PC open the Flash programming graphical interface QBP v2 22 30 User s Manual U19825EE1VOUMOO Flash Programming with a Flash Programmer Chapter 5 C MINICUBE Utilities r7 QBP I 78KOR Tool Documents f cc7BKOR T ID78KOR QB C MINICUBE Utilities Documents ic P T PM Documents C RA7SKOR C SM for 78KOR tha DeviceFile Installer 5 PM v6 30 C PM v6 30 Help Figure 5 4 Starting the QBP V2 22 QB Programmer Graphical Interface The following screen should appear Note the text may differ after the 1st two lines oix File Device Help Bim Qk i Programmer QB Programmer V2 22 Firmware V4 05 Success Read ParameterFile gt Device Name Firmware mooo ooo Parameter file 4 Name 798F1235 pm Version 1 00a Load file Name Dae Chksum Ara File checksum Type Chksum Area Connection to device Pot UART ch Pulse 0 Speed Mbps Range Chip Freq Intermal0SC Multiply 1 00 NM Z Figure 5 5 MiniCube2 Programmer GUI QB Programmer Next the device needs to be set up from the menu follow the following sequence Device gt Setup User s Manual U19825EE1VOUMOO 31 Chapter 5 Flash Programming with a Flash Programmer Or press the Spanner symbol in the ICON taskb
56. to MC I O board the micro board receives power from the MC I O board VCC IS External Power Option Use external power connection terminal post TP EXTVDD External power may be input to TP EXTVDD TP EXTVDD 2 7 VDC to 5 5 VDC User s Manual U19825EE1VOUMOO 17 Chapter 4 MC CPU 78KORIC3 Hardware Design Descriptions Table 4 1 Power Source Jumper Settings Power Source Select Jumper Jumper No Connection Descriptions Description of Functions VDD X VCO IS JP1 JP1 2 to JP1 1 Select Power form MC I O Board VDD X EXT VDD JP1 2 to JP1 3 Select Externally Supplied Power JP2 Normally connected Default ceudgis sie connected CPU Current Measurement Connect Ampere Meter on JP2 EVDD Connected to VDD KR SBx solder Jumpers through 2SB22 Normally Connected AVREF Connected to VDD_KR through SB1 Normally Connected 4 3 Reset Generation VDD KR 9 VDD KR VpD KR VpD KR T 106 R7 R8 o lt b 0 1uF 10K 10K T oF U4 Do m 74AHC1G125DBVR ate RST lt D 7N 4 TGPB RST 2 4 RESETB X 3 2 J X 3 SN74AHC1G08DBVR L d NV VODOKR VW D1 R9 DL4148 R10 10K 100 PB_RST Figure 4 2 Micro Board Reset Generation Sources of Reset Push button Switch a Push Button Reset Switch is provided SW1 Reset from User s Target System TG_RST RESETB_X RESETB_X is connected to J2 16P_Flash Debug_Header e When MINICUBE2 Programmer Debugger is connected to t
57. tor Speed RPM xt UD Voltage Control Change the PID Settings 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 PID Gains tab The PID gains editor will be displayed as shown below Please use the RPM to Current Gains as this is for speed control User s Manual U19825EE1VOUMOO 43 Chapter 6 Operation of the MC CPU 78KORIC3 44 Gauges Fo cae Setup Startup RPM to Certains Kp 0 15 Ki fo 005 Kd fo 001 J Current to PWM Gains lhl i f kd fo Send Gains to ul Get Gains from uC Figure 6 10 GUI PID Gains Settings To read back the current PID settings from the MC CPU 78KORIC3 CPU Daughter Card click on the Get Gains from uC button and the GUI will be updated Changes can be made in this view and sent down to the Simply make the appropriate changes and click on the Send Gains to uC To make the changes permanent the user will have to modify the initialised values in the original IAR project files main_mcio c and then rebuild the project This requires a licensed version of either IAR Embedded Workbench full version or IAR Embedded Workbench kickstart version Find the function calls in the file main_mcio c and change the values that are passed to the functions Set these parameters to the values shown in the tuning wi
58. tor control MC LVKIT 78KORIC3 and is a complete 3 phase motor control evaluation system for NEC Electronics microcontroller application specific standard products ASSP s for motor control The MC CPU 78KORICS kit contains all necessary hardware and software to quickly set up and run a low voltage brushless DC motor BLDCM MC LVKIT 3 phase Motor Control Evaluation System The MC CPU 78KORIC3 CPU Daughter Card is used to demonstrate and evaluate CPU and on chip peripheral functions of NEC Electronics16 bit microcontrollers IPD78KOR IE3 and uPD78KOR IC3 The MC CPU 78KORIC3 CPU Daughter Card will interface with the Motor Control I O Board MC I O Board in motor control applications In addition the MC CPU 78KORIC3 supports Flash programming and debugging when the CPU Daughter Card is connected to a host PC through the MINICUBE2 on chip debugger programmer In order to provide sufficient details for the users to interface with MC I O Board some details for both MC I O board and the MC CPU 78KORIC3 CPU Daughter Card will be provided in this manual Please see the MC CPU 78KORIC3 CPU Daughter Card below User s Manual U19825EE1VOUMOO Introduction Chapter 1 Figure 1 2 CPU Daughter Card Notes 1 To flash program or debug the MC CPU 78KORIC3 CPU Daughter Card it is recommended to use the MINICUBE2 on chip debugger programmer unit The source code and project files are available free of charge and can be
59. uction LLLttLSS t ttttssosseseesee 10 Chapter 2 MC CPU 78KORICS3 CPU Daughter Card SDecIfICallols terror a tute nere UE eU dones 12 Chapter 3 An Overview of MC IO Interface 13 3 1 General Descriptions of MC IO Interface with Motor Control Micro Boards 13 3 2 Motor Control Interface Signals iuuslusselseesessels eese 14 3 3 Signal Positions on the 100 pin Connectors 0 000 cece eee 15 Chapter 4 MC CPU 78KORIC3 Hardware Design Descriptions queas e edid aye iem REN Po 2a ETT ate d t mais Rac uma ale se eade ett ee nes BUM mane UE cat e eros T 17 4 1 An Overview of Signal Connections for the MC CPU 78KORIC3 CPU Daughter Card 17 4 2 Power Source Selection Luuuueuseeseesee eene 17 4 3 Reset Generatio siose piesne REALI REG U RR REFRUEPRUGH EELE De e PIS due 18 4 4 FLMDO Flash Programming Mode Setting Signal 19 4 5 16P FLASHDEBUG HEADER ssssssee rs 20 4 6 Main Clock and Sub Clock LLuuuuuuuuseesseseeleseee ese 21 4 7 Target System Connector ssuseesessesees enn 21 4 8 Optional RS232 UART Connections sssssesseleese lesen 22 4 9 LED Data Loading oa eoe a eee x RIDERE M ERA a ease ep eee eine 23 4 9 1 MC CPU 78KORIC3 Port Assignments for LED Segment Data 23 4 9 2 MC CPU 78KORIC3 Port Signal Assignments fo
60. 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 16 Kbyte code limited version is included with the MINICUBE2 on chip debugger programmer unit and can be used to run the example software Please note that a Flash programmer on chip debugging programming 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 If aversion of the IAR tool is not already installed then install the IAR Eembedded 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 kickstart or IAR full versions However it may be necessary to define your own project and workspace This is described later in this chapter Switch Settings and Connecting the MINICUBE2 To prepare the MC CPU 78KORIC3 CPU Daughter Card for debugging with the IAR Workbench follow the steps below Power OFF the MC IO interface module and plug in the MC CPU 78KORIC3 CPU Daughter Card Check that the switches on the MINICUBE2 are set as shown below Switch M1 M2 is set to M1 User s Manual U1

Download Pdf Manuals

image

Related Search

Related Contents

Hampton Bay CBW1613L-3BRZ Installation Guide  取扱説明書ダウンロード(PDF)  Central de deteção de incêndios Pearl Manual de instalação e  Agilent Technologies 16700 Musical Instrument Amplifier User Manual  Samsung 940BW PLUS Manual de Usuario    Using Cortado Explorer    平成24年4月24日 消費生活用製品の重大製品事故に係る  Operación de Motosierras  

Copyright © All rights reserved.
Failed to retrieve file