110VCGQ/project/power_C51/project51/Listings/main.lst

94 lines
2.7 KiB
Plaintext
Raw Normal View History

2023-07-12 14:20:59 +08:00
C51 COMPILER V9.60.7.0 MAIN 04/24/2023 14:56:26 PAGE 1
2023-04-21 17:47:03 +08:00
C51 COMPILER V9.60.7.0, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN .\Objects\main.obj
COMPILER INVOKED BY: D:\Keil_v5\C51\BIN\C51.EXE main.c OPTIMIZE(8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\Listings\main
-.lst) TABS(2) OBJECT(.\Objects\main.obj)
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
29 void delay_ms(unsigned int ms)
30 {
31 1 unsigned int a ;
32 1 for (a = 0;a<ms;a++)
33 1 {
34 2 Delay1ms();
35 2 }
36 1 }
37
38
39 void main(void)
40 {
41 1 P3M0 = 0xff;
42 1 P3M1 = 0x00;
43 1 P5M0 = 0xff;
44 1 P5M1 = 0x00; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
45 1
46 1 while(1)
47 1 {
48 2 positive = 1;
49 2 negative = 0;
50 2 synchronous = 1;
51 2 delay_ms(2000);
52 2
53 2 positive = 0; //<2F>ŵ<EFBFBD>
54 2 synchronous = 0;
2023-07-12 14:20:59 +08:00
C51 COMPILER V9.60.7.0 MAIN 04/24/2023 14:56:26 PAGE 2
2023-04-21 17:47:03 +08:00
55 2 delay_ms(100);
56 2
57 2 positive = 0;
58 2 negative = 1;
59 2 synchronous = 0;
60 2 delay_ms(2000);
61 2
62 2 negative = 0; //<2F>ŵ<EFBFBD>
63 2 synchronous = 1;
64 2 delay_ms(100);
65 2 }
66 1
67 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 97 ----
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)