万年历源程序-可实现年月日显示及闰年闰月等很多功能。
源代码在线查看: receive.lst
C51 COMPILER V7.08 RECEIVE 12/03/2008 13:16:49 PAGE 1
C51 COMPILER V7.08, COMPILATION OF MODULE RECEIVE
OBJECT MODULE PLACED IN .\receive.obj
COMPILER INVOKED BY: D:\Program files\Keil\C51\BIN\C51.EXE G:\新建文件夹 (2)\receive.c BROWSE DEBUG OBJECTEXTEND PRINT(.
-\receive.lst) OBJECT(.\receive.obj)
line level source
1 #include
*** WARNING C318 IN LINE 1 OF G:\新建文件夹 (2)\receive.c: can't open file 'reg2051.h'
2 unsigned char tmp=0;
3 unsigned char tmp_S;
4 unsigned char data_Sen[2];
5
6 main()
7 {
8 1 unsigned char tmpData;
9 1 SCON=0x50;//模式1-8位的UART,允许接收
*** ERROR C202 IN LINE 9 OF G:\新建文件夹 (2)\RECEIVE.C: 'SCON': undefined identifier
10 1 PCON=PCON&0x7f;//SMOD置0,不加倍BAUD
*** ERROR C202 IN LINE 10 OF G:\新建文件夹 (2)\RECEIVE.C: 'PCON': undefined identifier
11 1 //ES=1;
12 1 EA=1;//开启串行中断
*** ERROR C202 IN LINE 12 OF G:\新建文件夹 (2)\RECEIVE.C: 'EA': undefined identifier
13 1 TH1=0xF3;TL1=0xF3;//定时器初值
*** ERROR C202 IN LINE 13 OF G:\新建文件夹 (2)\RECEIVE.C: 'TH1': undefined identifier
*** ERROR C202 IN LINE 13 OF G:\新建文件夹 (2)\RECEIVE.C: 'TL1': undefined identifier
14 1 TMOD=0x20;//定时器1,定时方式2
*** ERROR C202 IN LINE 14 OF G:\新建文件夹 (2)\RECEIVE.C: 'TMOD': undefined identifier
15 1 TCON=0x40;//启动定时器1
*** ERROR C202 IN LINE 15 OF G:\新建文件夹 (2)\RECEIVE.C: 'TCON': undefined identifier
16 1
17 1
18 1
19 1 while(1)
20 1 {
21 2 while(P3_7==0); //等待有效信号
*** ERROR C202 IN LINE 21 OF G:\新建文件夹 (2)\RECEIVE.C: 'P3_7': undefined identifier
22 2 switch(tmp)
23 2 {
24 3 case 0:
25 3 data_Sen[0]=P1&0x0f;
*** ERROR C202 IN LINE 25 OF G:\新建文件夹 (2)\RECEIVE.C: 'P1': undefined identifier
26 3 tmp++;
27 3 break;
28 3 case 1:
29 3 tmpData=(P1&0x0f) *** ERROR C202 IN LINE 29 OF G:\新建文件夹 (2)\RECEIVE.C: 'P1': undefined identifier
30 3 data_Sen[0]=tmpData+data_Sen[0];
31 3
32 3 SBUF=data_Sen[0];while(TI==0);TI=0;
*** ERROR C202 IN LINE 32 OF G:\新建文件夹 (2)\RECEIVE.C: 'SBUF': undefined identifier
*** ERROR C202 IN LINE 32 OF G:\新建文件夹 (2)\RECEIVE.C: 'TI': undefined identifier
*** ERROR C202 IN LINE 32 OF G:\新建文件夹 (2)\RECEIVE.C: 'TI': undefined identifier
33 3 tmp++;
34 3 break;
35 3 case 2:
36 3 data_Sen[1]=P1&0x0f;
*** ERROR C202 IN LINE 36 OF G:\新建文件夹 (2)\RECEIVE.C: 'P1': undefined identifier
37 3 tmp++;
38 3 break;
39 3 case 3:
C51 COMPILER V7.08 RECEIVE 12/03/2008 13:16:49 PAGE 2
40 3 tmpData=(P1&0x0f) *** ERROR C202 IN LINE 40 OF G:\新建文件夹 (2)\RECEIVE.C: 'P1': undefined identifier
41 3 data_Sen[1]=tmpData+data_Sen[1];
42 3
43 3 SBUF=data_Sen[1];while(TI==0);TI=0;
*** ERROR C202 IN LINE 43 OF G:\新建文件夹 (2)\RECEIVE.C: 'SBUF': undefined identifier
*** ERROR C202 IN LINE 43 OF G:\新建文件夹 (2)\RECEIVE.C: 'TI': undefined identifier
*** ERROR C202 IN LINE 43 OF G:\新建文件夹 (2)\RECEIVE.C: 'TI': undefined identifier
44 3 tmp=0;
45 3 break;
46 3 }
47 2 while(P3_7==1);//等待有效信号释放
*** ERROR C202 IN LINE 47 OF G:\新建文件夹 (2)\RECEIVE.C: 'P3_7': undefined identifier
48 2 }
49 1 }
50 //void data_send()
51 //{
52 // SBUF=data_Sen[0];while(TI==0);TI=0;
53 // SBUF=data_Sen[1];while(TI==0);TI=0;
54 //}
C51 COMPILATION COMPLETE. 1 WARNING(S), 19 ERROR(S)