dat=0x0f;
ZLG7289_Download0(0,4,0,dat);//译码方式0
dat=0x0f;
ZLG7289_Download0(0,5,0,dat);//译码方式0
}
/***************************************************
//电流显示
void ad0display (void)
{
dat=result0%10;//
ZLG7289_Download(1,0,0,dat);
dat=result0/1000;
ZLG7289_Download(1,3,0,dat);
result0=result0/10;
dat=result0%10;
ZLG7289_Download(1,1,0,dat);
result0=result0/10;
dat=result0%10;
ZLG7289_Download(1,2,0,dat);
dat=0;
ZLG7289_Download(1,4,0,dat);
dat=0;
ZLG7289_Download(1,5,0,dat);
}
/*********************************************/
void cdisplay (void)//电容显示
{
dat=resultc%10;//
ZLG7289_Download(1,0,0,dat);
resultc=resultc/10;
dat=resultc%10;
ZLG7289_Download(1,1,0,dat);
resultc=resultc/10;
dat=resultc%10;
ZLG7289_Download(1,2,1,dat);
resultc=resultc/10;
dat=resultc%10;
ZLG7289_Download(1,3,0,dat);
resultc=resultc/10;
dat=resultc%10;
if (dat==0)
dat=0x0f;
ZLG7289_Download(0,4,0,dat);
dat=resultc/10;
if (dat==0)///当最高位为0时不显示
dat=0x0f;
//else
//dat=dat;
ZLG7289_Download(0,5,0,dat);
}
void addisplay0 (void)//上电显示0
{uchar i;
dp=0;
dat=0;
for (i=0;i<6;i++)
{
ZLG7289_Download0(1,i,dp,dat);
}
}
void autoflashdisplay (void)////自动闪烁显示
{
uchar n;
//用不译码的方式显示自己定义的数据
for ( n=0; n<6; n++ )
{
dp = 0;
dat = autodat[n];//;;;;;;
x=5-n;
{
ZLG7289_Download(2,x,dp,dat);
dat = 0x00;//闪烁控制,为1不闪烁
ZLG7289_Flash(dat);
}
}
}
void autounflashdisplay (void)//自动不闪烁显示
{
uchar n;
//用不译码的方式显示自己定义的数据
for ( n=0; n<6; n++ )
{
dp = 0;
dat = autodat[n];//;;;;;;
x=5-n;
{
ZLG7289_Download(2,x,dp,dat);
dat = 0xFF;//闪烁控制,为1不闪烁
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-39167-37.html
我们就要爆头