Technical information
SCI to SPI Peripheral Communication in V850ES Microcontrollers
/* if we have counted down to zero, we have seen the same sw_new */
/* for debounce count times, it is now the debounced switch value */
if (sw_deb_count == 0) {
sw_last = val;
sw_deb_count = sw_deb_value;
return;
}
/* if still debouncing, just return */
return;
}
4.1.15 Led_vkj1.h
/* led_vkj1.h */
/* header for M-V850ES-KJ1 CPU board for LED digit display */
/* Version 1.1 05-08-2006
*/
#ifndef _LED_VKJ1_H
#define _LED_VKJ1_H
/*********************************************************************/
/* Define definitions */
/*********************************************************************/
/* LED Patterns for decimal and hex digits, characters */
/* for individual bits, ---A--- */
/* 0=on 1=off | | */
/* bit 0 = segment A F B */
/* bit 1 = segment B | | */
/* bit 2 = segment C ---G--- */
/* bit 3 = segment D | | */
/* bit 4 = segment E E C */
/* bit 5 = segment F | | */
/* bit 6 = segment G ---D--- DP */
/* bit 7 = decimal point */
#define LED_PAT_0 0xC0
#define LED_PAT_1 0xF9
#define LED_PAT_2 0xA4
#define LED_PAT_3 0xB0
#define LED_PAT_4 0x99
#define LED_PAT_5 0x92
#define LED_PAT_6 0x82
#define LED_PAT_7 0xF8
#define LED_PAT_8 0x80
#define LED_PAT_9 0x98
#define LED_PAT_A 0x88
#define LED_PAT_B 0x83
#define LED_PAT_C 0xC6
#define LED_PAT_D 0xA1
#define LED_PAT_E 0x86
#define LED_PAT_F 0x8E
73