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 #99 background imageLoading...
Page #99 background image
CHAPTER 4 PROGRAM LIST
Application Note U17209EJ1V0AN
102
OUT_data( LED42, ~0xda ) ;
} else {
OUT_data( LED41, ~0x9e ) ; /* E3 display */
OUT_data( LED42, ~0xf2 ) ;
}
timer_count = 50 ;
while( timer_count ) ;
}
}
}
}
4.2.6 LED display function
/****************************************************************************** /
/* LED value display subroutine */
/* no : Display area number (1 to 4) */
/* data : Display data (0 to 99) */
/****************************************************************************** /
void led_num( int no, long data )
{
if ( no == 1 ) {
data = data % 10000;
OUT_data( LED11, ~led_pat[data/1000]&0xff ) ;
OUT_data( LED12, ~led_pat[(data%1000)/100]&0xff ) ;
OUT_data( LED13, ~led_pat[(data%100)/10]&0xff ) ;
OUT_data( LED14, ~led_pat[data%10]&0xff ) ;
} else if ( no == 2 ) {
OUT_data( LED21, ~led_pat[(data%100)/10]&0xff ) ;
OUT_data( LED22, ~led_pat[data%10]&0xff ) ;
} else if ( no == 3 ) {
OUT_data( LED31, ~led_pat[(data%100)/10]&0xff ) ;
OUT_data( LED32, ~led_pat[data%10]&0xff ) ;
} else {
OUT_data( LED41, ~led_pat[(data%100)/10]&0xff ) ;
OUT_data( LED42, ~led_pat[data%10]&0xff ) ;
}
}
/****************************************************************************** /
/* External I/O output subroutine */
/* reg : Output register number */
/* data : Output data */
/****************************************************************************** /
void OUT_data( unsigned short reg, unsigned short data )
{
if ( reg == WRESET ) {
P3.0 = 0;
data = 1; /* Dummy step */

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