-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathT.LST
More file actions
85 lines (76 loc) · 2.55 KB
/
T.LST
File metadata and controls
85 lines (76 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
C51 COMPILER V9.01 T 08/22/2013 19:38:03 PAGE 1
C51 COMPILER V9.01, COMPILATION OF MODULE T
OBJECT MODULE PLACED IN T.OBJ
COMPILER INVOKED BY: e:\Keil\C51\BIN\C51.EXE T.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include"stc12c5a60s2.h"
2 #include"HJ12864.h"
3
4 sbit EN = P0^2;
5 sbit CW = P0^1;
6 sbit CK = P0^0;
7
8
9 #define timer0_setting 300
10
11
12 //1ms延时函数
13 //实测有极小误差 在11.0592M晶振的stc12c5a60s2单片机上
14 void delay_ms(uint16 n)
15 {
16 1 uint8 x,y;
17 1 for(;n>0;n--)
18 1 for(x=25;x>0;x--)
19 1 for(y=100;y>0;y--)
20 1 ;
21 1 }
22
23 /*
24 void main(void)
25 {
26 EN = 0;
27 CW = 1;
28 CK = 0;
29 TH0 = (65536-timer0_setting)/256;
30 TL0 = (65536-timer0_setting)%256;
31 TMOD = 0x01;
32 EA = 1;
33 ET0 = 1;
34 TR0 = 1;
35 while(1)
36 {
37 delay_ms(200);
38 CW = ~CW;
39 }
40 }
41
42 void timer0_interrupt(void) interrupt 1
43 {
44 TH0 = (65536-timer0_setting)/256;
45 TL0 = (65536-timer0_setting)%256;
46 CK = ~CK;
47 }
48 */
49
50
51 void main(void)
52 {
53 1 ufloat a=0,i;
54 1 for(i=0;i<10;i++)
55 1 {
C51 COMPILER V9.01 T 08/22/2013 19:38:03 PAGE 2
56 2 a++;
57 2 }
58 1 while(1);
59 1
60 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 118 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 8
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)