一个用51单片机编写DS1302的程序,用1602显示,刚用DS1302,不知道为什么连初始化都不行,就只是显示0
#include<reg52.h>#defineucharunsignedchar#defineuintunsignedint#defineWRITE_SECOND0x8...
#include<reg52.h> #define uchar unsigned char #define uint unsigned int #define WRITE_SECOND 0x80 #define WRITE_MINUTE 0x82 #define WRITE_HOUR 0x84 #define READ_SECOND 0x81 #define READ_MINUTE 0x83 #define READ_HOUR 0x85 #define WRITE_PROTECT 0x8E//寄存器宏定义 sbit lcden=P2^6; sbit rw=P2^5; sbit lcdrs=P2^4; //sbit key1=P3^0; //sbit key2=P2^1; sbit led1=P1^1; sbit key1=P1^3; sbit key2=P1^4; sbit
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询