Renesas V850 Series Quick start guide

To our customers,
Old Company Name in Catalogs and Other Documents
On April 1st, 2010, NEC Electronics Corporation merged with Renesas Technology
Corporation, and Renesas Electronics Corporation took over all the business of both
companies. Therefore, although the old company name remains in this document, it is a valid
Renesas Electronics document. We appreciate your understanding.
Renesas Electronics website: http://www.renesas.com
April 1st, 2010
Renesas Electronics Corporation
Issued by: Renesas Electronics Corporation (http://www.renesas.com)
Send any inquiries to http://www.renesas.com/inquiry.

Notice
1. All information included in this document is current as of the date this document is issued. Such information, however, is
subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please
confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to
additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website.
2. Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights
of third parties by or arising from the use of Renesas Electronics products or technical information described in this document.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights
of Renesas Electronics or others.
3. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part.
4. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software,
and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by
you or third parties arising from the use of these circuits, software, or information.
5. When exporting the products or technology described in this document, you should comply with the applicable export control
laws and regulations and follow the procedures required by such laws and regulations. You should not use Renesas
Electronics products or the technology described in this document for any purpose relating to military applications or use by
the military, including but not limited to the development of weapons of mass destruction. Renesas Electronics products and
technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited
under any applicable domestic or foreign laws or regulations.
6. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics
does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages
incurred by you resulting from errors in or omissions from the information included herein.
7. Renesas Electronics products are classified according to the following three quality grades: “Standard”, “High Quality”, and
“Specific”. The recommended applications for each Renesas Electronics product depends on the product’s quality grade, as
indicated below. You must check the quality grade of each Renesas Electronics product before using it in a particular
application. You may not use any Renesas Electronics product for any application categorized as “Specific” without the prior
written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for
which it is not intended without the prior written consent of Renesas Electronics. Renesas Electronics shall not be in any way
liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an
application categorized as “Specific” or for which the product is not intended where you have failed to obtain the prior written
consent of Renesas Electronics. The quality grade of each Renesas Electronics product is “Standard” unless otherwise
expressly specified in a Renesas Electronics data sheets or data books, etc.
“Standard”: Computers; office equipment; communications equipment; test and measurement equipment; audio and visual
equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots.
“High Quality”: Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anti-
crime systems; safety equipment; and medical equipment not specifically designed for life support.
“Specific”: Aircraft; aerospace equipment; submersible repeaters; nuclear reactor control systems; medical equipment or
systems for life support (e.g. artificial life support devices or systems), surgical implantations, or healthcare
intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life.
8. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics,
especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation
characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or
damages arising out of the use of Renesas Electronics products beyond such specified ranges.
9. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further,
Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to
guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a
Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire
control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because
the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system
manufactured by you.
10. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental
compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable
laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS
Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with
applicable laws and regulations.
11. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this
document or Renesas Electronics products, or if you have any other inquiries.
(Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its majority-
owned subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.

Printed in Japan
Document No. U17209EJ1V0AN00 (1st edition)
Date Published September 2004 N CP(K)
Inverter Control by V850 Series
120°Excitation Method Control by Zero-Cross Detection
Application Note
V850E/IA1
V850E/IA2
V850E/IA3
V850E/IA4
V850E/MA3
2004

Application Note U17209EJ1V0AN
2
[MEMO]

Application Note U17209EJ1V0AN 3
1
2
3
4
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 V
IL
(MAX) and V
IH
(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 V
IL
(MAX) and
V
IH
(MIN).
HANDLING OF UNUSED INPUT PINS
Unconnected CMOS device inputs can be cause of 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 V
DD
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.
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 quickly dissipate it when it has occurred. 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 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.
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.
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 judged separately 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.
NOTES FOR CMOS DEVICES
5
6

Application Note U17209EJ1V0AN
4
These commodities, technology or software, must be exported in accordance
with the export administration regulations of the exporting country.
Diversion contrary to the law of that country is prohibited.
The information in this document is current as of July, 2004. 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 illustrative
purposes in semiconductor product operation and application examples. The incorporation of these
circuits, software and information in the design of a customer's equipment shall be done under the 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".
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 visual equipment, home electronic appliances, machine tools, personal electronic equipment
and industrial robots.
"Special": Transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster
systems, anti-crime systems, safety equipment and medical equipment (not specifically designed
for life support).
"Specific": Aircraft, 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).
•
•
•
•
•
•
M8E 02. 11-1

Application Note U17209EJ1V0AN 5
Regional Information
•
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 other legal issues may also vary
from country to country.
[GLOBAL SUPPORT]
http://www.necel.com/en/support/support.html
NEC Electronics America, Inc. (U.S.)
Santa Clara, California
Tel: 408-588-6000
800-366-9782
NEC Electronics Hong Kong Ltd.
Hong Kong
Tel: 2886-9318
NEC Electronics Hong Kong Ltd.
Seoul Branch
Seoul, Korea
Tel: 02-558-3737
NEC Electronics Shanghai Ltd.
Shanghai, P.R. China
Tel: 021-5888-5400
NEC Electronics Taiwan Ltd.
Taipei, Taiwan
Tel: 02-2719-2377
NEC Electronics Singapore Pte. Ltd.
Novena Square, Singapore
Tel: 6253-8311
J04.1
N
EC Electronics (Europe) GmbH
Duesseldorf, Germany
Tel: 0211-65030
•
Sucursal en España
Madrid, Spain
Tel: 091-504 27 87
Vélizy-Villacoublay,France
Tel: 01-30-675800
•
Succursale Française
•
Filiale Italiana
Milano, Italy
Tel: 02-66 75 41
•
Branch The Netherlands
Eindhoven,TheNetherlands
Tel: 040-2445845
•
Tyskland Filial
Taeby, Sweden
Tel: 08-63 80 820
•
United Kingdom Branch
Milton Keynes, UK
Tel: 01908-691-133
Some information contained in this document may vary from country to country. Before using any NEC
Electronics product in your application, pIease contact the NEC Electronics office in your country to
obtain a list of authorized representatives and distributors. They will verify:

Application Note U17209EJ1V0AN
6
INTRODUCTION
Target Readers This application note is intended for users who understand the functions of the
V850E/IA1, V850E/IA2, V850E/IA3, V850E/IA4, and V850E/MA3, and who design
application systems that use these microcontrollers. The applicable products are shown
below.
•V850E/IA1
Standard products:
µ
PD703116, 70F3116
Special products:
µ
PD703116(A), 703116(A1), 70F3116(A), 70F3116(A1)
•V850E/IA2:
Standard products:
µ
PD703114, 70F3114
Special products:
µ
PD703114(A), 70F3114(A)
•V850E/IA3
Standard products:
µ
PD703183, 70F3184
•V850E/IA4
Standard products:
µ
PD703185, 703186, 70F3186
•V850E/MA3
Standard products:
µ
PD703131, 703131A, 703131Y, 703131AY, 703132, 703132A,
703132Y, 703132AY, 703133, 703133A, 703133Y, 703133AY,
703134, 703134A, 703134Y, 703134AY, 70F3134, 70F3134A,
70F3134Y, 70F3134AY
Purpose The purpose of this application note is to help the user understand how a brushless DC
motor is controlled via the 120°sensorless drive excitation method that uses PWM
output and A/D converter input as a system example of the timer/counter function of the
V850E/IA1, V850E/IA2, V850E/IA3, V850E/IA4, and V850E/MA3.
Organization This application note is divided into the following sections.
•Control method •Software configuration
•Hardware configuration •Program list
How to Use This Manual It is assumed that the reader of this application note has general knowledge in the fields
of electrical engineering, logic circuits, and microcontrollers.
Cautions 1. Application examples in this manual are intended for the “standard”
quality models for general-purpose electronic systems. When using
an example in this manual for an application that requires the
“special” quality grade, evaluate each component and circuit to be
actually used to see if they satisfy the required quality standard.
2. To use this manual for special-grade products, read the part
numbers as follows:
µ
PD703114 →
µ
PD703114(A)
µ
PD70F3114 →
µ
PD70F3114(A)
µ
PD703116 →
µ
PD703116(A), 703116(A1)
µ
PD70F3116 →
µ
PD70F3116(A), 70F3116(A1)

Application Note U17209EJ1V0AN 7
For details of hardware functions (especially register functions, setting methods, etc.)
and electrical specifications
→See the V850E/IA1 Hardware User’s Manual, V850E/IA2 Hardware User’s
Manual, V850E/IA3, V850E/IA4 Hardware User’s Manual, and V850E/MA3
Hardware User’s Manual.
For details of instruction functions
→See the V850E1 Architecture User’s Manual.
Conventions Data significance: Higher digits on the left and lower digits on the right
Active low representation: xxx (overscore over pin or signal name)
Memory map address: Higher addresses on the top and lower addresses on
the bottom
Note: Footnote for item marked with Note in the text
Caution: Information requiring particular attention
Remark: Supplementary information
Numeric representation: Binary ... xxxx or xxxxB
Decimal ... xxxx
Hexadecimal ... xxxxH
Prefix indicating the power
of 2 (address space,
memory capacity): K (kilo): 210 = 1,024
M (mega): 220 = 1,0242
G (giga): 230 = 1,0243
Data type: Word: 32 bits
Halfword: 16 bits
Byte: 8 bits
Related documents The related documents indicated in this publication may include preliminary versions.
However, preliminary versions are not marked as such.
Documents related to V850E/IA1, V850E/IA2, V850E/IA3, V850E/IA4, V850E/MA3
Document Name Document No.
V850E1 Architecture User’s Manual U14559E
V850E/IA1 Hardware User’s Manual U14492E
V850E/IA2 Hardware User’s Manual U15195E
V850E/IA3, V850E/IA4 Hardware User’s Manual U16543E
V850E/MA3 Hardware User’s Manual U16397E
V850E/IA1, V850E/IA2 AC Motor Inverter Control Using Vector
Operation Application Note U14868E
Inverter Control by V850 Series 120°Excitation Method Control by Zero-
Cross Detection Application Note This manual

Application Note U17209EJ1V0AN
8
Documents related to development tools (user’s manuals)
Document Name Document No.
IE-V850E-MC, IE-V850E-MC-A (In-Circuit Emulator for V850E/IA1,
V850E/IA2) U14487E
IE-V850E1-CD-NW (PCMCIA Card Type On-Chip Debug Emulator for
V850E/IA3, V850E/IA4, V850E/MA3) U16647E
IE-703116-MC-EM1 (In-Circuit Emulator Option Board for V850E/IA1) U14700E
IE-703114-MC-EM1 (In-Circuit Emulator Option Board for V850E/IA2) U16533E
Operation U16932E
C Language U16930E
Assembly Language U16931E
CA850 Ver. 2.70 C Compiler Package
Link Directive U16933E
PM plus Ver. 5.20 U16934E
ID850 Ver. 2.50 Integrated Debugger Operation U16217E
ID850NW Ver. 2.51 Integrated Debugger
(for V850E/MA3) Operation U16454E
ID850NWC Ver. 2.51 Integrated Debugger
(for V850E/IA3, V850E/IA4, V850E/MA3) Operation U16525E
SM850 Ver. 2.50 System Simulator
(for V850E/IA1, V850E/IA2) Operation U16218E
SM850 Ver. 2.00 or Later System
Simulator (for V850E/IA1, V850E/IA2) External Part User Open
Interface Specifications U14873E
Basics U13430E
Installation U13410E
RX850 Ver. 3.13 or Later Real-Time OS
Technical U13431E
Basics U13773E
Installation U13774E
RX850 Pro Ver. 3.15 Real-Time OS
Technical U13772E
RD850 Ver. 3.01 Task Debugger U13737E
RD850 Pro Ver. 3.01 Task Debugger U13916E
AZ850 Ver. 3.10 System Performance Analyzer U14410E
PG-FP4 Flash Memory Programmer U15260E

9
Application Note U17209EJ1V0AN
CONTENTS
CHAPTER 1 CONTROL METHOD..........................................................................................................12
1.1 Outline of Brushless DC Motor Control.................................................................................. 12
CHAPTER 2 HARDWARE CONFIGURATION.......................................................................................17
2.1 Configuration ............................................................................................................................ 17
2.2 Circuit Diagram ......................................................................................................................... 19
CHAPTER 3 SOFTWARE CONFIGURATION........................................................................................31
3.1 Control Block ............................................................................................................................ 31
3.2 Peripheral I/O............................................................................................................................. 32
3.3 Software Processing Structure ............................................................................................... 34
3.4 Flowchart................................................................................................................................... 36
3.4.1 Main processing...........................................................................................................................36
3.4.2 Motor control processing..............................................................................................................45
3.4.3 U zero-cross point interrupt processing........................................................................................50
3.4.4 V zero-cross point interrupt processing........................................................................................51
3.4.5 W zero-cross point interrupt processing.......................................................................................52
3.4.6 10 mSEC interval interrupt processing.........................................................................................53
3.4.7 A/D converter channel 0 interrupt processing ..............................................................................54
3.4.8 A/D converter channel 1 interrupt processing ..............................................................................55
3.4.9 Hardware initialization..................................................................................................................56
3.4.10 Common area initialization...........................................................................................................57
3.4.11 Revolution start initialization.........................................................................................................57
3.4.12 LED display..................................................................................................................................58
3.5 Common Areas ......................................................................................................................... 59
3.6 Tables......................................................................................................................................... 60
3.7 Constant Definitions................................................................................................................. 62
CHAPTER 4 PROGRAM LIST ................................................................................................................63
4.1 Program List (V850E/IA1)......................................................................................................... 63
4.1.1 Symbol definition..........................................................................................................................63
4.1.2 Constant definition........................................................................................................................64
4.1.3 Interrupt handler setting ...............................................................................................................67
4.1.4 Startup routine setting..................................................................................................................69
4.1.5 Main processing function..............................................................................................................72
4.1.6 LED display function.....................................................................................................................76
4.1.7 Motor control interrupt processing function ..................................................................................77
4.1.8 Zero-cross interrupt processing function......................................................................................81
4.1.9 10 mSEC interval interrupt processing function ...........................................................................83
4.1.10 A/D converter interrupt processing function .................................................................................84
4.1.11 Hardware initialization processing function ..................................................................................84
4.1.12 Common area initialization processing function ...........................................................................86
4.1.13 Revolution start initialization processing function.........................................................................86
4.1.14 Link directive file for V850E/IA1....................................................................................................87
4.2 Program List (V850E/IA2)......................................................................................................... 89

10 Application Note U17209EJ1V0AN
4.2.1 Symbol definition......................................................................................................................... 89
4.2.2 Constant definition....................................................................................................................... 90
4.2.3 Interrupt handler setting............................................................................................................... 93
4.2.4 Startup routine setting ................................................................................................................. 95
4.2.5 Main processing function............................................................................................................. 98
4.2.6 LED display function...................................................................................................................102
4.2.7 Motor control interrupt processing function.................................................................................103
4.2.8 Zero-cross interrupt processing function ....................................................................................107
4.2.9 10 mSEC interval interrupt processing function..........................................................................109
4.2.10 A/D converter interrupt processing function................................................................................110
4.2.11 Hardware initialization processing function.................................................................................110
4.2.12 Common area initialization processing function..........................................................................112
4.2.13 Revolution start initialization processing function .......................................................................112
4.2.14 Link directive file for V850E/IA2..................................................................................................113
4.3 Program List (V850E/IA3) .......................................................................................................115
4.3.1 Symbol definition........................................................................................................................115
4.3.2 Constant definition......................................................................................................................116
4.3.3 Interrupt handler setting..............................................................................................................119
4.3.4 Startup routine setting ................................................................................................................121
4.3.5 Main processing function............................................................................................................124
4.3.6 LED display function...................................................................................................................128
4.3.7 Motor control interrupt processing function.................................................................................129
4.3.8 Zero-cross interrupt processing function ....................................................................................132
4.3.9 10 mSEC interval interrupt processing function..........................................................................135
4.3.10 A/D converter interrupt processing function................................................................................135
4.3.11 Hardware initialization processing function.................................................................................136
4.3.12 Common area initialization processing function..........................................................................138
4.3.13 Revolution start initialization processing function .......................................................................138
4.3.14 Link directive file for V850E/IA3..................................................................................................138
4.4 Program List (V850E/IA4) .......................................................................................................140
4.4.1 Symbol definition........................................................................................................................140
4.4.2 Constant definition......................................................................................................................141
4.4.3 Interrupt handler setting..............................................................................................................144
4.4.4 Startup routine setting ................................................................................................................146
4.4.5 Main processing function............................................................................................................149
4.4.6 LED display function...................................................................................................................153
4.4.7 Motor control interrupt processing function.................................................................................154
4.4.8 Zero-cross interrupt processing function ....................................................................................157
4.4.9 10 mSEC interval interrupt processing function..........................................................................160
4.4.10 A/D converter interrupt processing function................................................................................160
4.4.11 Hardware initialization processing function.................................................................................161
4.4.12 Common area initialization processing function..........................................................................163
4.4.13 Revolution start initialization processing function .......................................................................163
4.4.14 Link directive file for V850E/IA4..................................................................................................163
4.5 Program List (V850E/MA3).....................................................................................................165
4.5.1 Symbol definition........................................................................................................................165
4.5.2 Constant definition......................................................................................................................166
4.5.3 Interrupt handler setting..............................................................................................................169

11
Application Note U17209EJ1V0AN
4.5.4 Startup routine setting................................................................................................................171
4.5.5 Main processing function............................................................................................................174
4.5.6 LED display function...................................................................................................................178
4.5.7 Motor control interrupt processing function ................................................................................179
4.5.8 Zero-cross interrupt processing function....................................................................................182
4.5.9 10 mSEC interval interrupt processing function .........................................................................184
4.5.10 A/D converter interrupt processing function ...............................................................................185
4.5.11 Hardware initialization processing function ................................................................................185
4.5.12 Common area initialization processing function .........................................................................187
4.5.13 Revolution start initialization processing function.......................................................................187
4.5.14 Link directive file for V850E/MA3................................................................................................188

Application Note U17209EJ1V0AN
12
CHAPTER 1 CONTROL METHOD
1.1 Outline of Brushless DC Motor Control
A brushless DC (BLDC) motor consists of a stator, coil, and rotor. The rotor, which includes a permanent magnet,
is rotated by the action of the magnetic field generated by the coil of the stator.
The magnetic field is generated by exciting the coil wound around the stator in a specific sequence. By controlling
the intensity and cycle of the magnetic field with a microcontroller, the torque response and the number of revolutions
of the motor can be controlled.
This section explains how to control a BLDC motor without a sensor by using the V850E/IA1, V850E/IA2,
V850E/IA3, V850E/IA4, or V850E/MA3.
Figure 1-3 shows an example of the circuit of a three-phase brushless DC motor. The internal PWM output
function of the microcontroller is used to control the current that flows through the motor, by using a transistor array
consisting of six transistors.
The magnetic field is generated by controlling the excitation pattern of the six transistors as shown in Table 1-1.
Table 1-1. Excitation Pattern
Upper Arm Lower ArmExcitation
Pattern U V W U V W
Excitation
Direction
<1> Active Inactive Inactive Inactive Active Inactive U →V
<2> Active Inactive Inactive Inactive Inactive Active U →W
<3> Inactive Active Inactive Inactive Inactive Active V →W
<4> Inactive Active Inactive Active Inactive Inactive V →U
<5> Inactive Inactive Active Active Inactive Inactive W →U
<6> Inactive Inactive Active Inactive Active Inactive W →V

CHAPTER 1 CONTROL METHOD
Application Note U17209EJ1V0AN 13
Figure 1-1. Three-Phase DC MotorVoltage Waveform
<1> <2> <3> <4> <5> <6>
U phase
U phase
U phase
V phase
V phase
V phase
W phase
W phase
W phase
Driving voltage
waveform
Induced voltage
waveform

CHAPTER 1 CONTROL METHOD
Application Note U17209EJ1V0AN
14
Figure 1-2. Rotor Position Detection Principle
Return to (a)
(a) Rotor position <1> … U-phase stator: S pole
V-phase stator: N pole
W-phase stator: Center point
(b) Rotor position <2> … U-phase stator: S pole
V-phase stator: Center point
W-phase stator: N pole
A
S
S
N
N
V
WC
= 0
V
CC
W-phase stator
is located in the
center of the N pole
and S pole of a
magnet rotor
Magnetic
flux
V
W
UA
S
S
N
N
V
VC
= 0
V
CC
W
V
U
(d) Rotor position <4> … U-phase stator: N pole
V-phase stator: S pole
W-phase stator: Center point
(c) Rotor position <3> … U-phase stator: Center point
V-phase stator: S pole
W-phase stator: N pole
A
U
S
S
N
N
V
UC
= 0
V
CC
V
W
A
U
S
S
N
N
V
WC
= 0
V
CC
V
W
(e) Rotor position <5> … U-phase stator: N pole
V-phase stator: Center point
W-phase stator: S pole
(f) Rotor position <6> … U-phase stator: Center point
V-phase stator: N pole
W-phase stator: S pole
W
V
U
A
S
S
N
N
V
VC
= 0
V
CC
S
S
N
N
A
U
V
W
V
CC
V
UC
= 0

CHAPTER 1 CONTROL METHOD
Application Note U17209EJ1V0AN 15
Figure 1-3. Configuration ofThree-Phase Brushless DC Motor
U
U
UVW
TrU
1
On Off Off
Off On Off
TrV
1
TrW
1
TrU
2
TrV
2
TrW
2
PWM control
Zero-cross point detection V
V
W
W

CHAPTER 1 CONTROL METHOD
Application Note U17209EJ1V0AN
16
The 120°control method for a BLDC motor without a sensor is described below.
To control a BLDC motor, the rotor position must be known.
To control a BLDC motor without a sensor, the rotor position is estimated using induced voltage.
The induced voltage is in phase with the driving voltage waveform and its waveform is close to a sine wave, as
shown in Figure 1-1. Figure 1-2 illustrates how the polarity of the stator of the motor is switched and how the magnet
rotor revolves.
As shown in Figures 1-1 and 1-2, a three-phase DC motor rotates its rotor by switching the three driving current
patterns on the three coil phases.
During period <1> in Figure 1-1, for example, transistor TrU1in Figure 1-3 is turned on by the U-phase driving pin,
and TrV2is turned on by the V-phase driving pin, causing the current to flow from the U-phase driving pin toward the V-
phase driving pin. At this time, the W-phase coil seems to be disconnected from the driver circuit and induced voltage
is generated.
This induced voltage is used to detect the rotor position.
To control the number of revolutions of the motor, the voltage applied to the motor is controlled to change the
current flowing through the coil. To change the voltage, a waveform that is controlled by PWM is applied to the
transistor.
The voltage is changed by applying a waveform (PWM waveform) in proportion to the voltage to be applied, to the
transistors on the lower arm side (TrU2, TrV2, and TrW2) while the transistors on the upper arm side (TrU1, TrV1, and
TrW1) are on.

Application Note U17209EJ1V0AN 17
CHAPTER 2 HARDWARE CONFIGURATION
This chapter describes the hardware configuration.
2.1 Configuration
The reference system’s main functions are described below. In this reference system, when the revolution
specification switch is pressed after power application, the motor starts revolving in the direction specified.
Figure 2-1. Overall System Configuration
Reset circuit
Position
detection V-U
V-V
V-W
LED display
Revolution
specification SW 3
6
13
A/D converter
Volume for
speed control Driver IC
Timer
Interrupt
RESET
Port
Microcontroller V-U
V-V
V-W
M
Current voltage
conversion
WDT
Current voltage
conversion
Position
detection
Position
detection

CHAPTER 2 HARDWARE CONFIGURATION
Application Note U17209EJ1V0AN
18
(1) Volume for speed control
Volume for increasing and decreasing the number of revolutions of the motor
(2) Revolution specification SW
CW, CCW, and STOP switches
(3) LED display
LED displaying the number of revolutions, operation time, etc.
(4) WDT
Watchdog timer
(5) Driver IC
Driver for driving motor
(6) Current voltage converter
Converting the motor driving current to voltage, used for detecting overcurrent
(7) Position detector
Rotor position estimation signal output from the induced voltage
Other manuals for V850 Series
1
This manual suits for next models
5
Table of contents
Popular Inverter manuals by other brands

AMV ELECTRONICA
AMV ELECTRONICA SK3000 Series user manual

RARA
RARA H2 Server YW-1400T user manual

AT&T
AT&T Z129A instructions

Yamaha
Yamaha EDL20000TE owner's manual

Generac Power Systems
Generac Power Systems 004702-0, 004703-0, 004704-0, owner's manual

Centurion
Centurion 005011-0 Installation and owner's manual