基于STC90C51单片机+XPT2046设计的室内空气净化系统软件DEMO软件例程源码资料
#include
#include "XPT2046.h"
typedef unsigned char uint8;
typedef unsigned int uint16;
sbit rs=P2^6; // 数据命令选择
sbit rw=P2^5; //读写选择
sbit e=P2^7; //使能
sbit k1=P3^3; //模式
sbit k2=P2^1; //加
sbit k3=P2^2; //减
sbit moto=P3^6;
sbit beep=P3^7;
uint8 mode=0;
char temph=20;
uint8 temp,flag;
uint8 code num[10]="0123456789";
uint8 code str1[]="GAS:";
uint8 code str2[]="SET:";
void delay(uint16 i)
{
while(i--);
}
void wrc(uint8 c)