main.c

来自「使用台湾普诚pt6961驱动数码管和按键,显示ds1302的源码,详细的6961」· C语言 代码 · 共 82 行

C
82
字号

#include <intrins.h> 
#include <sm5964.h>
#include "UART.h"
#include "T0.h"
#include "my_type.h"
#include "1302.h"
#include "6961.h"
#include "debug.h"

//extern uint8 read_rtc_code[7];

/***********************************************************************/     

sbit	SPK = P4^0;

bit		debug=0;

/***********************************************************************/
void main(void)
{


 
	InitUART();

	//Init_1302();

	//InitT0();	

	EA=1;

	//Set_6961();

	//debug=1;

	if(debug)
	{
		try();	
	}

	while(1)
	{  	
		uint8 i,j ;
		
		i=Key_value();
		//i=Read_key_6961();

		if(i)
		{
			UartPutChar(i);			
		}

		j=i=0x00;
		
		 /*
		dsplay_dat[0]=A_DSP;
		dsplay_dat[1]=B_DSP;
		dsplay_dat[2]=C_DSP;
		dsplay_dat[3]=D_DSP;
		dsplay_dat[4]=E_DSP;
		dsplay_dat[5]=F_DSP;

		dsplay_dot[0]=1;
		dsplay_dot[1]=1;
		dsplay_dot[2]=1;
		dsplay_dot[3]=1;
		dsplay_dot[4]=1;
		dsplay_dot[5]=1;

		Dsplay();	*/
		/*j=i;
		Read_RTC();
		i=read_rtc_code[0];//Read_1302(0x81);//
		if(j!=i)
		{
			UartPutChar(read_rtc_code[0]);		
		}
		*/
	}	   
}

⌨️ 快捷键说明

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