Rebuild target 'Target 1'
compiling 带日历时钟及温度显示的电子万年历.c...
compiling DS1302.c...
compiling TC72.c...
linking...
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: CURRDATETIME
MODULE: 带日历时钟及温度显示的电子万年历.obj (________________________________)
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: INIT_DS1302
MODULE: 带日历时钟及温度显示的电子万年历.obj (________________________________)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: INIT_DS1302
MODULE: 带日历时钟及温度显示的电子万年历.obj (________________________________)
ADDRESS: 11E3H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: CURRDATETIME
MODULE: 带日历时钟及温度显示的电子万年历.obj (________________________________)
ADDRESS: 11E9H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: CURRDATETIME
MODULE: 带日历时钟及温度显示的电子万年历.obj (________________________________)
ADDRESS: 11F0H
//
#include<reg51.h>
#include<intrins.h>
#include<stdio.h>
#include<string.h>
#define INT8U unsigned char
#define INT16U unsigned int
const INT8U SEG_CODE[]=//
{0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xC6,0x9C,0xFF,0xBF};
extern INT8U DateTime[7];
sbit DS=P3^0;
sbit SH_CP=P3^1;
sbit ST_CP=P3^2;
extern void Init_DS1302();
extern void GetDateTime();
extern void SetDateTime();
extern INT8U CurrDateTime[];
extern void Config_TC72();
extern float Read_TC72_Temperature();
//
INT8U disp_buff[21]={2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,10};
//
//
//
void delay_ms(INT16U x){ INT8U t; while(x--)for(t=0;t<120;t++);}
//
//
//
void Serial_Input_595(INT8U d)
{
INT8U i;
for(i=0;i<8;i++)
{ d<<=1;DS=CY;
SH_CP=0; _nop_();_nop_();
SH_CP=1; _nop_();_nop_();
}
SH_CP=0;
}
//
//
//
void Parallel_Output_595()
{
SH_CP=0; _nop_();_nop_();
SH_CP=1; _nop_();_nop_();
SH_CP=0; _nop_();_nop_();
}
//
//
//
void main()
{
INT8U i,j,len;char t_buff[6],c; INT8U curr_second=0xFF;
TMOD=0x01;
TH0=(INT16U)(-11.0592/12*50000)>>8;
TL0=(INT16U)(-11.0592/12*50000)&0xFF;
IE=0x82;
Init_DS1302();
while(1)
{ //
GetDateTime();
//
disp_buff[2]=CurrDateTime[6]>>4;
disp_buff[3]=CurrDateTime[6]&0x0F;
disp_buff[4]=CurrDateTime[4]>>4;
disp_buff[5]=CurrDateTime[4]&0x0F;
disp_buff[6]=CurrDateTime[3]>>4;
disp_buff[7]=CurrDateTime[3]&0x0F;
disp_buff[8]=CurrDateTime[2]>>4;
disp_buff[9]=CurrDateTime[2]&0x0F;
disp_buff[10]=CurrDateTime[1]>>4;
disp_buff[11]=CurrDateTime[1]&0x0F;
disp_buff[12]=CurrDateTime[0]>>4;
disp_buff[13]=CurrDateTime[0]&0x0F;
disp_buff[14]=CurrDateTime[5] - 1;
|