#include #define uchar unsigned char#define uint unsigned intsbit AB =P1^0;sbit CLK=P1^1;sbit RET=P1^2;//延时函数void mDelay(uchar Delay){ // 延时子程序 uchar i; while(Delay--) { fo
/**************************文件所用资源1.端口:P0.0,P0.12.调用delay_ms函数**************************/#define TIME1#define display_TIME1000sbit CS=P1^0;//片选sbit SCLK=P0^0;//时钟sbit STD=P0^1;//数据//
#include "D:\\reg51.h " //头文件#define uchar unsigned charuchar settime[]={1,2,3,4,5,6,7};uchar readtime[7];//*********************************************************************sbit T_CLK = P1^1; //
#include //#include //#include #include #define uchar unsigned char#define uint unsigned intsbit led=P1^0;sbit led2=P1^1;sbit SCL=P3^5; //24c02 SCLsbit SDA=P3^4; //24c02 SDA//sbit DOG=P1^7; //狗uchar
/**************************文件所用资源1.外部中断02.端口:P3.3、P3.4**************************/sbit PS2_DAT=P3^7;//数据uchar code unshifted[][2]=//shift键没按下译码表{ 0x0e,'`', 0x15,'q
修改后的头文件reg51.h内容:/*--------------------------------------------------------------------------REG51.HHeader file for generic 80C51 and 80C31 microcontroller.Copyright (c) 1988-2002 Keil Elek
#include"reg52.h"#defineucharunsignedcharsbitHC595_CS=P1^0;//STcp////锁存时钟-----74HC59512#sbitHC595_CLK=P1^1;//SHcp////移位时钟-----74HC59511#sbitHC595_DAT=P1^2;//Ds////数据---------74HC59514#//延时