#include
#include"stdio.h"
#include"intrins.h"
#define uint unsigned int
#define uchar unsigned char
sbit lcden=P2^7;
sbit lcdrs=P2^5;
int volt,curr;
uchar num;
uchar shi,ge,xiao1,xiao2;
uchar s,g,x1,x2;
#include"ADC.h"
#include"LCD1602.h"
void delayms(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void write_com(uchar com)
{
lcdrs=0;
P0=com;
dela