k0r_main.c

来自「NEC单片机的一些参考源码」· C语言 代码 · 共 68 行

C
68
字号
/****************************************************************************************************************
;														
;    NNNNNN          NN  EEEEEEEEEEEEEEEEEE     CCCCCCCCCCCCCCC							
;    NNNNNNNN        NN  EEEEEE               CCCCCC           							
;    NNNNNNNNNN      NN  EEEEEE              CCCCCC            							
;    NN  NNNNNNNN    NN  EEEEEEEEEEEEEEEEE   CCCCCC            							
;    NN    NNNNNNNN  NN  EEEEEE              CCCCCC            							
;    NN      NNNNNNNNNN  EEEEEE               CCCCCC          							
;    NN          NNNNNN    EEEEEEEEEEEEEEEE     CCCCCCCCCCCCCCC							
;														
;    NEC Electronics	78K0R/Kx3 Series									
;丂丂														
;亂License Agreement亃
;. This sample program is subject to change without notice.
;
;. NEC Electronics does not assume any liability for infringement of patents, copyrights or other intellectual
;  property rights of third parties by or arising from the use of this sample program. No license, express,
;  implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of
;  NEC Electronics or others.
;
;. Descriptions of commands, program, and other related information in this sample program are provided for
;  illustrative purposes in semiconductor product operation and application examples. The incorporation of
;  this sample program in the design of a customer's equipment shall be done under the full responsibility of
;  the customer. NEC Electronics assumes no responsibility for any losses incurred by customers or third parties
;  arising from the use of this sample program.
;
;丂Please use this sample program under the agreement listed above.
;
;***************************************************************************************************************
;	78K0R/Kx3 Series	sample program								
;***************************************************************************************************************
;	A/D Converter (main program)
;***************************************************************************************************************
; [History]
;	2007.07 new
;***************************************************************************************************************/

/***************************************************************************
*	Title:	main program
***************************************************************************/
#include	"K0R_def.h"
#include	"K0R_ext.h"

extern	void main(void);

/***************************************************************************
*	Title:	main program
****************************************************************************
*	Module:	void main(void)
*	Arg:
*	Ret:
***************************************************************************/
void main(void)
{

	EI();				/* enables interrupt */

	SAD_INIT();			/* A/D converter initial setting */

	SAD_CHAN();			/* channel change (ANI14 --> ANI15) */

	SAD_STOP();			/* A/D conversion operation stop */

	while(1){
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?