百度网盘下载地址(992):点击下载
#include<reg51.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
/***************引脚声明*********************/
#define lcd P0
sbit rs=P2^7; //LCD液晶控制端
sbit en=P2^6;
sbit SPK=P1^7; //蜂鸣器引脚
sbit CS=P1^2; //将CS位定义为P1.2引脚
sbit CLK=P1^0; //将CLK位定义为P1.0引脚
sbit DIO=P1^1; //将DIO位定义为P1.1引脚
sbit key=P2^5; //定义按键引脚
sbit a=P2^0; //模拟量通道选择端
sbit b=P2^1; //模拟量通道选择端
sbit c=P2^2; //模拟量通道选择端
sbit LED = P3^7;
sbit LED1 = P3^6;
/***********LCD显示数组**************************/
uchar table1[]="V=0.00V";
uchar table3[]="I=0.00A";
uchar table5[]="PO=000%";
/***************全局变量************************/
uchar flag=0; //换挡标志位
void delay(uint count) //延时
{
uint i,j;