微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > MCU和单片机设计讨论 > ds12c887死活读不出来,秒也不行

ds12c887死活读不出来,秒也不行

时间:10-02 整理:3721RD 点击:
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit lcden=P3^4;
sbit lcdrs=P3^5;
sbit dula=P2^6;
sbit wela=P2^7;
sbit rd=P3^7;
sbit dsds=P1^7;
sbit dsrw=P1^6;
sbit dsas=P1^5;
sbit dscs=P1^4;
sbit dsirq=P3^3;

bit flag1,flag_ri;
uchar count,s1num,flag,t0_num,x,y;
char miao,shi,fen,year,month,day,week,amiao,afen,ashi;
uchar num,flag_ds,flag_c,i,a;
uchar miao1,miao2,fen1,fen2,shi1,shi2;
uchar code table[]={
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71};

void write_ds(uchar add,uchar date);
void set_time();

void init()
{

这个芯片正要画板试试,不知群主解决了没后续可以一起讨论下

读出来了,,,,,,,,,,,,,,,,,

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top