AT89C51芯片数控直流电源 第5页
void ZLG_SendBuf(unsigned char * disp_buf,unsigned char num)
{
unsigned char i;
for(i=0;i
{
ZLG_SendCmd(0x60+i,*disp_buf);
disp_buf++;
}
}
unsigned char ZLG7290_GetKey()
{
unsigned char rece;
rece=0;
IRcvStr(zlg,1,&rece,1);
delayMS(10);
return rece;
}
#include "REG52.h"
#include
#include
#include "VIIC_C51.h"
#include "ZLG7290.h"
sbit KEY_INT=P3^2;
sbit key1=P3^1;
sbit key2=P3^0;
unsigned char disp_buf[5]={0,0,0,0,0};
unsigned char display(unsigned char *sd)
{
disp_buf[0] = sd[0];
disp_buf[1] = sd[1];
disp_buf[2] = sd[2];
disp_buf[3] = sd[3];
disp_buf[4] = sd[4];
ZLG7290_SendBuf(disp_buf,5);
return 0;
}
unsigned char delay(unsigned char j)
{
unsigned char k,l;
for(l=0;l<=j;l++)
for(k=0;k<=
www.youerw.com
unsigned char rd[5]={00,00,00,00,00};
unsigned char key;
delay(1000);
delay(1000);
while(1)
{
delay(100);
delay(1000);
delay(1000);
delay(250);
key1=0;
key2=1;
while(key1==0)
{ delay(1000);
display(rd);
if(KEY_INT==0)
{
key=ZLG_GetKey();
switch(key)
{
case 1 : rd[0]++;
if(rd[0]==10)
{
rd[0]=00;
} break;
case 2 : rd[1]++;
if(rd[1]==10)
{
rd[1]=00;
} break;
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页
AT89C51芯片数控直流电源 第5页下载如图片无法显示或论文不完整,请联系qq752018766