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:
parent
726486111d
commit
330880dd86
@ -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
|
MACRO ASSEMBLER A51 V8.2.7.0
|
||||||
@ -65,7 +65,7 @@ LOC OBJ LINE SOURCE
|
|||||||
55 ;
|
55 ;
|
||||||
56 ; <h> Stack Space for reentrant functions in the SMALL model.
|
56 ; <h> Stack Space for reentrant functions in the SMALL model.
|
||||||
57 ; <q> IBPSTACK: Enable SMALL model reentrant stack
|
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.
|
58 ; <i> Stack space for reentrant functions in the SMALL model.
|
||||||
0000 59 IBPSTACK EQU 0 ; set to 1 if small reentrant is used.
|
0000 59 IBPSTACK EQU 0 ; set to 1 if small reentrant is used.
|
||||||
@ -133,7 +133,7 @@ LOC OBJ LINE SOURCE
|
|||||||
121
|
121
|
||||||
122 EXTRN CODE (?C_START)
|
122 EXTRN CODE (?C_START)
|
||||||
123 PUBLIC ?C_STARTUP
|
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
|
124
|
||||||
---- 125 CSEG AT 0
|
---- 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
|
187 ; This code is required if you use L51_BANK.A51 with Banking Mode 4
|
||||||
188 ;<h> Code Banking
|
188 ;<h> Code Banking
|
||||||
189 ; <q> Select Bank 0 for L51_BANK.A51 Mode 4
|
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
|
190
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ LOC OBJ LINE SOURCE
|
|||||||
0009 020000 F 196 LJMP ?C_START
|
0009 020000 F 196 LJMP ?C_START
|
||||||
197
|
197
|
||||||
198 END
|
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
|
SYMBOL TABLE LISTING
|
||||||
------ ----- -------
|
------ ----- -------
|
||||||
|
@ -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
|
C51 COMPILER V9.59.0.0, COMPILATION OF MODULE CLOCK
|
||||||
@ -11,134 +11,143 @@ line level source
|
|||||||
1 #include <AT89X51.H>
|
1 #include <AT89X51.H>
|
||||||
2 #define uint unsigned int
|
2 #define uint unsigned int
|
||||||
3 #define uchar unsigned char
|
3 #define uchar unsigned char
|
||||||
4 sbit led1=P1^0;
|
4
|
||||||
5 sbit k1=P1^1;
|
5 sbit k1=P1^1;
|
||||||
6 sbit k2=P1^2;
|
6 sbit k2=P1^2;
|
||||||
7 sbit k3=P1^3;
|
7 sbit k3=P1^3;
|
||||||
8 sbit k4=P1^4;
|
8 sbit k4=P1^4;
|
||||||
9 sbit k5=P1^5;
|
9 sbit k5=P1^5;
|
||||||
10
|
10 sbit k6=P1^6;
|
||||||
11 void xiaoai();
|
11
|
||||||
12 uchar code duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
|
12 void display();
|
||||||
13 uchar code wei[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
|
13 uchar code duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
|
||||||
14 uint miao,fen,xiaoshi,ge,shi,bai,qian,wan,shiwan,t;
|
14 uchar code wei[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
|
||||||
15
|
15 uint second, minute, hour, one, ten, hundred, thousand, tthousand, oht, t;
|
||||||
16 void times(uint z)
|
16
|
||||||
17 {
|
17 void times(uint z)
|
||||||
18 1 uint i,j;
|
18 {
|
||||||
19 1 for(i=0; i<z; i++)
|
19 1 uint i,j;
|
||||||
20 1 for(j=0; j<121; j++);
|
20 1 for(i=0; i<z; i++)
|
||||||
21 1 }
|
21 1 for(j=0; j<121; j++);
|
||||||
22
|
22 1 }
|
||||||
23 void xiaoai()
|
23
|
||||||
24 {
|
24 void display()
|
||||||
25 1 ge=miao%10;
|
25 {
|
||||||
26 1 shi=miao/10;
|
26 1 one=second%10;
|
||||||
27 1 bai=fen%10;
|
27 1 ten=second/10;
|
||||||
28 1 qian=fen/10;
|
28 1 hundred=minute%10;
|
||||||
29 1 wan=xiaoshi%10;
|
29 1 thousand=minute/10;
|
||||||
30 1 shiwan=xiaoshi/10;
|
30 1 tthousand=hour%10;
|
||||||
31 1
|
31 1 oht=hour/10;
|
||||||
32 1 P0=duan[ge];
|
32 1
|
||||||
33 1 P2=wei[7];
|
33 1 P0=duan[one];
|
||||||
34 1 times(1);
|
34 1 P2=wei[7];
|
||||||
35 1 P2=0xff;
|
35 1 times(1);
|
||||||
36 1
|
36 1 P2=0xff;
|
||||||
37 1 P0=duan[shi];
|
37 1
|
||||||
38 1 P2=wei[6];
|
38 1 P0=duan[ten];
|
||||||
39 1 times(1);
|
39 1 P2=wei[6];
|
||||||
40 1 P2=0xff;
|
40 1 times(1);
|
||||||
41 1
|
41 1 P2=0xff;
|
||||||
42 1 P0=duan[bai];
|
42 1
|
||||||
43 1 P2=wei[5];
|
43 1 P0=duan[hundred];
|
||||||
44 1 times(1);
|
44 1 P2=wei[5];
|
||||||
45 1 P2=0xff;
|
45 1 times(1);
|
||||||
46 1
|
46 1 P2=0xff;
|
||||||
47 1 P0=duan[qian];
|
47 1
|
||||||
48 1 P2=wei[4];
|
48 1 P0=duan[thousand];
|
||||||
49 1 times(1);
|
49 1 P2=wei[4];
|
||||||
50 1 P2=0xff;
|
50 1 times(1);
|
||||||
51 1
|
51 1 P2=0xff;
|
||||||
52 1 P0=duan[wan];
|
52 1
|
||||||
53 1 P2=wei[3];
|
53 1 P0=duan[tthousand];
|
||||||
54 1 times(1);
|
54 1 P2=wei[3];
|
||||||
C51 COMPILER V9.59.0.0 CLOCK 05/23/2018 00:05:56 PAGE 2
|
C51 COMPILER V9.59.0.0 CLOCK 10/13/2018 20:41:27 PAGE 2
|
||||||
|
|
||||||
55 1 P2=0xff;
|
55 1 times(1);
|
||||||
56 1
|
56 1 P2=0xff;
|
||||||
57 1 P0=duan[shiwan];
|
57 1
|
||||||
58 1 P2=wei[2];
|
58 1 P0=duan[oht];
|
||||||
59 1 times(1);
|
59 1 P2=wei[2];
|
||||||
60 1 P2=0xff;
|
60 1 times(1);
|
||||||
61 1 }
|
61 1 P2=0xff;
|
||||||
62
|
62 1 }
|
||||||
63 void main()
|
63
|
||||||
64 {
|
64 void main()
|
||||||
65 1 EA=1;
|
65 {
|
||||||
66 1 TMOD=0x01;
|
66 1 TR0=1;
|
||||||
67 1 ET0=1;
|
67 1 EA=1;
|
||||||
68 1 TH0=(65535-50000)/256;
|
68 1 TMOD=0x01;
|
||||||
69 1 TL0=(65535-50000)%256;
|
69 1 ET0=1;
|
||||||
70 1
|
70 1 TH0=(65535-50000)/256;
|
||||||
71 1 while(1)
|
71 1 TL0=(65535-50000)%256;
|
||||||
72 1 {
|
72 1
|
||||||
73 2 xiaoai();
|
73 1 while(1)
|
||||||
74 2
|
74 1 {
|
||||||
75 2 if(k1==0)
|
75 2 display();
|
||||||
76 2 TR0=1;
|
76 2
|
||||||
77 2 else if(k2==0)
|
77 2 if(k1==0)
|
||||||
78 2 TR0=0;
|
78 2 TR0=1;
|
||||||
79 2 else if(k3==0) {
|
79 2 else if(k2==0)
|
||||||
80 3 miao=0;
|
80 2 TR0=0;
|
||||||
81 3 fen=0;
|
81 2 else if(k3==0) {
|
||||||
82 3 xiaoshi=0;
|
82 3 second=0;
|
||||||
83 3 }
|
83 3 minute=0;
|
||||||
84 2 else if(TR0==0&&k4==0)
|
84 3 hour=0;
|
||||||
85 2 {
|
85 3 }
|
||||||
86 3 fen=fen+1;
|
86 2 else if(TR0==0 && k4==0)
|
||||||
87 3 while(!k4) {
|
87 2 {
|
||||||
88 4 xiaoai();
|
88 3 second=second+1;
|
||||||
89 4 }
|
89 3 while(!k4) {
|
||||||
90 3 }
|
90 4 display();
|
||||||
91 2 else if(TR0==0&&k5==0) {
|
91 4 }
|
||||||
92 3 xiaoshi=xiaoshi+1;
|
92 3 }
|
||||||
93 3 while(!k5) {
|
93 2 else if(TR0==0 && k5==0) {
|
||||||
94 4 xiaoai();
|
94 3 minute=minute+1;
|
||||||
95 4 }
|
95 3 while(!k5) {
|
||||||
96 3 }
|
96 4 display();
|
||||||
97 2
|
97 4 }
|
||||||
98 2
|
98 3 }
|
||||||
99 2 if(t==20){
|
99 2 else if(TR0==0 && k6==0) {
|
||||||
100 3 t=0;
|
100 3 hour=hour+1;
|
||||||
101 3 miao=miao+1;
|
101 3 while(!k6) {
|
||||||
102 3 }
|
102 4 display();
|
||||||
103 2 else if(miao==60) {
|
103 4 }
|
||||||
104 3 miao=0;
|
104 3 }
|
||||||
105 3 fen=fen+1;
|
105 2
|
||||||
106 3 }
|
106 2
|
||||||
107 2 else if(fen==60) {
|
107 2 if(t==20){
|
||||||
108 3 fen=0;
|
108 3 t=0;
|
||||||
109 3 xiaoshi=xiaoshi+1;
|
109 3 second=second+1;
|
||||||
110 3 }
|
110 3 }
|
||||||
111 2 else if(xiaoshi==24)
|
111 2 else if(second==60) {
|
||||||
112 2 xiaoshi=0;
|
112 3 second=0;
|
||||||
113 2
|
113 3 minute=minute+1;
|
||||||
114 2 xiaoai();
|
114 3 }
|
||||||
115 2 }
|
115 2 else if(minute==60) {
|
||||||
116 1 }
|
116 3 minute=0;
|
||||||
C51 COMPILER V9.59.0.0 CLOCK 05/23/2018 00:05:56 PAGE 3
|
C51 COMPILER V9.59.0.0 CLOCK 10/13/2018 20:41:27 PAGE 3
|
||||||
|
|
||||||
117
|
117 3 hour=hour+1;
|
||||||
118 void int0() interrupt 1
|
118 3 }
|
||||||
119 {
|
119 2 else if(hour==24) {
|
||||||
120 1 t++;
|
120 3 hour=0;
|
||||||
121 1 TH0=(65535-50000)/256;
|
121 3 }
|
||||||
122 1 TL0=(65535-50000)%256;
|
122 2
|
||||||
123 1 }
|
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
|
MODULE INFORMATION: STATIC OVERLAYABLE
|
||||||
CODE SIZE = 480 ----
|
CODE SIZE = 504 ----
|
||||||
CONSTANT SIZE = 24 ----
|
CONSTANT SIZE = 24 ----
|
||||||
XDATA SIZE = ---- ----
|
XDATA SIZE = ---- ----
|
||||||
PDATA SIZE = ---- ----
|
PDATA SIZE = ---- ----
|
||||||
|
@ -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:
|
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
|
CODE 0000H 0003H ABSOLUTE
|
||||||
0003H 0008H *** GAP ***
|
0003H 0008H *** GAP ***
|
||||||
CODE 000BH 0003H ABSOLUTE
|
CODE 000BH 0003H ABSOLUTE
|
||||||
000EH 07F2H *** GAP ***
|
CODE 000EH 00F9H UNIT ?PR?DISPLAY?CLOCK
|
||||||
CODE 0800H 00F9H UNIT ?PR?XIAOAI?CLOCK
|
CODE 0107H 00C8H UNIT ?PR?MAIN?CLOCK
|
||||||
CODE 08F9H 00B0H UNIT ?PR?MAIN?CLOCK
|
CODE 01CFH 0055H UNIT ?C?LIB_CODE
|
||||||
CODE 09A9H 0055H UNIT ?C?LIB_CODE
|
CODE 0224H 0024H UNIT ?PR?_TIMES?CLOCK
|
||||||
CODE 09FEH 0024H UNIT ?PR?_TIMES?CLOCK
|
CODE 0248H 0018H UNIT ?CO?CLOCK
|
||||||
CODE 0A22H 0018H UNIT ?CO?CLOCK
|
CODE 0260H 0013H UNIT ?PR?INT0?CLOCK
|
||||||
CODE 0A3AH 0013H UNIT ?PR?INT0?CLOCK
|
CODE 0273H 000CH UNIT ?C_C51STARTUP
|
||||||
CODE 0A4DH 000CH UNIT ?C_C51STARTUP
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -50,24 +49,24 @@ SEGMENT
|
|||||||
+--> ?PR?MAIN?CLOCK
|
+--> ?PR?MAIN?CLOCK
|
||||||
|
|
||||||
?PR?MAIN?CLOCK
|
?PR?MAIN?CLOCK
|
||||||
+--> ?PR?XIAOAI?CLOCK
|
+--> ?PR?DISPLAY?CLOCK
|
||||||
|
|
||||||
?PR?XIAOAI?CLOCK
|
?PR?DISPLAY?CLOCK
|
||||||
+--> ?CO?CLOCK
|
+--> ?CO?CLOCK
|
||||||
+--> ?PR?_TIMES?CLOCK
|
+--> ?PR?_TIMES?CLOCK
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SYMBOL TABLE OF MODULE: .\Objects\clock (?C_STARTUP)
|
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
|
VALUE TYPE NAME
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
------- MODULE ?C_STARTUP
|
------- MODULE ?C_STARTUP
|
||||||
C:0A4DH SEGMENT ?C_C51STARTUP
|
C:0273H SEGMENT ?C_C51STARTUP
|
||||||
I:001CH SEGMENT ?STACK
|
I:001CH SEGMENT ?STACK
|
||||||
C:0000H PUBLIC ?C_STARTUP
|
C:0000H PUBLIC ?C_STARTUP
|
||||||
D:00E0H SYMBOL ACC
|
D:00E0H SYMBOL ACC
|
||||||
@ -77,7 +76,7 @@ SYMBOL TABLE OF MODULE: .\Objects\clock (?C_STARTUP)
|
|||||||
N:0000H SYMBOL IBPSTACK
|
N:0000H SYMBOL IBPSTACK
|
||||||
N:0100H SYMBOL IBPSTACKTOP
|
N:0100H SYMBOL IBPSTACKTOP
|
||||||
N:0080H SYMBOL IDATALEN
|
N:0080H SYMBOL IDATALEN
|
||||||
C:0A50H SYMBOL IDATALOOP
|
C:0276H SYMBOL IDATALOOP
|
||||||
N:0000H SYMBOL PBPSTACK
|
N:0000H SYMBOL PBPSTACK
|
||||||
N:0100H SYMBOL PBPSTACKTOP
|
N:0100H SYMBOL PBPSTACKTOP
|
||||||
N:0000H SYMBOL PDATALEN
|
N:0000H SYMBOL PDATALEN
|
||||||
@ -86,178 +85,183 @@ SYMBOL TABLE OF MODULE: .\Objects\clock (?C_STARTUP)
|
|||||||
N:0000H SYMBOL PPAGEENABLE
|
N:0000H SYMBOL PPAGEENABLE
|
||||||
D:00A0H SYMBOL PPAGE_SFR
|
D:00A0H SYMBOL PPAGE_SFR
|
||||||
D:0081H SYMBOL SP
|
D:0081H SYMBOL SP
|
||||||
C:0A4DH SYMBOL STARTUP1
|
C:0273H SYMBOL STARTUP1
|
||||||
N:0000H SYMBOL XBPSTACK
|
N:0000H SYMBOL XBPSTACK
|
||||||
N:0000H SYMBOL XBPSTACKTOP
|
N:0000H SYMBOL XBPSTACKTOP
|
||||||
N:0000H SYMBOL XDATALEN
|
N:0000H SYMBOL XDATALEN
|
||||||
N:0000H SYMBOL XDATASTART
|
N:0000H SYMBOL XDATASTART
|
||||||
C:0000H LINE# 126
|
C:0000H LINE# 126
|
||||||
C:0A4DH LINE# 133
|
C:0273H LINE# 133
|
||||||
C:0A4FH LINE# 134
|
C:0275H LINE# 134
|
||||||
C:0A50H LINE# 135
|
C:0276H LINE# 135
|
||||||
C:0A51H LINE# 136
|
C:0277H LINE# 136
|
||||||
C:0A53H LINE# 185
|
C:0279H LINE# 185
|
||||||
C:0A56H LINE# 196
|
C:027CH LINE# 196
|
||||||
------- ENDMOD ?C_STARTUP
|
------- ENDMOD ?C_STARTUP
|
||||||
|
|
||||||
------- MODULE CLOCK
|
------- MODULE CLOCK
|
||||||
C:0000H SYMBOL _ICE_DUMMY_
|
C:0000H SYMBOL _ICE_DUMMY_
|
||||||
C:0800H PUBLIC xiaoai
|
D:0008H PUBLIC second
|
||||||
D:0080H PUBLIC P0
|
D:0080H PUBLIC P0
|
||||||
D:0090H PUBLIC P1
|
D:0090H PUBLIC P1
|
||||||
D:00A0H PUBLIC P2
|
D:00A0H PUBLIC P2
|
||||||
B:00A8H.7 PUBLIC EA
|
B:00A8H.7 PUBLIC EA
|
||||||
D:0008H PUBLIC shiwan
|
D:000AH PUBLIC minute
|
||||||
B:0090H.1 PUBLIC k1
|
B:0090H.1 PUBLIC k1
|
||||||
B:0090H.2 PUBLIC k2
|
B:0090H.2 PUBLIC k2
|
||||||
B:0090H.3 PUBLIC k3
|
B:0090H.3 PUBLIC k3
|
||||||
B:0090H.4 PUBLIC k4
|
B:0090H.4 PUBLIC k4
|
||||||
B:0090H.5 PUBLIC k5
|
B:0090H.5 PUBLIC k5
|
||||||
C:0A02H PUBLIC _times
|
B:0090H.6 PUBLIC k6
|
||||||
C:08F9H PUBLIC main
|
C:0228H PUBLIC _times
|
||||||
D:000AH PUBLIC miao
|
C:0107H PUBLIC main
|
||||||
C:0A22H PUBLIC duan
|
C:0248H 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
|
|
||||||
|
|
||||||
|
|
||||||
D:0089H PUBLIC TMOD
|
D:0089H PUBLIC TMOD
|
||||||
D:0010H PUBLIC fen
|
D:000CH PUBLIC hour
|
||||||
D:0012H PUBLIC shi
|
D:000EH PUBLIC one
|
||||||
C:0A32H PUBLIC wei
|
BL51 BANKED LINKER/LOCATER V6.22.2.0 10/13/2018 20:41:27 PAGE 3
|
||||||
D:0014H PUBLIC wan
|
|
||||||
|
|
||||||
|
C:0258H PUBLIC wei
|
||||||
|
D:0010H PUBLIC ten
|
||||||
B:00A8H.1 PUBLIC ET0
|
B:00A8H.1 PUBLIC ET0
|
||||||
D:0016H PUBLIC ge
|
D:0012H PUBLIC oht
|
||||||
D:008CH PUBLIC TH0
|
D:008CH PUBLIC TH0
|
||||||
D:008AH PUBLIC TL0
|
D:008AH PUBLIC TL0
|
||||||
B:0088H.4 PUBLIC TR0
|
B:0088H.4 PUBLIC TR0
|
||||||
D:0018H PUBLIC t
|
D:0014H PUBLIC tthousand
|
||||||
D:001AH PUBLIC xiaoshi
|
D:0016H PUBLIC thousand
|
||||||
C:0A3AH PUBLIC int0
|
D:0018H PUBLIC hundred
|
||||||
C:09FEH SYMBOL L?0042
|
D:001AH PUBLIC t
|
||||||
------- PROC L?0041
|
C:000EH PUBLIC display
|
||||||
------- ENDPROC L?0041
|
C:0260H PUBLIC int0
|
||||||
C:09FEH SYMBOL L?0042
|
C:0224H SYMBOL L?0047
|
||||||
|
------- PROC L?0046
|
||||||
|
------- ENDPROC L?0046
|
||||||
|
C:0224H SYMBOL L?0047
|
||||||
------- PROC _TIMES
|
------- PROC _TIMES
|
||||||
D:0006H SYMBOL z
|
D:0006H SYMBOL z
|
||||||
------- DO
|
------- DO
|
||||||
D:0004H SYMBOL i
|
D:0004H SYMBOL i
|
||||||
D:0002H SYMBOL j
|
D:0002H SYMBOL j
|
||||||
------- ENDDO
|
------- ENDDO
|
||||||
C:0A02H LINE# 16
|
C:0228H LINE# 17
|
||||||
C:0A02H LINE# 17
|
C:0228H LINE# 18
|
||||||
C:0A02H LINE# 19
|
C:0228H LINE# 20
|
||||||
C:0A0CH LINE# 20
|
C:0232H LINE# 21
|
||||||
C:0A21H LINE# 21
|
C:0247H LINE# 22
|
||||||
------- ENDPROC _TIMES
|
------- ENDPROC _TIMES
|
||||||
------- PROC XIAOAI
|
------- PROC DISPLAY
|
||||||
C:0800H LINE# 23
|
C:000EH LINE# 24
|
||||||
C:0800H LINE# 24
|
C:000EH LINE# 25
|
||||||
C:0800H LINE# 25
|
C:000EH LINE# 26
|
||||||
C:080FH LINE# 26
|
C:001DH LINE# 27
|
||||||
C:081EH LINE# 27
|
C:002CH LINE# 28
|
||||||
C:082DH LINE# 28
|
C:003BH LINE# 29
|
||||||
C:083CH LINE# 29
|
C:004AH LINE# 30
|
||||||
C:084BH LINE# 30
|
C:0059H LINE# 31
|
||||||
C:085AH LINE# 32
|
C:0068H LINE# 33
|
||||||
C:086AH LINE# 33
|
C:0078H LINE# 34
|
||||||
C:0871H LINE# 34
|
C:007FH LINE# 35
|
||||||
C:0878H LINE# 35
|
C:0086H LINE# 36
|
||||||
C:087BH LINE# 37
|
C:0089H LINE# 38
|
||||||
C:088BH LINE# 38
|
C:0099H LINE# 39
|
||||||
C:088EH LINE# 39
|
C:009CH LINE# 40
|
||||||
C:0891H LINE# 40
|
C:009FH LINE# 41
|
||||||
C:0894H LINE# 42
|
C:00A2H LINE# 43
|
||||||
C:08A4H LINE# 43
|
C:00B2H LINE# 44
|
||||||
C:08A7H LINE# 44
|
C:00B5H LINE# 45
|
||||||
C:08AAH LINE# 45
|
C:00B8H LINE# 46
|
||||||
C:08ADH LINE# 47
|
C:00BBH LINE# 48
|
||||||
C:08BDH LINE# 48
|
C:00CBH LINE# 49
|
||||||
C:08C0H LINE# 49
|
C:00CEH LINE# 50
|
||||||
C:08C3H LINE# 50
|
C:00D1H LINE# 51
|
||||||
C:08C6H LINE# 52
|
C:00D4H LINE# 53
|
||||||
C:08D6H LINE# 53
|
C:00E4H LINE# 54
|
||||||
C:08D9H LINE# 54
|
C:00E7H LINE# 55
|
||||||
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/23/2018 00:05:56 PAGE 4
|
BL51 BANKED LINKER/LOCATER V6.22.2.0 10/13/2018 20:41:27 PAGE 4
|
||||||
|
|
||||||
|
|
||||||
C:08DCH LINE# 55
|
C:00EAH LINE# 56
|
||||||
C:08DFH LINE# 57
|
C:00EDH LINE# 58
|
||||||
C:08EFH LINE# 58
|
C:00FDH LINE# 59
|
||||||
C:08F2H LINE# 59
|
C:0100H LINE# 60
|
||||||
C:08F5H LINE# 60
|
C:0103H LINE# 61
|
||||||
C:08F8H LINE# 61
|
C:0106H LINE# 62
|
||||||
------- ENDPROC XIAOAI
|
------- ENDPROC DISPLAY
|
||||||
------- PROC MAIN
|
------- PROC MAIN
|
||||||
C:08F9H LINE# 63
|
C:0107H LINE# 64
|
||||||
C:08F9H LINE# 64
|
C:0107H LINE# 65
|
||||||
C:08F9H LINE# 65
|
C:0107H LINE# 66
|
||||||
C:08FBH LINE# 66
|
C:0109H LINE# 67
|
||||||
C:08FEH LINE# 67
|
C:010BH LINE# 68
|
||||||
C:0900H LINE# 68
|
C:010EH LINE# 69
|
||||||
C:0903H LINE# 69
|
C:0110H LINE# 70
|
||||||
C:0906H LINE# 71
|
C:0113H LINE# 71
|
||||||
C:0906H LINE# 72
|
C:0116H LINE# 73
|
||||||
C:0906H LINE# 73
|
C:0116H LINE# 74
|
||||||
C:0909H LINE# 75
|
C:0116H LINE# 75
|
||||||
C:090CH LINE# 76
|
C:0119H LINE# 77
|
||||||
C:0910H LINE# 77
|
C:011CH LINE# 78
|
||||||
C:0913H LINE# 78
|
C:0120H LINE# 79
|
||||||
C:0917H LINE# 79
|
C:0123H LINE# 80
|
||||||
C:091AH LINE# 80
|
C:0127H LINE# 81
|
||||||
C:091FH LINE# 81
|
C:012AH LINE# 82
|
||||||
C:0923H LINE# 82
|
C:012FH LINE# 83
|
||||||
C:0927H LINE# 83
|
C:0133H LINE# 84
|
||||||
C:0929H LINE# 84
|
C:0137H LINE# 85
|
||||||
C:092FH LINE# 85
|
C:0139H LINE# 86
|
||||||
C:092FH LINE# 86
|
C:013FH LINE# 87
|
||||||
C:0937H LINE# 87
|
C:013FH LINE# 88
|
||||||
C:093AH LINE# 88
|
C:0147H LINE# 89
|
||||||
C:093DH LINE# 89
|
C:014AH LINE# 90
|
||||||
C:093FH LINE# 90
|
C:014DH LINE# 91
|
||||||
C:093FH LINE# 91
|
C:014FH LINE# 92
|
||||||
C:0945H LINE# 92
|
C:014FH LINE# 93
|
||||||
C:094DH LINE# 93
|
C:0155H LINE# 94
|
||||||
C:0950H LINE# 94
|
C:015DH LINE# 95
|
||||||
C:0953H LINE# 95
|
C:0160H LINE# 96
|
||||||
C:0955H LINE# 96
|
C:0163H LINE# 97
|
||||||
C:0955H LINE# 99
|
C:0165H LINE# 98
|
||||||
C:095DH LINE# 100
|
C:0165H LINE# 99
|
||||||
C:0961H LINE# 101
|
C:016BH LINE# 100
|
||||||
C:0969H LINE# 102
|
C:0173H LINE# 101
|
||||||
C:096BH LINE# 103
|
C:0176H LINE# 102
|
||||||
C:0973H LINE# 104
|
C:0179H LINE# 103
|
||||||
C:0977H LINE# 105
|
C:017BH LINE# 104
|
||||||
C:097FH LINE# 106
|
C:017BH LINE# 107
|
||||||
C:0981H LINE# 107
|
C:0183H LINE# 108
|
||||||
C:0989H LINE# 108
|
C:0187H LINE# 109
|
||||||
C:098DH LINE# 109
|
C:018FH LINE# 110
|
||||||
C:0995H LINE# 110
|
C:0191H LINE# 111
|
||||||
C:0997H LINE# 111
|
C:0199H LINE# 112
|
||||||
C:099FH LINE# 112
|
C:019DH LINE# 113
|
||||||
C:09A3H LINE# 114
|
C:01A5H LINE# 114
|
||||||
C:09A6H LINE# 115
|
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
|
------- ENDPROC MAIN
|
||||||
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/23/2018 00:05:56 PAGE 5
|
|
||||||
|
|
||||||
|
|
||||||
------- PROC INT0
|
------- PROC INT0
|
||||||
C:0A3AH LINE# 118
|
C:0260H LINE# 127
|
||||||
C:0A3CH LINE# 120
|
C:0262H LINE# 129
|
||||||
C:0A44H LINE# 121
|
C:026AH LINE# 130
|
||||||
C:0A47H LINE# 122
|
C:026DH LINE# 131
|
||||||
C:0A4AH LINE# 123
|
C:0270H LINE# 132
|
||||||
------- ENDPROC INT0
|
------- ENDPROC INT0
|
||||||
------- ENDMOD CLOCK
|
------- ENDMOD CLOCK
|
||||||
|
|
||||||
------- MODULE ?C?UIDIV
|
------- MODULE ?C?UIDIV
|
||||||
C:09A9H PUBLIC ?C?UIDIV
|
C:01CFH PUBLIC ?C?UIDIV
|
||||||
------- ENDMOD ?C?UIDIV
|
------- ENDMOD ?C?UIDIV
|
||||||
|
|
||||||
******************************************************************************
|
Program Size: data=29.0 xdata=0 code=631
|
||||||
* RESTRICTED VERSION WITH 0800H BYTE CODE SIZE LIMIT; USED: 020AH BYTE (25%) *
|
|
||||||
******************************************************************************
|
|
||||||
|
|
||||||
Program Size: data=29.0 xdata=0 code=607
|
|
||||||
LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 0 ERROR(S)
|
LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 0 ERROR(S)
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -5,10 +5,10 @@
|
|||||||
<h2>Tool Versions:</h2>
|
<h2>Tool Versions:</h2>
|
||||||
IDE-Version: ¦ÌVision V5.25.3.0
|
IDE-Version: ¦ÌVision V5.25.3.0
|
||||||
Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
|
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:
|
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
|
Toolchain Path: C:\Keil_v5\C51\BIN
|
||||||
C Compiler: C51.exe V9.59.0.0
|
C Compiler: C51.exe V9.59.0.0
|
||||||
Assembler: A51.exe V8.2.7.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
|
CPU DLL: S8051.DLL V3.122.0.0
|
||||||
Dialog DLL: DP51.DLL V2.66.0.0
|
Dialog DLL: DP51.DLL V2.66.0.0
|
||||||
<h2>Project:</h2>
|
<h2>Project:</h2>
|
||||||
C:\Users\aixiao.me\Desktop\clock\c\clock.uvproj
|
C:\Users\niuyuling\Desktop\clock\c\clock.uvproj
|
||||||
Project File Date: 05/23/2018
|
Project File Date: 10/13/2018
|
||||||
|
|
||||||
<h2>Output:</h2>
|
<h2>Output:</h2>
|
||||||
Rebuild target 'Target 1'
|
Rebuild target 'Target 1'
|
||||||
assembling STARTUP.A51...
|
assembling STARTUP.A51...
|
||||||
compiling clock.c...
|
compiling clock.c...
|
||||||
linking...
|
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"...
|
creating hex file from ".\Objects\clock"...
|
||||||
".\Objects\clock" - 0 Error(s), 0 Warning(s).
|
".\Objects\clock" - 0 Error(s), 0 Warning(s).
|
||||||
Build Time Elapsed: 00:00:00
|
Build Time Elapsed: 00:00:00
|
||||||
|
@ -1,45 +1,47 @@
|
|||||||
:03000000020A4DA4
|
:0300000002027386
|
||||||
:0C0A4D00787FE4F6D8FD75811B0208F9E3
|
:0C027300787FE4F6D8FD75811B020107BE
|
||||||
:100A2200C0F9A4B0999282F880908883C6A1868E7C
|
:10024800C0F9A4B0999282F880908883C6A1868E5E
|
||||||
:080A32007FBFDFEFF7FBFDFEC3
|
:080258007FBFDFEFF7FBFDFEA5
|
||||||
:0409FE00E493F5A0E9
|
:04022400E493F5A0CA
|
||||||
:100A0200E4FDFCC3ED9FEC9E5015E4FBFA0BBB002A
|
:10022800E4FDFCC3ED9FEC9E5015E4FBFA0BBB000C
|
||||||
:0F0A1200010AEB64794A70F50DBD00010C80E418
|
:0F023800010AEB64794A70F50DBD00010C80E4FA
|
||||||
:010A210022B2
|
:010247002294
|
||||||
:10080000AE0AAF0B7C007D0A1209A98C168D17AEBB
|
:10000E00AE08AF097C007D0A1201CF8C0E8D0FAEAB
|
||||||
:100810000AAF0B7C007D0A1209A98E128F13AE104D
|
:10001E0008AF097C007D0A1201CF8E108F11AE0A37
|
||||||
:10082000AF117C007D0A1209A98C0E8D0FAE10AF9E
|
:10002E00AF0B7C007D0A1201CF8C188D19AE0AAF72
|
||||||
:10083000117C007D0A1209A98E0C8F0DAE1AAF1B18
|
:10003E000B7C007D0A1201CF8E168F17AE0CAF0D02
|
||||||
:100840007C007D0A1209A98C148D15AE1AAF1B7C91
|
:10004E007C007D0A1201CF8C148D15AE0CAF0D7C89
|
||||||
:10085000007D0A1209A98E088F0974222517F582D6
|
:10005E00007D0A1201CF8E128F137448250FF58280
|
||||||
:10086000740A3516F583E493F580900A39E493F51C
|
:10006E007402350EF583E493F58090025FE493F508
|
||||||
:10087000A07F017E00120A0275A0FF74222513F5E5
|
:10007E00A07F017E0012022875A0FF74482511F59D
|
||||||
:1008800082740A3512F583E493F580900A381209D0
|
:10008E008274023510F583E493F58090025E1202BD
|
||||||
:10089000FE75A0FF7422250FF582740A350EF583CC
|
:10009E002475A0FF74482519F58274023518F5836E
|
||||||
:1008A000E493F580900A371209FE75A0FF742225A3
|
:1000AE00E493F58090025D12022475A0FF7448253A
|
||||||
:1008B0000DF582740A350CF583E493F580900A36C1
|
:1000BE0017F58274023516F583E493F58090025C91
|
||||||
:1008C0001209FE75A0FF74222515F582740A3514ED
|
:1000CE0012022475A0FF74482515F58274023514AA
|
||||||
:1008D000F583E493F580900A351209FE75A0FF7444
|
:1000DE00F583E493F58090025B12022475A0FF7401
|
||||||
:1008E000222509F582740A3508F583E493F5809092
|
:1000EE00482513F58274023512F583E493F580905A
|
||||||
:0908F0000A341209FE75A0FF2272
|
:0900FE00025A12022475A0FF222F
|
||||||
:1008F900D2AF758901D2A9758C3C758AAF120800EF
|
:10010700D28CD2AF758901D2A9758C3C758AAF1292
|
||||||
:10090900209104D28C8045209204C28C803E209391
|
:10011700000E209104D28C805B209204C28C805404
|
||||||
:100919000FE4F50AF50BF510F511F51AF51B802C06
|
:1001270020930FE4F508F509F50AF50BF50CF50D25
|
||||||
:10092900208C132094100511E511700205102094F4
|
:100137008042208C132094100509E50970020508F8
|
||||||
:100939001B12080080F8208C13209510051BE51B5D
|
:1001470020943112000E80F8208C13209510050B97
|
||||||
:100949007002051A20950512080080F8E51964144B
|
:10015700E50B7002050A20951B12000E80F8208C13
|
||||||
:100959004518700EF518F519050BE50B703C050ADD
|
:1001670013209610050DE50D7002050C209605125B
|
||||||
:100969008038E50B643C450A700EF50AF50B051154
|
:10017700000E80F8E51B6414451A700EF51AF51B7E
|
||||||
:10097900E511702605108022E511643C4510700EC2
|
:100187000509E509703C05088038E509643C450820
|
||||||
:10098900F510F511051BE51B7010051A800CE51B08
|
:10019700700EF508F509050BE50B7026050A802298
|
||||||
:100999006418451A7004F51AF51B120800020906B5
|
:1001A700E50B643C450A700EF50AF50B050DE50DE8
|
||||||
:03000B00020A3AAC
|
:1001B7007010050C800CE50D6418450C7004F50CE7
|
||||||
:100A3A00C0E00519E51970020518758C3C758AAF76
|
:0801C700F50D12000E020116F5
|
||||||
:030A4A00D0E032C7
|
:03000B000202608E
|
||||||
:1009A900BC000BBE0029EF8DF084FFADF022E4CC32
|
:10026000C0E0051BE51B7002051A758C3C758AAF52
|
||||||
:1009B900F875F008EF2FFFEE33FEEC33FCEE9DECFB
|
:03027000D0E032A9
|
||||||
:1009C900984005FCEE9DFE0FD5F0E9E4CEFD22ED41
|
:1001CF00BC000BBE0029EF8DF084FFADF022E4CC14
|
||||||
:1009D900F8F5F0EE8420D21CFEADF075F008EF2F8B
|
:1001DF00F875F008EF2FFFEE33FEEC33FCEE9DECDD
|
||||||
:1009E900FFED33FD4007985006D5F0F222C398FD7C
|
:1001EF00984005FCEE9DFE0FD5F0E9E4CEFD22ED23
|
||||||
:0509F9000FD5F0EA2219
|
:1001FF00F8F5F0EE8420D21CFEADF075F008EF2F6D
|
||||||
|
:10020F00FFED33FD4007985006D5F0F222C398FD5D
|
||||||
|
:05021F000FD5F0EA22FA
|
||||||
:00000001FF
|
:00000001FF
|
||||||
|
Binary file not shown.
@ -1,17 +1,18 @@
|
|||||||
#include <AT89X51.H>
|
#include <AT89X51.H>
|
||||||
#define uint unsigned int
|
#define uint unsigned int
|
||||||
#define uchar unsigned char
|
#define uchar unsigned char
|
||||||
sbit led1=P1^0;
|
|
||||||
sbit k1=P1^1;
|
sbit k1=P1^1;
|
||||||
sbit k2=P1^2;
|
sbit k2=P1^2;
|
||||||
sbit k3=P1^3;
|
sbit k3=P1^3;
|
||||||
sbit k4=P1^4;
|
sbit k4=P1^4;
|
||||||
sbit k5=P1^5;
|
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 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};
|
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)
|
void times(uint z)
|
||||||
{
|
{
|
||||||
@ -20,41 +21,41 @@ void times(uint z)
|
|||||||
for(j=0; j<121; j++);
|
for(j=0; j<121; j++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void xiaoai()
|
void display()
|
||||||
{
|
{
|
||||||
ge=miao%10;
|
one=second%10;
|
||||||
shi=miao/10;
|
ten=second/10;
|
||||||
bai=fen%10;
|
hundred=minute%10;
|
||||||
qian=fen/10;
|
thousand=minute/10;
|
||||||
wan=xiaoshi%10;
|
tthousand=hour%10;
|
||||||
shiwan=xiaoshi/10;
|
oht=hour/10;
|
||||||
|
|
||||||
P0=duan[ge];
|
P0=duan[one];
|
||||||
P2=wei[7];
|
P2=wei[7];
|
||||||
times(1);
|
times(1);
|
||||||
P2=0xff;
|
P2=0xff;
|
||||||
|
|
||||||
P0=duan[shi];
|
P0=duan[ten];
|
||||||
P2=wei[6];
|
P2=wei[6];
|
||||||
times(1);
|
times(1);
|
||||||
P2=0xff;
|
P2=0xff;
|
||||||
|
|
||||||
P0=duan[bai];
|
P0=duan[hundred];
|
||||||
P2=wei[5];
|
P2=wei[5];
|
||||||
times(1);
|
times(1);
|
||||||
P2=0xff;
|
P2=0xff;
|
||||||
|
|
||||||
P0=duan[qian];
|
P0=duan[thousand];
|
||||||
P2=wei[4];
|
P2=wei[4];
|
||||||
times(1);
|
times(1);
|
||||||
P2=0xff;
|
P2=0xff;
|
||||||
|
|
||||||
P0=duan[wan];
|
P0=duan[tthousand];
|
||||||
P2=wei[3];
|
P2=wei[3];
|
||||||
times(1);
|
times(1);
|
||||||
P2=0xff;
|
P2=0xff;
|
||||||
|
|
||||||
P0=duan[shiwan];
|
P0=duan[oht];
|
||||||
P2=wei[2];
|
P2=wei[2];
|
||||||
times(1);
|
times(1);
|
||||||
P2=0xff;
|
P2=0xff;
|
||||||
@ -62,57 +63,65 @@ void xiaoai()
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
TR0=1;
|
||||||
EA=1;
|
EA=1;
|
||||||
TMOD=0x01;
|
TMOD=0x01;
|
||||||
ET0=1;
|
ET0=1;
|
||||||
TH0=(65535-50000)/256;
|
TH0=(65535-50000)/256;
|
||||||
TL0=(65535-50000)%256;
|
TL0=(65535-50000)%256;
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
xiaoai();
|
display();
|
||||||
|
|
||||||
if(k1==0)
|
if(k1==0)
|
||||||
TR0=1;
|
TR0=1;
|
||||||
else if(k2==0)
|
else if(k2==0)
|
||||||
TR0=0;
|
TR0=0;
|
||||||
else if(k3==0) {
|
else if(k3==0) {
|
||||||
miao=0;
|
second=0;
|
||||||
fen=0;
|
minute=0;
|
||||||
xiaoshi=0;
|
hour=0;
|
||||||
}
|
}
|
||||||
else if(TR0==0&&k4==0)
|
else if(TR0==0 && k4==0)
|
||||||
{
|
{
|
||||||
fen=fen+1;
|
second=second+1;
|
||||||
while(!k4) {
|
while(!k4) {
|
||||||
xiaoai();
|
display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(TR0==0&&k5==0) {
|
else if(TR0==0 && k5==0) {
|
||||||
xiaoshi=xiaoshi+1;
|
minute=minute+1;
|
||||||
while(!k5) {
|
while(!k5) {
|
||||||
xiaoai();
|
display();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(TR0==0 && k6==0) {
|
||||||
|
hour=hour+1;
|
||||||
|
while(!k6) {
|
||||||
|
display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(t==20){
|
if(t==20){
|
||||||
t=0;
|
t=0;
|
||||||
miao=miao+1;
|
second=second+1;
|
||||||
}
|
}
|
||||||
else if(miao==60) {
|
else if(second==60) {
|
||||||
miao=0;
|
second=0;
|
||||||
fen=fen+1;
|
minute=minute+1;
|
||||||
}
|
}
|
||||||
else if(fen==60) {
|
else if(minute==60) {
|
||||||
fen=0;
|
minute=0;
|
||||||
xiaoshi=xiaoshi+1;
|
hour=hour+1;
|
||||||
|
}
|
||||||
|
else if(hour==24) {
|
||||||
|
hour=0;
|
||||||
}
|
}
|
||||||
else if(xiaoshi==24)
|
|
||||||
xiaoshi=0;
|
|
||||||
|
|
||||||
xiaoai();
|
display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void int0() interrupt 1
|
void int0() interrupt 1
|
||||||
|
1868
clock/c/clock.uvgui.niuyuling
Normal file
1868
clock/c/clock.uvgui.niuyuling
Normal file
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@
|
|||||||
<ToolsetNumber>0x0</ToolsetNumber>
|
<ToolsetNumber>0x0</ToolsetNumber>
|
||||||
<ToolsetName>MCS-51</ToolsetName>
|
<ToolsetName>MCS-51</ToolsetName>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<CLK51>24000000</CLK51>
|
<CLK51>12000000</CLK51>
|
||||||
<OPTTT>
|
<OPTTT>
|
||||||
<gFlags>1</gFlags>
|
<gFlags>1</gFlags>
|
||||||
<BeepAtEnd>1</BeepAtEnd>
|
<BeepAtEnd>1</BeepAtEnd>
|
||||||
@ -176,7 +176,7 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Source Group 1</GroupName>
|
<GroupName>Source Group 1</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
@ -233,7 +233,7 @@
|
|||||||
<RCB>
|
<RCB>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<StartAddress>0x0</StartAddress>
|
<StartAddress>0x0</StartAddress>
|
||||||
<Size>0x10000</Size>
|
<Size>0xffff</Size>
|
||||||
</RCB>
|
</RCB>
|
||||||
<RXB>
|
<RXB>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
|
BIN
clock/circuit/Last Loaded clock.pdsbak
Normal file
BIN
clock/circuit/Last Loaded clock.pdsbak
Normal file
Binary file not shown.
Binary file not shown.
@ -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>
|
Loading…
Reference in New Issue
Block a user