时钟程序求解释
arduino吧
全部回复
仅看楼主
level 9
请教大师,
以下程序是时钟(一个购买来的、四位数码管、60颗LED、带光控亮度和温度显示)的开头部分程序。
从某宝上购买的,最近发觉得时钟的温度显示与实际相差3度,于是联系售后人员,看能不能把这个温度调正。他给我发来这份程序。但我看到程序上面有很多(com.taobao.taobao)的语句。我对单片机不懂,程序也不懂。这些带有com.taobao.taobao语句都是些什么意思?
这个程序总共有1034页,字符3633194个(不计空格)
时钟的功能主要有,60颗LED围成一个圆圈,点亮LED有11种显示方式(选定某种方式后一直循环显示),时间、温度间隔显示;亮度可以光控(可开关);闹钟功能(可开关);
如此庞大的程序正常吗?
{"$DATA/app_ucmsdk":{"files":[{"accessTime":
15523298960
00,"createTime":
15553497470
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/oat/core.jar.prof","fileSize":5226,"modifyTime":
15543154710
00},{"accessTime":
15523298970
00,"createTime":
15523298980
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/oat/arm/sdk_shell.vdex","fileSize":27082,"modifyTime":
15523298980
00},{"accessTime":
15522869740
00,"createTime":
15543154730
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/oat/arm/core.odex","fileSize":917928,"modifyTime":
15522869740
00},{"accessTime":
15522869740
00,"createTime":
15523298980
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/oat/arm/sdk_shell.odex","fileSize":16808,"modifyTime":
15522869740
00},{"accessTime":
15543154710
00,"createTime":
15543154730
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/oat/arm/core.vdex","fileSize":3004240,"modifyTime":
15543154730
00},{"accessTime":
15522869760
00,"createTime":
15547103260
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/oat/core.jar.cur.prof","fileSize":1149,"modifyTime":
15547103260
00},{"accessTime":
15522869750
00,"createTime":
15539516460
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/oat/sdk_shell.jar.cur.prof","fileSize":123,"modifyTime":
15539516460
00},{"accessTime":
15523298970
00,"createTime":
15553497480
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/oat/sdk_shell.jar.prof","fileSize":0,"modifyTime":
15523298970
00},{"accessTime":
15522869740
00,"createTime":
15522869740
00,"external":false,"file":"/data/user/0/com.taobao.taobao/app_ucmsdk/decompresses2/469940639/13593030_312739200000/assets/stored-locales/zh-CN_uc.pak","fileSize":8339,"modifyTime":
15522869740
00}
2019年04月16日 07点04分 1
level 9
‘就是这个东西用的程序
2019年04月16日 07点04分 2
level 9
之前发来的有可能是不对的。再找售后又发过来一份。有18页,1054个字符的档案、
我从开始到第四页的粘出来
char t=0;
int t1;
char ps=0;
char flag=1;
int sudu1=0,sudu2=0;
unsigned int temp[2];
int ld;
extern void init_ds1302_io();
extern void init_ds1302();
extern void read_time();
extern void write_time();
extern void read_nao();
extern uchar miao;
extern uchar fen;
extern uchar shi;
extern uchar nfen;
extern uchar nshi;
void Delayms(uint t)
{
uchar i;
while(t--)
for(i=0;i<100;i++);
}
void display()
{
S12=0;S1=1;
P2=dat1[table[0]];
Delayms(2);
S1=0;S2=1;
if(flag==0)P2=dat2[table[1]];
if(flag==1)P2=dat1[table[1]];
Delayms(2);
S2=0;S3=1;
P2=dat1[table[2]];
Delayms(2);
S3=0;S4=1;
P2=dat1[table[3]];
Delayms(2);
//////////////////////////////////////////////////////
P2=0xff;
S4=0;S5=1;
P2=dat3[t_led0[0]]&dat4[t_led1[0]];
Delayms(2);
P2=0xff;
S5=0;S6=1;
P2=dat3[t_led0[1]]&dat4[t_led1[1]];
Delayms(2);
P2=0xff;
S6=0;S7=1;
P2=dat3[t_led0[2]]&dat4[t_led1[2]];
Delayms(2);
P2=0xff;
S7=0;S8=1;
P2=dat3[t_led0[3]]&dat4[t_led1[3]];
Delayms(2);
P2=0xff;
S8=0;S9=1;
P2=dat3[t_led0[4]]&dat4[t_led1[4]];
Delayms(2);
P2=0xff;
S9=0;S10=1;
P2=dat3[t_led0[5]]&dat4[t_led1[5]];
Delayms(2);
P2=0xff;
S10=0;S11=1;
P2=dat3[t_led0[6]]&dat4[t_led1[6]];
Delayms(2);
P2=0xff;
S11=0;S12=1;
P2=dat3[t_led0[7]]&dat4[t_led1[7]];
Delayms(2);
S1=S2=S3=S4=S5=S6=S7=S8=S9=S10=S11=S12=1;
P2=0xff;
S1=S2=S3=S4=S5=S6=S7=S8=S9=S10=S11=S12=0;
Delayms(2);
}
void init()
{
TMOD= 0x01;
TL0 = (65536-20000)/256; //设置定时初值
TH0 = (65536-20000)%256; //设置定时初值
ET0 = 1;
TR0 = 1;
EA = 1;
2019年04月17日 05点04分 5
level 9
以下这段也许是与温度有关的。看样子是通过计算得出来的数值。
void ADC_convert(void)
{
GetADCResult(0,&temp[0]);
temp[0] = (unsigned int) ( ( 3950.0 / ( 11.33657 + log( 6.04 * (float)temp[0] / ( 1024.0 - (float)temp[0] ) ) ) - 278.15) * 100 );
}
void main()
{
uchar i;
init();
InitADC();
init_ds1302_io();
init_ds1302();
2019年04月17日 05点04分 6
1