⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 k0r_main.c

📁 nec单片机一个样例程序
💻 C
字号:
/****************************************************************************************************************
;														
;    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								
;***************************************************************************************************************
;	Interval timer/Square wave output(TIMER ARRAY UNIT) "Main Program"
;***************************************************************************************************************
; [History]
;	2007.07
;	     12 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)
{
	STM_IINI();					/* Initial Setting */
	STM_ISTT();					/* Operation Start */

	/* main loop */
	while(1){
		WDTE = 0xac;			/* watchdog timer counter clears and restarts */
		NOP();
		if(TMIF02 == 1){
			TMIF02 = 0;
			NOP();
			NOP();
			NOP();
		}
	}

}

⌨️ 快捷键说明

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