20181016. Specification code

修改:     clock/c/Listings/STARTUP.lst
	修改:     clock/c/Listings/clock.lst
	修改:     clock/c/Listings/clock.m51
	修改:     clock/c/Objects/STARTUP.obj
	修改:     clock/c/Objects/clock
	修改:     clock/c/Objects/clock.build_log.htm
	修改:     clock/c/Objects/clock.hex
	修改:     clock/c/Objects/clock.obj
	修改:     clock/c/clock.c
	新文件:   clock/c/clock.uvgui.niuyuling
	修改:     clock/c/clock.uvopt
	修改:     clock/c/clock.uvproj
	新文件:   clock/circuit/Last Loaded clock.pdsbak
	修改:     clock/circuit/clock.pdsprj
	新文件:   clock/circuit/clock.pdsprj.WIN-NVEVIKI73LC.niuyuling.workspace
This commit is contained in:
aixiao 2018-10-16 06:29:38 +00:00
parent 726486111d
commit 330880dd86
15 changed files with 2330 additions and 378 deletions

View File

@ -1,4 +1,4 @@
A51 MACRO ASSEMBLER STARTUP 05/23/2018 00:05:56 PAGE 1
A51 MACRO ASSEMBLER STARTUP 10/13/2018 20:41:27 PAGE 1
MACRO ASSEMBLER A51 V8.2.7.0
@ -65,7 +65,7 @@ LOC OBJ LINE SOURCE
55 ;
56 ; <h> Stack Space for reentrant functions in the SMALL model.
57 ; <q> IBPSTACK: Enable SMALL model reentrant stack
A51 MACRO ASSEMBLER STARTUP 05/23/2018 00:05:56 PAGE 2
A51 MACRO ASSEMBLER STARTUP 10/13/2018 20:41:27 PAGE 2
58 ; <i> Stack space for reentrant functions in the SMALL model.
0000 59 IBPSTACK EQU 0 ; set to 1 if small reentrant is used.
@ -133,7 +133,7 @@ LOC OBJ LINE SOURCE
121
122 EXTRN CODE (?C_START)
123 PUBLIC ?C_STARTUP
A51 MACRO ASSEMBLER STARTUP 05/23/2018 00:05:56 PAGE 3
A51 MACRO ASSEMBLER STARTUP 10/13/2018 20:41:27 PAGE 3
124
---- 125 CSEG AT 0
@ -201,7 +201,7 @@ LOC OBJ LINE SOURCE
187 ; This code is required if you use L51_BANK.A51 with Banking Mode 4
188 ;<h> Code Banking
189 ; <q> Select Bank 0 for L51_BANK.A51 Mode 4
A51 MACRO ASSEMBLER STARTUP 05/23/2018 00:05:56 PAGE 4
A51 MACRO ASSEMBLER STARTUP 10/13/2018 20:41:27 PAGE 4
190
@ -212,7 +212,7 @@ LOC OBJ LINE SOURCE
0009 020000 F 196 LJMP ?C_START
197
198 END
A51 MACRO ASSEMBLER STARTUP 05/23/2018 00:05:56 PAGE 5
A51 MACRO ASSEMBLER STARTUP 10/13/2018 20:41:27 PAGE 5
SYMBOL TABLE LISTING
------ ----- -------

View File

