EasyManuals 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 #108 background imageLoading...
Page #108 background image
CHAPTER 4 PROGRAM LIST
Application Note U17209EJ1V0AN
111
PM4 = 0xf7 ;
PMDL = 0x0000 ;
OUT_data( LED11, 0xff ) ; /* LED OFF */
OUT_data( LED12, 0xff ) ;
OUT_data( LED13, 0xff ) ;
OUT_data( LED14, 0xff ) ;
OUT_data( LED21, 0xff ) ;
OUT_data( LED22, 0xff ) ;
OUT_data( LED31, 0xff ) ;
OUT_data( LED32, 0xff ) ;
OUT_data( LED41, 0xff ) ;
OUT_data( LED42, 0xff ) ;
/* Set 10 mSEC timer TM2 */
STOPTE0 = 0x0000;
PRM02 = 0x01; /* Select fXX/2 */
CSE0 = 0x0028; /* Select fCLK/64 (3.2 uSEC) */
TCRE0 = 0x2000; /* Start timer */
CVSE50 = 1562*2 ; /* 10 mSEC */
CMSE050 = 0x2400;
CC2IC5 = 0x06;
/* Set motor control interrupt timer TM3 */
PRM03 = 1 ; /* fCLK = fXX */
TMC30 = 0x51; /* fXX = 4MHz*10/64(1.6 uSEC) */
TMC31 = 0x09 ;
CC30 = TS * 10 / 16 ; /* TS uSEC interval */
TMC30 = 0x53; /* Start timer */
CC3IC0 = 0x02; /* Reset interrupt mask */
/* Set speed measuring timer TM4 */
TMC4 = 0x61; /* fXX(4 MHz*10/2)/128(6.4 uSEC) */
CM4 = 0xffff;
TMC4 = 0x63; /* TM4 start */
/* TM0 initialization */
PRM01 = 0 ; /* fCLK = fXX/2 */
SPEC0 = 0x0000 ;
TOMR0 = 0x80 ; /* Set output mode */
PSTO0 = 0x00 ; /* Disable real-time output */
BFCM00 = PWM_DATA /2 ; /* Set duty to 50 */
BFCM01 = PWM_DATA /2 ; /* Set duty to 50 */
BFCM02 = PWM_DATA /2 ; /* Set duty to 50 */
BFCM03 = PWM_DATA ; /* Set PWM cycle */
DTRR0 = 40*3 ; /* Dead time 6 uSEC */
POER0 = 0x3f ; /* All phases active */
TMC00 = 0x8018 ; /* Start TMPWM timer */
/* Set A/D */
ADSCM00 = 0x0001 ;
ADSCM10 = 0x0000 ;
ADIC0 = 0x03 ;

Table of Contents

Questions and Answers:

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
BrandRenesas
ModelV850 Series
CategoryInverter
LanguageEnglish