EasyManua.ls Logo

Renesas V850 Series - Page 174

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
Loading...
CHAPTER 4 PROGRAM LIST
Application Note U17209EJ1V0AN
177
}
break ;
}
if ( ( proc_no == 2 ) || ( proc_no == 5 ) ) {
if ( timer_count == 0 ) {
if ( abs( object_speed - now_speed ) > SA_SPEED_MAX ) {
error_flag = ERR_NO2 ; /* Set error No. */
}
}
}
if ( disp_co == 0 ) {
led_num(1, d_speed / 100 ); /* Number of revolutions */
d_speed = 0 ;
disp_co = 100 ;
if ( abs(now_speed) == 0 ) {
disp_co = 0;
}
led_num(2, 1000/PWM_TS ); /* Carrier frequency */
led_num(3, cont_time ); /* Overall processing time */
led_num(4, cont_time1 ); /* Vector operation processing time */
}
if ( error_flag ) {
while( 1 ) {
OUT_data( LED41, ~0x00 ) ; /* LED display off */
OUT_data( LED42, ~0x00 ) ;
timer_count = 50 ;
while( timer_count ) ;
if ( error_flag == ERR_NO1 ) {
OUT_data( LED41, ~0x9e ) ; /* E1 display */
OUT_data( LED42, ~0x60 ) ;
} else if ( error_flag == ERR_NO2 ) {
OUT_data( LED41, ~0x9e ) ; /* E2 display */
OUT_data( LED42, ~0xda ) ;
} else {
OUT_data( LED41, ~0x9e ) ; /* E3 display */
OUT_data( LED42, ~0xf2 ) ;
}
timer_count = 50 ;
while( timer_count ) ;
}
}
}
}

Table of Contents