烟雾报警器制作过程及相关程序
//程序头函数
#include
//宏定义
#define uint unsigned int
#define uchar unsigned char
#define Data_ADC0809 P1
//管脚声明
sbit Feng = P3^0;
//ADC0809
sbit ST=P3^3;
sbit EOC=P3^4;
sbit OE=P3^2;
//按键
sbit Key1=P3^5;
sbit Key2=P3^6;
sbit Key3=P3^7;
//显示数组 0-9+F
uchar Data_[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x71,0x3f};
sbit Wei1 = P2^7;
sbit Wei2 = P2^6;
sbit Wei3 = P2^5;
sbit Wei4 = P2^4;
//函数声明
extern uchar ADC0809();
void Display(uchar X,uchar Data);
void delay(uint t);
//酒精含量变量
<