main.c

来自「本程序已经调试通过」· C语言 代码 · 共 42 行

C
42
字号
#if defined(__dsPIC33F__)
#include "p33fxxxx.h"
#endif
#include "i2c.h"
#include "icoc.h"
#include "rx8583.h"

_FOSCSEL(FNOSC_PRIPLL);
_FOSC(FCKSM_CSDCMD & POSCMD_HS);     
_FWDT(FWDTEN_OFF); // Watchdog Timer Enabled/disabled by user software

int main(void)
{
	unsigned int i;
	PLLFBD=38;					/* M=40 */
	CLKDIVbits.PLLPOST=0;		/* N1=2 */
	CLKDIVbits.PLLPRE=0;		/* N2=2 */
	
// Enable Watch Dog Timer	
	RCONbits.SWDTEN=1;
	
// Peripheral Initialisation
	InitCPU();
	InitI2C();
	InitRX8583();
	
	while(1)
	{
		ClrWdt();		

	 	i++;
	 	if(i>=50000)
	 	{
			i=0;
			ReadTime();//读时钟
	 	}
	}
	return 0;
}


⌨️ 快捷键说明

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