C51 COMPILER V8.02 串行通信_发送籣 09/18/2008 09:47:17 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE 串行通信_发送籣
OBJECT MODULE PLACED IN 串行通信_发送机.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 串行通信_发送机.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include
2 #define uchar unsigned char
3 uchar code jiang[] = {0x24,0xC4,0x84,0x04,0xF4,
4 0x8F,0x84,0x44,0xB4,0x2F,0x24,0xA4,0x64,0x04,0x04,0x00,
5 0x08,0x19,0x04,0x02,0xFF,0x04,0x04,0x36,0x06,0x45,
6 0x85,0x7E,0x04,0x04,0x04,0x00};
7 uchar i = 1,flag;
8 void init_com();
9 void delay(uchar x);
10 void main()
11 {
12 1
13 1 init_com();
14 1 TI = 0;
15 1 SBUF = jiang[0];
16 1 while (1);
17 1 }
18
19 void init_com()
20 {
21 1 delay(200);
22 1 EA = 0;
23 1 SCON = 0xc0;
24 1 TMOD = 0x20;
25 1 PCON = 0x00;
26 1 TR1 = 1;
27 1 ES = 1;
28 1 ET1 = 0;
29 1 TH1 = 0xfd;
30 1 EA = 1;
31 1 flag = 0;
32 1 }
33
34 void com_interrupt() interrupt 4
35 {
36 1 TI = 0;
37 1 if (flag == 1)
38 1 {
39 2 // flag = 0;
40 2 return;
41 2 }
42 1 else
43 1 {
44 2 // delay(2);
45 2 SBUF = jiang[i];
46 2 i++;
47 2 if (i >= 32)
48 2 {
49 3 i = 0; flag = 1;
50 3 }
51 2
52 2 }
53 1 }
54 void delay(uchar x)
55 {
C51 COMPILER V8.02 串行通信_发送籣 09/18/2008 09:47:17 PAGE 2
56 1 uchar i,j;
57 1 for (i = 0; i < x; i++)
58 1 for (j = 0; j < 110; j++);
59 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 109 ----
CONSTANT SIZE = 32 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 2 ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)