1602 ds1302时钟电路问题
时间:10-02
整理:3721RD
点击:
之前是这样 现在修改了的代码如下
#include <REG51.H>
#include <intrins.h>
//#include "LCD1602.h"
//#include "DS1302.h"
#define uint unsigned int
#define uchar unsigned char
sbit DS1302_CLK = P3^4; //实时时钟时钟线引脚
sbit DS1302_IO = P3^3; //实时时钟数据线引脚
sbit DS1302_RST = P3^2; /* //实时时钟复位线引脚
//sbit wireless_1 = P3^0;
//sbit wireless_2 = P3^1;
//sbit wireless_3 = P3^2;
//sbit wireless_4 = P3^3; */
sbit beep= p2^4;
sbit ACC0 = ACC^0;
sbit ACC7 = ACC^7;
char hide_sec,hide_min,hide_hour,hide_day,hide_week,hide_month,hide_year,hide_m,hide_f,hide_h;
sbit Set = P2^0; //模式切换键
sbit Up = P2^1; //加法按钮
sbit Down = P2^2; //减法按钮
sbit out = P2^3; //立刻跳出调整模式按钮
sbit dd=P2^4; // 定时
sbit DQ = P2^3; //温度传送数据IO口
现在的样子
好高深啊,看不懂!