EasyManua.ls Logo

Renesas V850 Series User Manual

Renesas V850 Series
186 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #89 background imageLoading...
Page #89 background image
CHAPTER 4 PROGRAM LIST
Application Note U17209EJ1V0AN
92
#define ACCEL_TIME 1 /* Acceleration/deceleration time */
/* constant 10 mSEC */
#define ACCEL_DATA 40 /* Number of acceleration/deceleration */
/* incremental revolutions rpm */
#define WATCH_START 500 /* Speed monitor start time 10 mSEC */
#define ACCEL_VAL_1ST 50 /* Initial acceleration/deceleration */
/* time constant */
#define ACCEL_VAL 3 /* Acceleration/deceleration time */
/* constant */
#define ACCEL_SPD 50 /* Acceleration/deceleration constant */
#define PWM_INIT PWM_DATA/4 /* PWM initial value */
/****************************************************************************** /
/* Function constant */
/****************************************************************************** /
void fcalcu( signed int *wrm, signed int *trm );
void OUT_data( unsigned short reg, unsigned short data );
unsigned short IN_data( int reg );
void led_num( int no, long data ) ;
/****************************************************************************** /
/* Motor-related common area */
/****************************************************************************** /
signed short iua ; /* U-phase current */
signed short iva ; /* V-phase current */
signed int o_iqai ; /* Speed integral value area */
signed int base_position ; /* Speed estimation value reference point */
unsigned int sa_time ; /* Speed measurement value */
unsigned short timer_count ; /* Time wait counter */
unsigned short accel_count ; /* Acceleration/deceleration operation time counter */
unsigned short init_co ; /* Initial interrupt counter */
unsigned char init_pat ; /* Initial pattern counter */
unsigned short init_upco ; /* Initial speed-up counter */
unsigned int int_co ; /* UVW interrupt counter */
signed int di ;
signed int pwm_value ; /* PWM output value */
#pragma section const begin
const unsigned char cw_data[6][2] = { {0x09,0x00},{0x21,0x00},{0x24,0x00},
{0x06,0x00},{0x12,0x00},{0x18,0x00} };
const unsigned char ccw_data[6][2] = { {0x18,0x00},{0x12,0x00},{0x06,0x00},
{0x24,0x00},{0x21,0x00},{0x09,0x00} };
const unsigned char up_data[] = { 255, 242, 229, 217, 206, 195, 185, 176, 166, 158,
158, 158, 158, 158, 158, 158, 158, 158, 158, 158 } ;
const unsigned char run_cw_data[8][2] = { {0x00,0x00},{0x21,0x00},{0x06,0x00},
{0x24,0x00},{0x18,0x00},{0x09,0x00},
{0x12,0x00},{0x00,0x00} };

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the Renesas V850 Series and is the answer not in the manual?

Renesas V850 Series Specifications

General IconGeneral
CoreV850
Architecture32-bit
Operating Voltage2.7V to 5.5V
PackageQFP, LQFP, BGA
Communication InterfacesUART, I2C, SPI, CAN
Operating Temperature-40°C to +85°C

Summary

Introduction to V850 Series Application Note

Target Readers for V850 Series

Identifies users familiar with V850 microcontroller functions designing application systems.

Purpose of the Application Note

Explains controlling brushless DC motors using the 120° sensorless drive excitation method.

Organization of the Document

Details how the application note is structured into various sections for clarity.

How to Use This Manual

Assumes reader has general knowledge in electrical engineering, logic circuits, and microcontrollers.

Cautions for Application Examples

Highlights that examples are for standard quality models and require evaluation for special grade applications.

Chapter 1: Control Method

Outline of Brushless DC Motor Control

Describes the components of a BLDC motor and how its rotation is controlled by magnetic fields and microcontrollers.

Chapter 2: Hardware Configuration

System Configuration Overview

Details the reference system's main functions and how the motor operates upon switch activation.

Circuit Diagram Details

Explains the components of the reference system circuit, including microcontroller, switches, and output blocks.

Chapter 3: Software Configuration

Software Control Block

Illustrates the software control block of the reference system, showing interactions between components.

Peripheral I/O Functions

Lists and describes the peripheral I/O functions utilized within the reference system.

Software Processing Structure

Presents the main processing structure and interrupt processing structure of the software.

Flowchart of Main Processing

Illustrates the main processing flow, including initialization and mode switching logic.

Chapter 4: Program List

Program List for V850E/IA1

Provides the symbol definitions and constant definitions for the V850E/IA1 microcontroller.

Program List for V850E/IA2

Details the symbol definitions and constant definitions applicable to the V850E/IA2 microcontroller.

Program List for V850E/IA3

Lists symbols, constants, and program structures for the V850E/IA3 microcontroller.

Program List for V850E/IA4

Contains symbol definitions, constants, and program details for the V850E/IA4 microcontroller.

Program List for V850E/MA3

Presents symbol definitions, constants, and program listings for the V850E/MA3 microcontroller.