?? yuyin.lst
字號:
C51 COMPILER V7.06 YUYIN 05/31/2007 05:04:56 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE YUYIN
OBJECT MODULE PLACED IN yuyin.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE yuyin.c LARGE
stmt level source
1 #include "reg52.h"
2 #include "string.h"
3 #include <stdio.h>
4 #define uchar unsigned char
5 #define uint unsigned int
6 #include "lcd.h"
7 sbit PLAY =P3^2;
8 //sbit RECORD =P1^6;
9
10 sbit A0 = P1^0;
11 sbit A1= P1^1;
12 sbit A2 = P1^2;
13 sbit A3 = P1^3;
14 sbit A4 = P1^4;
15 sbit A5 = P1^5;
16 sbit A6 = P1^6;
17 sbit A7 = P1^7;
18
19
20 unsigned char address;
21
22 #define LOW 0
23 #define HIGH 1
24 #define TRUE 1
25 #define FALSE 0
26
27 //#define SET_PLAY 0x00
28 //#define SET_RECORD 0x00
29
30
31 //;您的體溫是
32 #define TEXT2 0x68 //;體溫正常
33 #define TEXT3 0x78 //;危險
34 //#define TEXT4 0xb0
35 #define ERROR 0X98
36
37 #define ZERO 0x00
38 #define ONE 0x08
39 #define TWO 0x10
40 #define THREE 0x18
41 #define FOUR 0x20
42 #define FIVE 0x28
43 #define SIX 0x30
44 #define SEVEN 0x38
45 #define EIGHT 0x40
46 #define NINE 0x48
47 #define TEN 0x50
48 #define DU 0x58
49 #define POINT 0x60
50
51
52
53 //*******************延時子程序***********************
54 void delays10ms(void)
55 {
C51 COMPILER V7.06 YUYIN 05/31/2007 05:04:56 PAGE 2
56 1 unsigned char i;
57 1 for(i=0;i<250;i++);
58 1
59 1 //for(j=0;j<10;j++);
60 1 }
61
62 void delay500ms(void)
63 {
64 1 unsigned char i,j;
65 1 /*for(i=0;i<250;i++);
66 1
67 1 for(j=0;j<50;j++);*/
68 1 for(i=0;i<250;i++)
69 1 for(j=0;j<250;j++);
70 1
71 1 }
72 void delay1s(int n)
73 {
74 1 unsigned char i,j;
75 1 for(;n>0;n--)
76 1 for(i=0;i<250;i++)
77 1 for(j=0;j<250;j++);
78 1 }
79 char AudioAddr[]={
80 0x00,//0
81 0x08,//1
82 0x10,//2
83 0x18,//3
84 0x20,//4
85 0x28,//5
86 0x30,//6
87 0x38,//7
88 0x40,//8
89 0x48,//9
90 0x50,//10
91 0x58, //du
92 0x60,//dot
93 };
94
95 xdata char play_char[11];
96 xdata char play_step=0;
97
98 void start_alm(void)
99 {
100 1 char i=0;
101 1 play_step=0;
102 1 timer0_count2 = timer0_count2_CNST = 150;
103 1 timer0_tick2 = 0;
104 1 play_char[0]=0x68;
105 1 play_char[1]=0x68;
106 1 play_char[2]=0x68;
107 1 play_char[3]=0;
108 1 play_char[4]=0;
109 1 }
110 void startplay(void)///long int tt)
111 {
112 1 char i=0;
113 1 play_step=0;
114 1 timer0_count2 = timer0_count2_CNST = 100;
115 1 timer0_tick2 = 0;
116 1 Get_t_Str();
117 1 strcpy(play_char,s);
C51 COMPILER V7.06 YUYIN 05/31/2007 05:04:56 PAGE 3
118 1 i=strlen(s);
119 1 play_char[i++]=DU;
120 1 if(tt>Alm_t)
121 1 {
122 2 LCD_WStr(0x80,"--超溫!-- ");
123 2 play_char[i++]=0x68;
124 2 play_char[i++]=0x68;
125 2 play_char[i++]=0x68;
126 2 }
127 1 else LCD_WStr(0x80, " ");
128 1 play_char[i++]=0;
129 1 play_char[i++]=0;
130 1
131 1
132 1 }
133
134 void radio_play(void)
135 {
136 1 char addr,c;
137 1 if(!timer0_tick2) return;
138 1 if(play_step>10) return;
139 1 c=play_char[play_step];
140 1 if(c==0) return; //end
141 1 if(c=='.') addr=POINT;
142 1 else if(c>='0' && c<='9')
143 1 {
144 2 c =c- 0x30;
145 2 addr=AudioAddr[c];
146 2 }
147 1 else if(c==DU) addr=c;
148 1 else if(c==0x68) addr=0x68;
149 1 else
150 1 {
151 2 play_step++;
152 2 timer0_count2=100;
153 2 timer0_tick2=0;
154 2 return;
155 2 }
156 1 P1=addr;
157 1 delays10ms();
158 1 PLAY=HIGH;
159 1 delays10ms();
160 1 PLAY=LOW;
161 1 delays10ms();
162 1
163 1 play_step++;
164 1 timer0_count2=100;
165 1 timer0_tick2=0;
166 1 }
167
168
169
170
171
172
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 508 ----
CONSTANT SIZE = 36 ----
XDATA SIZE = 26 2
PDATA SIZE = ---- ----
C51 COMPILER V7.06 YUYIN 05/31/2007 05:04:56 PAGE 4
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -