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

📄 main.c

📁 使用台湾普诚pt6961驱动数码管和按键,显示ds1302的源码,详细的6961驱动代码
💻 C
字号:

#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -