2024-12-30 15:29:57 +08:00
|
|
|
|
C51 COMPILER V9.60.7.0 MAIN 12/28/2024 14:20:14 PAGE 1
|
2023-07-12 15:15:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C51 COMPILER V9.60.7.0, COMPILATION OF MODULE MAIN
|
|
|
|
|
OBJECT MODULE PLACED IN .\Objects\main.obj
|
2024-12-30 15:29:57 +08:00
|
|
|
|
COMPILER INVOKED BY: D:\software\KEIL51\C51\BIN\C51.EXE main.c OPTIMIZE(8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\Listi
|
|
|
|
|
-ngs\main.lst) TABS(2) OBJECT(.\Objects\main.obj)
|
2023-07-12 15:15:16 +08:00
|
|
|
|
|
|
|
|
|
line level source
|
|
|
|
|
|
|
|
|
|
1 #include <reg52.h>
|
|
|
|
|
2 #include <intrins.h>
|
|
|
|
|
3
|
|
|
|
|
4 sfr P3M0 = 0xb2;
|
|
|
|
|
5 sfr P3M1 = 0xb1;
|
|
|
|
|
6 sfr P5M0 = 0xca;
|
|
|
|
|
7 sfr P5M1 = 0xc9;
|
|
|
|
|
8
|
|
|
|
|
9 sfr P5 = 0xc8;
|
|
|
|
|
10
|
|
|
|
|
11 sbit negative = P3^3;
|
|
|
|
|
12 sbit positive = P3^2;
|
|
|
|
|
13 sbit synchronous = P5^5;
|
|
|
|
|
14 void Delay1ms() //@30.000MHz
|
|
|
|
|
15 {
|
|
|
|
|
16 1 unsigned char i, j;
|
|
|
|
|
17 1
|
|
|
|
|
18 1 _nop_();
|
|
|
|
|
19 1 _nop_();
|
|
|
|
|
20 1 i = 39;
|
|
|
|
|
21 1 j = 243;
|
|
|
|
|
22 1 do
|
|
|
|
|
23 1 {
|
|
|
|
|
24 2 while (--j);
|
|
|
|
|
25 2 } while (--i);
|
|
|
|
|
26 1 }
|
|
|
|
|
27
|
|
|
|
|
28
|
2024-12-30 15:29:57 +08:00
|
|
|
|
29 void Delay500us() //@30.000MHz
|
2023-07-12 15:15:16 +08:00
|
|
|
|
30 {
|
2024-12-30 15:29:57 +08:00
|
|
|
|
31 1 unsigned char i, j;
|
|
|
|
|
32 1
|
|
|
|
|
33 1 _nop_();
|
|
|
|
|
34 1 _nop_();
|
|
|
|
|
35 1 i = 39;
|
|
|
|
|
36 1 j = 121;
|
|
|
|
|
37 1 do
|
|
|
|
|
38 1 {
|
|
|
|
|
39 2 while (--j);
|
|
|
|
|
40 2 } while (--i);
|
|
|
|
|
41 1 }
|
|
|
|
|
42
|
|
|
|
|
43 void delay_ms(unsigned int ms)
|
|
|
|
|
44 {
|
|
|
|
|
45 1 unsigned int a ;
|
|
|
|
|
46 1 for (a = 0;a<ms;a++)
|
|
|
|
|
47 1 {
|
|
|
|
|
48 2 Delay1ms();
|
|
|
|
|
49 2 }
|
|
|
|
|
50 1 }
|
|
|
|
|
51
|
|
|
|
|
52
|
|
|
|
|
53 void main(void)
|
|
|
|
|
54 {
|
|
|
|
|
C51 COMPILER V9.60.7.0 MAIN 12/28/2024 14:20:14 PAGE 2
|
2023-07-12 15:15:16 +08:00
|
|
|
|
|
2024-12-30 15:29:57 +08:00
|
|
|
|
55 1 P3M0 = 0xff;
|
|
|
|
|
56 1 P3M1 = 0x00;
|
|
|
|
|
57 1 P5M0 = 0xff;
|
|
|
|
|
58 1 P5M1 = 0x00; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
|
|
|
|
|
59 1
|
|
|
|
|
60 1 while(1)
|
|
|
|
|
61 1 {
|
|
|
|
|
62 2 positive = 1;
|
|
|
|
|
63 2 negative = 0;
|
|
|
|
|
64 2 synchronous = 0;
|
|
|
|
|
65 2 delay_ms(2000);
|
|
|
|
|
66 2
|
|
|
|
|
67 2 positive = 0; //<2F>ŵ<EFBFBD>
|
|
|
|
|
68 2 synchronous = 0;
|
|
|
|
|
69 2 delay_ms(10);
|
|
|
|
|
70 2
|
|
|
|
|
71 2 positive = 0;
|
|
|
|
|
72 2 negative = 1;
|
|
|
|
|
73 2 synchronous = 1;
|
|
|
|
|
74 2 delay_ms(2000);
|
|
|
|
|
75 2
|
|
|
|
|
76 2 negative = 0; //<2F>ŵ<EFBFBD>
|
|
|
|
|
77 2 synchronous = 1;
|
|
|
|
|
78 2 delay_ms(10);
|
|
|
|
|
79 2 }
|
|
|
|
|
80 1
|
|
|
|
|
81 1 }
|
2023-07-12 15:15:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MODULE INFORMATION: STATIC OVERLAYABLE
|
2024-12-30 15:29:57 +08:00
|
|
|
|
CODE SIZE = 108 ----
|
2023-07-12 15:15:16 +08:00
|
|
|
|
CONSTANT SIZE = ---- ----
|
|
|
|
|
XDATA SIZE = ---- ----
|
|
|
|
|
PDATA SIZE = ---- ----
|
|
|
|
|
DATA SIZE = ---- ----
|
|
|
|
|
IDATA SIZE = ---- ----
|
|
|
|
|
BIT SIZE = ---- ----
|
|
|
|
|
END OF MODULE INFORMATION.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
|