Technical information

CSI to SPI Peripheral Communication in V850ES Microcontrollers
void led_out_right(unsigned char val)
{
PDLH = val;
}
/* void led_out_left(unsigned char val) */
/* output raw data to left LED */
void led_out_left(unsigned char val)
{
PDH = val;
}
/* void led_dp_left(unsigned char on) */
/* turn on or off left DP */
void led_dp_left(unsigned char on)
{
if (on == 0)
PDH = PDH | 0x80; /* set bit 7 high to turn off */
else
PDH = PDH & 0x7f; /* set bit 7 low to turn on */
}
/* void led_dp_right(unsigned char on) */
/* turn on or off right DP */
void led_dp_right(unsigned char on)
{
if (on == 0)
PDLH = PDLH | 0x80; /* set bit 7 high to turn off */
else
PDLH = PDLH & 0x7f; /* set bit 7 low to turn on */
}
/* void led_dig_right(unsigned char num) */
/* display number in right LED */
void led_dig_right(unsigned char num)
{
if (num > 0x0F) {
led_out_right(LED_PAT_BLANK);
return;
}
led_out_right(dig_tab[num]);
}
/* void led_dig_left(unsigned char num) */
/* display number in left LED */
void led_dig_left(unsigned char num)
{
if (num > 0x0F) {
led_out_left(LED_PAT_BLANK);
return;
}
led_out_left(dig_tab[num]);
}
76