我用DS1302写了个时钟,我设置的是12年11月5号21点10分55秒,为什么总是显示11年5月21日10点55分12

daivi20052022-10-04 11:39:541条回答

我用DS1302写了个时钟,我设置的是12年11月5号21点10分55秒,为什么总是显示11年5月21日10点55分12秒?
意思就是所有的数字都前移了,调试了一天了快,程序如下
#include
#include
unsigned char code digit[10]={"0123456789"};
sbit SCLK=P1^0;
sbit DATA=P1^1;
sbit RST=P1^2;
void delayuns(unsigned char n)
{
unsigned char i;
for(i=0;i

已提交,审核后显示!提交回复

共1条回复
nanyprint 共回答了17个问题 | 采纳率88.2%
设置那段不对.
ds1302的写寄存器 0x80 , 0x82 , 0x84 . 0x8c 分别对应 秒 分 时 日 月 星期 年.
1年前

相关推荐

我的stc89c52 的P口不够了日历时钟ds1302的引脚CE可以接入锁存器74ls373(用stc89c52控制)的
我的stc89c52 的P口不够了日历时钟ds1302的引脚CE可以接入锁存器74ls373(用stc89c52控制)的一个引脚吗?
gxpn1年前1
huiheart2 共回答了11个问题 | 采纳率81.8%
片选可以一直接地~
英语翻译本课题使用51单片机,DS1302时钟芯片,DS18B20温度芯片,LCD显示模块构成一个多功能电子日子,具有年
英语翻译
本课题使用51单片机,DS1302时钟芯片,DS18B20温度芯片,LCD显示模块构成一个多功能电子日子,具有年、月、日、星期、时、分、秒等功能,具有温度计功能,具备年、月、日、星期、时、分、秒校准功能.
淡若移情1年前3
aplo水 共回答了19个问题 | 采纳率84.2%
This project is to use 51 Single-Chip Microcomputer,DS1302 clock CMOS chip,DS18B20 temperature CMOS chip and LCD display module to make a multifunctional electronic calendar.It will have the following 3 functions:the 1st function is to display time,including Year,Month,Day,Week,Hour,Minute and Second; The 2nd one is to be a thermometer;The last one is the calibration of Year,Month,Day,Week,Hour,Minute and Second.