Download 78K0R/LH3 Sample Program(Sound Output) Playing Back Sound
Transcript
APPENDIX
A
PROGRAM
LIST
/*|||| : 0 0 1 1 : VLVI3 (3.76 V) */
/*|||| : 0 1 0 0 : VLVI4 (3.61 V) */
/*|||| : 0 1 0 1 : VLVI5 (3.45 V) */
/*|||| : 0 1 1 0 : VLVI6 (3.30 V) */
/*|||| : 0 1 1 1 : VLVI7 (3.15 V) */
/*|||| : 1 0 0 0 : VLVI8 (2.99 V) */
/*|||| : 1 0 0 1 : VLVI9 (2.84 V) */
/*|||| : 1 0 1 0 : VLVI10 (2.68 V) */
/*|||| : 1 0 1 1 : VLVI11 (2.53 V) */
/*|||| : 1 1 0 0 : VLVI12 (2.38 V) */
/*|||| : 1 1 0 1 : VLVI13 (2.22 V) */
/*|||| : 1 1 1 0 : VLVI14 (2.07 V) */
/*|||| : 1 1 1 1 : VLVI15 (1.91 V) */
/*|||| */
/*++++------- : Be sure to set 0000 */
LVIMD
= 0;
/* Generates an internal interrupt signal when detect the low-voltage */
LVION
= 1;
/* Enables low-voltage detection operation */
/* Software to wait for the operation stabilization time (over 10 us) */
for(ucCounter = 0; ucCounter < 4; ucCounter++){
NOP();
}
/* Wait for VDD to become VLVI or more */
while(LVIF){
NOP();
}
LVION
= 0;
/* Disables low-voltage detection operation */
}
/*---------------------------------------------------------------*/
/* Module:
fn_InitKr
*/
/* Description:Setting of Key Interrupt Function
*/
/*
parameter: --
*/
/*
return
*/
: --
/*---------------------------------------------------------------*/
static
void
fn_InitKr(void)
{
KRMK = 1; /* Disable key interrupt */
88
Application Note U20028EJ1V0AN