@ -1,4 +1,4 @@
C51 COMPILER V9.59.0.0 CLOCK 05/23/2018 00:05:56 PAGE 1
C51 COMPILER V9.59.0.0 CLOCK 10/13/2018 20:41:27 PAGE 1
C51 COMPILER V9.59.0.0, COMPILATION OF MODULE CLOCK
@ -11,134 +11,143 @@ line level source
1 #include <AT89X51.H>
2 #define uint unsigned int
3 #define uchar unsigned char
4 sbit led1=P1^0;
4
5 sbit k1=P1^1;
6 sbit k2=P1^2;
7 sbit k3=P1^3;
8 sbit k4=P1^4;
9 sbit k5=P1^5;
10
11 void xiaoai();
12 uchar code duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
13 uchar code wei[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
14 uint miao,fen,xiaoshi,ge,shi,bai,qian,wan,shiwan,t;
15
16 void times(uint z)
17 {
18 1 uint i,j;
19 1 for(i=0; i<z; i++)
20 1 for(j=0; j<121; j++);
21 1 }
22
23 void xiaoai()
24 {
25 1 ge=miao%10;
26 1 shi=miao/10;
27 1 bai=fen%10;
28 1 qian=fen/10;
29 1 wan=xiaoshi%10;
30 1 shiwan=xiaoshi/10;
31 1
32 1 P0=duan[ge];
33 1 P2=wei[7];
34 1 times(1);
35 1 P2=0xff;
36 1
37 1 P0=duan[shi];
38 1 P2=wei[6];
39 1 times(1);
40 1 P2=0xff;
41 1
42 1 P0=duan[bai];
43 1 P2=wei[5];
44 1 times(1);
45 1 P2=0xff;
46 1
47 1 P0=duan[qian];
48 1 P2=wei[4];
49 1 times(1);
50 1 P2=0xff;
51 1
52 1 P0=duan[wan];
53 1 P2=wei[3];
54 1 times(1);
C51 COMPILER V9.59.0.0 CLOCK 05/23/2018 00:05:56 PAGE 2
10 sbit k6=P1^6;
11
12 void display();
13 uchar code duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
14 uchar code wei[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
15 uint second, minute, hour, one, ten, hundred, thousand, tthousand, oht, t;
16
17 void times(uint z)
18 {
19 1 uint i,j;
20 1 for(i=0; i<z; i++)
21 1 for(j=0; j<121; j++);
22 1 }
23
24 void display()
25 {
26 1 one=second%10;
27 1 ten=second/10;
28 1 hundred=minute%10;
29 1 thousand=minute/10;
30 1 tthousand=hour%10;
31 1 oht=hour/10;
32 1
33 1 P0=duan[one];
34 1 P2=wei[7];
35 1 times(1);
36 1 P2=0xff;
37 1
38 1 P0=duan[ten];
39 1 P2=wei[6];
40 1 times(1);
41 1 P2=0xff;
42 1
43 1 P0=duan[hundred];
44 1 P2=wei[5];
45 1 times(1);
46 1 P2=0xff;
47 1
48 1 P0=duan[thousand];
49 1 P2=wei[4];
50 1 times(1);
51 1 P2=0xff;
52 1
53 1 P0=duan[tthousand];
54 1 P2=wei[3];
C51 COMPILER V9.59.0.0 CLOCK 10/13/2018 20:41:27 PAGE 2
55 1 P2=0xff;
56 1
57 1 P0=duan[shiwan];
58 1 P2=wei[2];
59 1 times(1);
60 1 P2=0xff;
61 1 }
62
63 void main()
64 {
65 1 EA=1;
66 1 TMOD=0x01;
67 1 ET0=1;
68 1 TH0=(65535-50000)/256;
69 1 TL0=(65535-50000)%256;
70 1
71 1 while(1)
72 1 {
73 2 xiaoai();
74 2
75 2 if(k1==0)
76 2 TR0=1;
77 2 else if(k2==0)
78 2 TR0=0;
79 2 else if(k3==0) {
80 3 miao=0;
81 3 fen=0;
82 3 xiaoshi=0;
83 3 }
84 2 else if(TR0==0&&k4==0)
85 2 {
86 3 fen=fen+1;
87 3 while(!k4) {
88 4 xiaoai();
89 4 }
90 3 }
91 2 else if(TR0==0&&k5==0) {
92 3 xiaoshi=xiaoshi+1;
93 3 while(!k5) {
94 4 xiaoai();
95 4 }
96 3 }
97 2
98 2
99 2 if(t==20){
100 3 t=0;
101 3 miao=miao+1;
102 3 }
103 2 else if(miao==60) {
104 3 miao=0;
105 3 fen=fen+1;
106 3 }
107 2 else if(fen==60) {
108 3 fen=0;
109 3 xiaoshi=xiaoshi+1;
110 3 }
111 2 else if(xiaoshi==24)
112 2 xiaoshi=0;
113 2
114 2 xiaoai();
115 2 }
116 1 }
C51 COMPILER V9.59.0.0 CLOCK 05/23/2018 00:05:56 PAGE 3
55 1 times(1);
56 1 P2=0xff;
57 1
58 1 P0=duan[oht];
59 1 P2=wei[2];
60 1 times(1);
61 1 P2=0xff;
62 1 }
63
64 void main()
65 {
66 1 TR0=1;
67 1 EA=1;
68 1 TMOD=0x01;
69 1 ET0=1;
70 1 TH0=(65535-50000)/256;
71 1 TL0=(65535-50000)%256;
72 1
73 1 while(1)
74 1 {
75 2 display();
76 2
77 2 if(k1==0)
78 2 TR0=1;
79 2 else if(k2==0)
80 2 TR0=0;
81 2 else if(k3==0) {
82 3 second=0;
83 3 minute=0;
84 3 hour=0;
85 3 }
86 2 else if(TR0==0 && k4==0)
87 2 {
88 3 second=second+1;
89 3 while(!k4) {
90 4 display();
91 4 }
92 3 }
93 2 else if(TR0==0 && k5==0) {
94 3 minute=minute+1;
95 3 while(!k5) {
96 4 display();
97 4 }
98 3 }
99 2 else if(TR0==0 && k6==0) {
100 3 hour=hour+1;
101 3 while(!k6) {
102 4 display();
103 4 }
104 3 }
105 2
106 2
107 2 if(t==20){
108 3 t=0;
109 3 second=second+1;
110 3 }
111 2 else if(second==60) {
112 3 second=0;
113 3 minute=minute+1;
114 3 }
115 2 else if(minute==60) {
116 3 minute=0;
C51 COMPILER V9.59.0.0 CLOCK 10/13/2018 20:41:27 PAGE 3
117
118 void int0() interrupt 1
119 {
120 1 t++;
121 1 TH0=(65535-50000)/256;
122 1 TL0=(65535-50000)%256;
123 1 }
117 3 hour=hour+1;
118 3 }
119 2 else if(hour==24) {
120 3 hour=0;
121 3 }
122 2
123 2 display();
124 2 }
125 1 }
126
127 void int0() interrupt 1
128 {
129 1 t++;
130 1 TH0=(65535-50000)/256;
131 1 TL0=(65535-50000)%256;
132 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 480 ----
CODE SIZE = 504 ----
CONSTANT SIZE = 24 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----

View File

@ -1,4 +1,4 @@
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/23/2018 00:05:56 PAGE 1
BL51 BANKED LINKER/LOCATER V6.22.2.0 10/13/2018 20:41:27 PAGE 1
BL51 BANKED LINKER/LOCATER V6.22.2.0, INVOKED BY:
@ -29,14 +29,13 @@ LINK MAP OF MODULE: .\Objects\clock (?C_STARTUP)
CODE 0000H 0003H ABSOLUTE
0003H 0008H *** GAP ***
CODE 000BH 0003H ABSOLUTE
000EH 07F2H *** GAP ***
CODE 0800H 00F9H UNIT ?PR?XIAOAI?CLOCK
CODE 08F9H 00B0H UNIT ?PR?MAIN?CLOCK
CODE 09A9H 0055H UNIT ?C?LIB_CODE
CODE 09FEH 0024H UNIT ?PR?_TIMES?CLOCK
CODE 0A22H 0018H UNIT ?CO?CLOCK
CODE 0A3AH 0013H UNIT ?PR?INT0?CLOCK
CODE 0A4DH 000CH UNIT ?C_C51STARTUP
CODE 000EH 00F9H UNIT ?PR?DISPLAY?CLOCK
CODE 0107H 00C8H UNIT ?PR?MAIN?CLOCK
CODE 01CFH 0055H UNIT ?C?LIB_CODE
CODE 0224H 0024H UNIT ?PR?_TIMES?CLOCK
CODE 0248H 0018H UNIT ?CO?CLOCK
CODE 0260H 0013H UNIT ?PR?INT0?CLOCK
CODE 0273H 000CH UNIT ?C_C51STARTUP
@ -50,24 +49,24 @@ SEGMENT
+--> ?PR?MAIN?CLOCK
?PR?MAIN?CLOCK
+--> ?PR?XIAOAI?CLOCK
+--> ?PR?DISPLAY?CLOCK
?PR?XIAOAI?CLOCK
?PR?DISPLAY?CLOCK
+--> ?CO?CLOCK
+--> ?PR?_TIMES?CLOCK
SYMBOL TABLE OF MODULE: .\Objects\clock (?C_STARTUP)
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/23/2018 00:05:56 PAGE 2
BL51 BANKED LINKER/LOCATER V6.22.2.0 10/13/2018 20:41:27 PAGE 2
VALUE TYPE NAME
----------------------------------
------- MODULE ?C_STARTUP
C:0A4DH SEGMENT ?C_C51STARTUP
C:0273H SEGMENT ?C_C51STARTUP
I:001CH SEGMENT ?STACK
C:0000H PUBLIC ?C_STARTUP
D:00E0H SYMBOL ACC
@ -77,7 +76,7 @@ SYMBOL TABLE OF MODULE: .\Objects\clock (?C_STARTUP)
N:0000H SYMBOL IBPSTACK
N:0100H SYMBOL IBPSTACKTOP
N:0080H SYMBOL IDATALEN
C:0A50H SYMBOL IDATALOOP
C:0276H SYMBOL IDATALOOP
N:0000H SYMBOL PBPSTACK
N:0100H SYMBOL PBPSTACKTOP
N:0000H SYMBOL PDATALEN
@ -86,178 +85,183 @@ SYMBOL TABLE OF MODULE: .\Objects\clock (?C_STARTUP)
N:0000H SYMBOL PPAGEENABLE
D:00A0H SYMBOL PPAGE_SFR
D:0081H SYMBOL SP
C:0A4DH SYMBOL STARTUP1
C:0273H SYMBOL STARTUP1
N:0000H SYMBOL XBPSTACK
N:0000H SYMBOL XBPSTACKTOP
N:0000H SYMBOL XDATALEN
N:0000H SYMBOL XDATASTART
C:0000H LINE# 126
C:0A4DH LINE# 133
C:0A4FH LINE# 134
C:0A50H LINE# 135
C:0A51H LINE# 136
C:0A53H LINE# 185
C:0A56H LINE# 196
C:0273H LINE# 133
C:0275H LINE# 134
C:0276H LINE# 135
C:0277H LINE# 136
C:0279H LINE# 185
C:027CH LINE# 196
------- ENDMOD ?C_STARTUP
------- MODULE CLOCK
C:0000H SYMBOL _ICE_DUMMY_
C:0800H PUBLIC xiaoai
D:0008H PUBLIC second
D:0080H PUBLIC P0
D:0090H PUBLIC P1
D:00A0H PUBLIC P2
B:00A8H.7 PUBLIC EA
D:0008H PUBLIC shiwan
D:000AH PUBLIC minute
B:0090H.1 PUBLIC k1
B:0090H.2 PUBLIC k2
B:0090H.3 PUBLIC k3
B:0090H.4 PUBLIC k4
B:0090H.5 PUBLIC k5
C:0A02H PUBLIC _times
C:08F9H PUBLIC main
D:000AH PUBLIC miao
C:0A22H PUBLIC duan
D:000CH PUBLIC qian
D:000EH PUBLIC bai
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/23/2018 00:05:56 PAGE 3
B:0090H.6 PUBLIC k6
C:0228H PUBLIC _times
C:0107H PUBLIC main
C:0248H PUBLIC duan
D:0089H PUBLIC TMOD
D:0010H PUBLIC fen
D:0012H PUBLIC shi
C:0A32H PUBLIC wei
D:0014H PUBLIC wan
D:000CH PUBLIC hour
D:000EH PUBLIC one
BL51 BANKED LINKER/LOCATER V6.22.2.0 10/13/2018 20:41:27 PAGE 3
C:0258H PUBLIC wei
D:0010H PUBLIC ten
B:00A8H.1 PUBLIC ET0
D:0016H PUBLIC ge
D:0012H PUBLIC oht
D:008CH PUBLIC TH0
D:008AH PUBLIC TL0
B:0088H.4 PUBLIC TR0
D:0018H PUBLIC t
D:001AH PUBLIC xiaoshi
C:0A3AH PUBLIC int0
C:09FEH SYMBOL L?0042
------- PROC L?0041
------- ENDPROC L?0041
C:09FEH SYMBOL L?0042
D:0014H PUBLIC tthousand
D:0016H PUBLIC thousand
D:0018H PUBLIC hundred
D:001AH PUBLIC t
C:000EH PUBLIC display
C:0260H PUBLIC int0
C:0224H SYMBOL L?0047
------- PROC L?0046
------- ENDPROC L?0046
C:0224H SYMBOL L?0047
------- PROC _TIMES
D:0006H SYMBOL z
------- DO
D:0004H SYMBOL i
D:0002H SYMBOL j
------- ENDDO
C:0A02H LINE# 16
C:0A02H LINE# 17
C:0A02H LINE# 19
C:0A0CH LINE# 20
C:0A21H LINE# 21
C:0228H LINE# 17
C:0228H LINE# 18
C:0228H LINE# 20
C:0232H LINE# 21
C:0247H LINE# 22
------- ENDPROC _TIMES
------- PROC XIAOAI
C:0800H LINE# 23
C:0800H LINE# 24
C:0800H LINE# 25
C:080FH LINE# 26
C:081EH LINE# 27
C:082DH LINE# 28
C:083CH LINE# 29
C:084BH LINE# 30
C:085AH LINE# 32
C:086AH LINE# 33
C:0871H LINE# 34
C:0878H LINE# 35
C:087BH LINE# 37
C:088BH LINE# 38
C:088EH LINE# 39
C:0891H LINE# 40
C:0894H LINE# 42
C:08A4H LINE# 43
C:08A7H LINE# 44
C:08AAH LINE# 45
C:08ADH LINE# 47
C:08BDH LINE# 48
C:08C0H LINE# 49
C:08C3H LINE# 50
C:08C6H LINE# 52
C:08D6H LINE# 53
C:08D9H LINE# 54
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/23/2018 00:05:56 PAGE 4
------- PROC DISPLAY
C:000EH LINE# 24
C:000EH LINE# 25
C:000EH LINE# 26
C:001DH LINE# 27
C:002CH LINE# 28
C:003BH LINE# 29
C:004AH LINE# 30
C:0059H LINE# 31
C:0068H LINE# 33
C:0078H LINE# 34
C:007FH LINE# 35
C:0086H LINE# 36
C:0089H LINE# 38
C:0099H LINE# 39
C:009CH LINE# 40
C:009FH LINE# 41
C:00A2H LINE# 43
C:00B2H LINE# 44
C:00B5H LINE# 45
C:00B8H LINE# 46
C:00BBH LINE# 48
C:00CBH LINE# 49
C:00CEH LINE# 50
C:00D1H LINE# 51
C:00D4H LINE# 53
C:00E4H LINE# 54
C:00E7H LINE# 55
BL51 BANKED LINKER/LOCATER V6.22.2.0 10/13/2018 20:41:27 PAGE 4
C:08DCH LINE# 55
C:08DFH LINE# 57
C:08EFH LINE# 58
C:08F2H LINE# 59
C:08F5H LINE# 60
C:08F8H LINE# 61
------- ENDPROC XIAOAI
C:00EAH LINE# 56
C:00EDH LINE# 58
C:00FDH LINE# 59
C:0100H LINE# 60
C:0103H LINE# 61
C:0106H LINE# 62
------- ENDPROC DISPLAY
------- PROC MAIN
C:08F9H LINE# 63
C:08F9H LINE# 64
C:08F9H LINE# 65
C:08FBH LINE# 66
C:08FEH LINE# 67
C:0900H LINE# 68
C:0903H LINE# 69
C:0906H LINE# 71
C:0906H LINE# 72
C:0906H LINE# 73
C:0909H LINE# 75
C:090CH LINE# 76
C:0910H LINE# 77
C:0913H LINE# 78
C:0917H LINE# 79
C:091AH LINE# 80
C:091FH LINE# 81
C:0923H LINE# 82
C:0927H LINE# 83
C:0929H LINE# 84
C:092FH LINE# 85
C:092FH LINE# 86
C:0937H LINE# 87
C:093AH LINE# 88
C:093DH LINE# 89
C:093FH LINE# 90
C:093FH LINE# 91
C:0945H LINE# 92
C:094DH LINE# 93
C:0950H LINE# 94
C:0953H LINE# 95
C:0955H LINE# 96
C:0955H LINE# 99
C:095DH LINE# 100
C:0961H LINE# 101
C:0969H LINE# 102
C:096BH LINE# 103
C:0973H LINE# 104
C:0977H LINE# 105
C:097FH LINE# 106
C:0981H LINE# 107
C:0989H LINE# 108
C:098DH LINE# 109
C:0995H LINE# 110
C:0997H LINE# 111
C:099FH LINE# 112
C:09A3H LINE# 114
C:09A6H LINE# 115
C:0107H LINE# 64
C:0107H LINE# 65
C:0107H LINE# 66
C:0109H LINE# 67
C:010BH LINE# 68
C:010EH LINE# 69
C:0110H LINE# 70
C:0113H LINE# 71
C:0116H LINE# 73
C:0116H LINE# 74
C:0116H LINE# 75
C:0119H LINE# 77
C:011CH LINE# 78
C:0120H LINE# 79
C:0123H LINE# 80
C:0127H LINE# 81
C:012AH LINE# 82
C:012FH LINE# 83
C:0133H LINE# 84
C:0137H LINE# 85
C:0139H LINE# 86
C:013FH LINE# 87
C:013FH LINE# 88
C:0147H LINE# 89
C:014AH LINE# 90
C:014DH LINE# 91
C:014FH LINE# 92
C:014FH LINE# 93
C:0155H LINE# 94
C:015DH LINE# 95
C:0160H LINE# 96
C:0163H LINE# 97
C:0165H LINE# 98
C:0165H LINE# 99
C:016BH LINE# 100
C:0173H LINE# 101
C:0176H LINE# 102
C:0179H LINE# 103
C:017BH LINE# 104
C:017BH LINE# 107
C:0183H LINE# 108
C:0187H LINE# 109
C:018FH LINE# 110
C:0191H LINE# 111
C:0199H LINE# 112
C:019DH LINE# 113
C:01A5H LINE# 114
C:01A7H LINE# 115
C:01AFH LINE# 116
BL51 BANKED LINKER/LOCATER V6.22.2.0 10/13/2018 20:41:27 PAGE 5
C:01B3H LINE# 117
C:01BBH LINE# 118
C:01BDH LINE# 119
C:01C5H LINE# 120
C:01C9H LINE# 121
C:01C9H LINE# 123
C:01CCH LINE# 124
------- ENDPROC MAIN
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/23/2018 00:05:56 PAGE 5
------- PROC INT0
C:0A3AH LINE# 118
C:0A3CH LINE# 120
C:0A44H LINE# 121
C:0A47H LINE# 122
C:0A4AH LINE# 123
C:0260H LINE# 127
C:0262H LINE# 129
C:026AH LINE# 130
C:026DH LINE# 131
C:0270H LINE# 132
------- ENDPROC INT0
------- ENDMOD CLOCK
------- MODULE ?C?UIDIV
C:09A9H PUBLIC ?C?UIDIV
C:01CFH PUBLIC ?C?UIDIV
------- ENDMOD ?C?UIDIV
******************************************************************************
* RESTRICTED VERSION WITH 0800H BYTE CODE SIZE LIMIT; USED: 020AH BYTE (25%) *
******************************************************************************
Program Size: data=29.0 xdata=0 code=607
Program Size: data=29.0 xdata=0 code=631
LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 0 ERROR(S)

Binary file not shown.

Binary file not shown.

View File

@ -5,10 +5,10 @@
<h2>Tool Versions:</h2>
IDE-Version: ¦ÌVision V5.25.3.0
Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: a a, a, LIC=----
License Information: aixiao Microsoft, Microsoft, LIC=FQZGK-ZL4VP-SQ609-4ELSE-V5YI3-SSTM8
Tool Versions:
Toolchain: PK51 Prof. Develpers Kit Version: 9.59.0.0
Toolchain: MDK51 Professional Version: 9.59.0.0
Toolchain Path: C:\Keil_v5\C51\BIN
C Compiler: C51.exe V9.59.0.0
Assembler: A51.exe V8.2.7.0
@ -18,15 +18,15 @@ Hex Converter: OH51.exe V2.7.0.0
CPU DLL: S8051.DLL V3.122.0.0
Dialog DLL: DP51.DLL V2.66.0.0
<h2>Project:</h2>
C:\Users\aixiao.me\Desktop\clock\c\clock.uvproj
Project File Date: 05/23/2018
C:\Users\niuyuling\Desktop\clock\c\clock.uvproj
Project File Date: 10/13/2018
<h2>Output:</h2>
Rebuild target 'Target 1'
assembling STARTUP.A51...
compiling clock.c...
linking...
Program Size: data=29.0 xdata=0 code=607
Program Size: data=29.0 xdata=0 code=631
creating hex file from ".\Objects\clock"...
".\Objects\clock" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:00

View File

@ -1,45 +1,47 @@
:03000000020A4DA4
:0C0A4D00787FE4F6D8FD75811B0208F9E3
:100A2200C0F9A4B0999282F880908883C6A1868E7C
:080A32007FBFDFEFF7FBFDFEC3
:0409FE00E493F5A0E9
:100A0200E4FDFCC3ED9FEC9E5015E4FBFA0BBB002A
:0F0A1200010AEB64794A70F50DBD00010C80E418
:010A210022B2
:10080000AE0AAF0B7C007D0A1209A98C168D17AEBB
:100810000AAF0B7C007D0A1209A98E128F13AE104D
:10082000AF117C007D0A1209A98C0E8D0FAE10AF9E
:10083000117C007D0A1209A98E0C8F0DAE1AAF1B18
:100840007C007D0A1209A98C148D15AE1AAF1B7C91
:10085000007D0A1209A98E088F0974222517F582D6
:10086000740A3516F583E493F580900A39E493F51C
:10087000A07F017E00120A0275A0FF74222513F5E5
:1008800082740A3512F583E493F580900A381209D0
:10089000FE75A0FF7422250FF582740A350EF583CC
:1008A000E493F580900A371209FE75A0FF742225A3
:1008B0000DF582740A350CF583E493F580900A36C1
:1008C0001209FE75A0FF74222515F582740A3514ED
:1008D000F583E493F580900A351209FE75A0FF7444
:1008E000222509F582740A3508F583E493F5809092
:0908F0000A341209FE75A0FF2272
:1008F900D2AF758901D2A9758C3C758AAF120800EF
:10090900209104D28C8045209204C28C803E209391
:100919000FE4F50AF50BF510F511F51AF51B802C06
:10092900208C132094100511E511700205102094F4
:100939001B12080080F8208C13209510051BE51B5D
:100949007002051A20950512080080F8E51964144B
:100959004518700EF518F519050BE50B703C050ADD
:100969008038E50B643C450A700EF50AF50B051154
:10097900E511702605108022E511643C4510700EC2
:10098900F510F511051BE51B7010051A800CE51B08
:100999006418451A7004F51AF51B120800020906B5
:03000B00020A3AAC
:100A3A00C0E00519E51970020518758C3C758AAF76
:030A4A00D0E032C7
:1009A900BC000BBE0029EF8DF084FFADF022E4CC32
:1009B900F875F008EF2FFFEE33FEEC33FCEE9DECFB
:1009C900984005FCEE9DFE0FD5F0E9E4CEFD22ED41
:1009D900F8F5F0EE8420D21CFEADF075F008EF2F8B
:1009E900FFED33FD4007985006D5F0F222C398FD7C
:0509F9000FD5F0EA2219
:0300000002027386
:0C027300787FE4F6D8FD75811B020107BE
:10024800C0F9A4B0999282F880908883C6A1868E5E
:080258007FBFDFEFF7FBFDFEA5
:04022400E493F5A0CA
:10022800E4FDFCC3ED9FEC9E5015E4FBFA0BBB000C
:0F023800010AEB64794A70F50DBD00010C80E4FA
:010247002294
:10000E00AE08AF097C007D0A1201CF8C0E8D0FAEAB
:10001E0008AF097C007D0A1201CF8E108F11AE0A37
:10002E00AF0B7C007D0A1201CF8C188D19AE0AAF72
:10003E000B7C007D0A1201CF8E168F17AE0CAF0D02
:10004E007C007D0A1201CF8C148D15AE0CAF0D7C89
:10005E00007D0A1201CF8E128F137448250FF58280
:10006E007402350EF583E493F58090025FE493F508
:10007E00A07F017E0012022875A0FF74482511F59D
:10008E008274023510F583E493F58090025E1202BD
:10009E002475A0FF74482519F58274023518F5836E
:1000AE00E493F58090025D12022475A0FF7448253A
:1000BE0017F58274023516F583E493F58090025C91
:1000CE0012022475A0FF74482515F58274023514AA
:1000DE00F583E493F58090025B12022475A0FF7401
:1000EE00482513F58274023512F583E493F580905A
:0900FE00025A12022475A0FF222F
:10010700D28CD2AF758901D2A9758C3C758AAF1292
:10011700000E209104D28C805B209204C28C805404
:1001270020930FE4F508F509F50AF50BF50CF50D25
:100137008042208C132094100509E50970020508F8
:1001470020943112000E80F8208C13209510050B97
:10015700E50B7002050A20951B12000E80F8208C13
:1001670013209610050DE50D7002050C209605125B
:10017700000E80F8E51B6414451A700EF51AF51B7E
:100187000509E509703C05088038E509643C450820
:10019700700EF508F509050BE50B7026050A802298
:1001A700E50B643C450A700EF50AF50B050DE50DE8
:1001B7007010050C800CE50D6418450C7004F50CE7
:0801C700F50D12000E020116F5
:03000B000202608E
:10026000C0E0051BE51B7002051A758C3C758AAF52
:03027000D0E032A9
:1001CF00BC000BBE0029EF8DF084FFADF022E4CC14
:1001DF00F875F008EF2FFFEE33FEEC33FCEE9DECDD
:1001EF00984005FCEE9DFE0FD5F0E9E4CEFD22ED23
:1001FF00F8F5F0EE8420D21CFEADF075F008EF2F6D
:10020F00FFED33FD4007985006D5F0F222C398FD5D
:05021F000FD5F0EA22FA
:00000001FF

Binary file not shown.

View File

@ -1,17 +1,18 @@
#include <AT89X51.H>
#define uint unsigned int
#define uchar unsigned char
sbit led1=P1^0;
sbit k1=P1^1;
sbit k2=P1^2;
sbit k3=P1^3;
sbit k4=P1^4;
sbit k5=P1^5;
sbit k6=P1^6;
void xiaoai();
void display();
uchar code duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
uchar code wei[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
uint miao,fen,xiaoshi,ge,shi,bai,qian,wan,shiwan,t;
uint second, minute, hour, one, ten, hundred, thousand, tthousand, oht, t;
void times(uint z)
{
@ -20,41 +21,41 @@ void times(uint z)
for(j=0; j<121; j++);
}
void xiaoai()
void display()
{
ge=miao%10;
shi=miao/10;
bai=fen%10;
qian=fen/10;
wan=xiaoshi%10;
shiwan=xiaoshi/10;
one=second%10;
ten=second/10;
hundred=minute%10;
thousand=minute/10;
tthousand=hour%10;
oht=hour/10;
P0=duan[ge];
P0=duan[one];
P2=wei[7];
times(1);
P2=0xff;
P0=duan[shi];
P0=duan[ten];
P2=wei[6];
times(1);
P2=0xff;
P0=duan[bai];
P0=duan[hundred];
P2=wei[5];
times(1);
P2=0xff;
P0=duan[qian];
P0=duan[thousand];
P2=wei[4];
times(1);
P2=0xff;
P0=duan[wan];
P0=duan[tthousand];
P2=wei[3];
times(1);
P2=0xff;
P0=duan[shiwan];
P0=duan[oht];
P2=wei[2];
times(1);
P2=0xff;
@ -62,57 +63,65 @@ void xiaoai()
void main()
{
TR0=1;
EA=1;
TMOD=0x01;
ET0=1;
TH0=(65535-50000)/256;
TL0=(65535-50000)%256;
while(1)
{
xiaoai();
if(k1==0)
TR0=1;
else if(k2==0)
TR0=0;
else if(k3==0) {
miao=0;
fen=0;
xiaoshi=0;
}
else if(TR0==0&&k4==0)
while(1)
{
fen=fen+1;
while(!k4) {
xiaoai();
display();
if(k1==0)
TR0=1;
else if(k2==0)
TR0=0;
else if(k3==0) {
second=0;
minute=0;
hour=0;
}
}
else if(TR0==0&&k5==0) {
xiaoshi=xiaoshi+1;
while(!k5) {
xiaoai();
else if(TR0==0 && k4==0)
{
second=second+1;
while(!k4) {
display();
}
}
else if(TR0==0 && k5==0) {
minute=minute+1;
while(!k5) {
display();
}
}
else if(TR0==0 && k6==0) {
hour=hour+1;
while(!k6) {
display();
}
}
}
if(t==20){
t=0;
miao=miao+1;
}
else if(miao==60) {
miao=0;
fen=fen+1;
}
else if(fen==60) {
fen=0;
xiaoshi=xiaoshi+1;
}
else if(xiaoshi==24)
xiaoshi=0;
if(t==20){
t=0;
second=second+1;
}
else if(second==60) {
second=0;
minute=minute+1;
}
else if(minute==60) {
minute=0;
hour=hour+1;
}
else if(hour==24) {
hour=0;
}
xiaoai();
}
display();
}
}
void int0() interrupt 1

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@
<ToolsetNumber>0x0</ToolsetNumber>
<ToolsetName>MCS-51</ToolsetName>
<TargetOption>
<CLK51>24000000</CLK51>
<CLK51>12000000</CLK51>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
@ -176,7 +176,7 @@
<Group>
<GroupName>Source Group 1</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@ -233,7 +233,7 @@
<RCB>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x10000</Size>
<Size>0xffff</Size>
</RCB>
<RXB>
<Type>0</Type>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,60 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<WORKSPACE>
<FRAME activewindow="0">
<PLACEMENT>2c0000000200000003000000ffffffffffffffffffffffffffffffffb00000000c000000d0060000fc030000</PLACEMENT>
<WINDOW type="default" module="ISIS"/>
</FRAME>
<MODULE name="VSMDEBUG">
<PWI>
<POPUP w="800" x="38" flags="00000002" y="128" h="200" pid="0" iid="-1">
<PROPERTIES>
<ITEM name="Message Column Width">542</ITEM>
<ITEM name="ShowGrid">No</ITEM>
<ITEM name="Source Column Width">100</ITEM>
<ITEM name="Time Column Width">120</ITEM>
<ITEM name="Version">100</ITEM>
</PROPERTIES>
</POPUP>
<POPUP w="350" x="58" flags="00000032" y="148" h="200" pid="1" iid="-1">
<PROPERTIES>
<ITEM name="Address Column Width">83</ITEM>
<ITEM name="AutoResize">No</ITEM>
<ITEM name="Gridlines">Yes</ITEM>
<ITEM name="Name Column Width">83</ITEM>
<ITEM name="ShowAddresses">Yes</ITEM>
<ITEM name="ShowPreviousValues">No</ITEM>
<ITEM name="ShowTypes">No</ITEM>
<ITEM name="ShowWatchPoint">Yes</ITEM>
<ITEM name="TriggerMode">0</ITEM>
<ITEM name="Value Column Width">83</ITEM>
<ITEM name="Version">100</ITEM>
<ITEM name="Watch Expression Column Width">83</ITEM>
<ITEM name="nItems">0</ITEM>
</PROPERTIES>
</POPUP>
<POPUP w="184" x="78" flags="00000008" y="168" h="223" pid="1" iid="1">
<PROPERTIES/>
</POPUP>
<POPUP w="8" x="98" flags="0000000a" y="188" h="16" pid="3" iid="1">
<PROPERTIES>
<ITEM name="DataType">2</ITEM>
<ITEM name="DispChars">Yes</ITEM>
<ITEM name="DispFormat">2</ITEM>
<ITEM name="ShowChanges">Yes</ITEM>
<ITEM name="ShowToolTips">Yes</ITEM>
<ITEM name="TopLineAddress">00000000</ITEM>
</PROPERTIES>
</POPUP>
<POPUP w="8" x="118" flags="0000000a" y="208" h="16" pid="2" iid="1">
<PROPERTIES>
<ITEM name="DataType">2</ITEM>
<ITEM name="DispChars">Yes</ITEM>
<ITEM name="DispFormat">2</ITEM>
<ITEM name="ShowChanges">Yes</ITEM>
<ITEM name="ShowToolTips">Yes</ITEM>
<ITEM name="TopLineAddress">00000080</ITEM>
</PROPERTIES>
</POPUP>
</PWI>
</MODULE>
</WORKSPACE>