完整版 电路图和程序代码 下载地址
https://pan.baidu.com/s/1hsYcSeUrXzy0O_PwYhmGOA?pwd=3456
部分代码展示
//程序头文件
#include <reg51.h>
//显示函数头文件
#include <display.h>
//宏定义
#define uint unsigned int
#define uchar unsigned char
#define Data_ADC0809 P1 //定义Data_ADC0809为P1口
//管脚声明
sbit LED_R= P2^2; //红灯
sbit LED_Y= P2^1; //黄灯
sbit LED_G= P2^0; //绿灯
sbit Feng = P2^5; //蜂鸣器
sbit san=P3^4; //风扇
//ADC0809
sbit ST=P3^3;
sbit EOC=P3^6;
sbit OE=P3^2;
//按键
sbit Key1=P2^6; //设置键
sbit Key2=P2^7; //加键
sbit Key3=P3^7; //减键
//函数声明
extern uchar ADC0809();
extern void Key();
void de