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 #132 background imageLoading...
Page #132 background image
CHAPTER 4 PROGRAM LIST
Application Note U17209EJ1V0AN
135
4.3.9 10 mSEC interval interrupt processing function
/****************************************************************************** /
/* Other timer interrupt processing (10 mSEC interval) */
/****************************************************************************** /
_ _multi_interrupt
void int_ETC(void)
{
/* Wait timer processing */
if ( timer_count != 0 ) {
timer_count -= 1 ;
}
/* Acceleration/deceleration timer processing */
if ( accel_count != 0 ) {
accel_count -= 1 ;
}
/* */
if ( disp_co != 0 ) {
d_speed += abs( now_speed ) ;
disp_co -= 1 ;
}
}
4.3.10 A/D converter interrupt processing function
/****************************************************************************** /
/* A/D converter interrupt processing for current */
/****************************************************************************** /
_ _multi_interrupt
void int_AD0(void)
{
iua = (( ( ADA0CR0 >> 6 ) & 0x3ff ) - 0x200) ;
if ( abs(iua) > MAX_I ) {
HZA0CTL0 |= 0x08 ; /* PWM output off */
error_flag = ERR_NO1 ; /* Set error No. */
}
volume = 1023 - ( ( ADA0CR1 >> 6 ) & 0x3ff ) ; /* Set volume value */
Motor_CONT() ;
cont_time = TP1CNT; /* Convert to uSEC */
}
/****************************************************************************** /
/* A/D converter interrupt processing for volume */
/****************************************************************************** /
_ _interrupt
void int_AD1(void)
{
iva = (( ADA1CR0 & 0x3ff ) - 0x200) ;
if ( abs(iva) > MAX_I ) {

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