欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

display.lst

完成数据的采集
LST
第 1 页 / 共 5 页
字号:
    506          	  		WriteASCIIChar(addrs,b,'.',0);
    507          	  	}else
    508          	  	{
    509          	  		WriteASCIIChar(addrs+1,32,32,0);
    510          	  		WriteASCIIChar(addrs,32,32,0);
    511          	  	}	  	
    512          		}
    513          }
    514          ////////////////////////////////
    515          void	 Disp_Table(Int16U *point,volatile Int16U n,Int16U m)
    516          {
    517          	Int16U a,b;
    518          	Int8U  x,addr;
    519          	if(n&0x4)n=1;
    520          	else     n=0;
    521          	addr=0x93,b=m;
    522          	switch(m&7)
    523          	{
    524          		case 1:
    525          			Disp_Table_Sub(point,0x93,n);
    526          			break;
    527          		case 2:
    528          			point+=4;
    529          			Disp_Table_Sub(point,0x93,n);
    530          			break;
    531          		case 3:			
    532          			Disp_Table_Sub(point,0x93,n);
    533          			point+=4;
    534          			Disp_Table_Sub(point,0x8b,n);
    535          			break;
    536          		case 4:
    537          			point+=8;
    538          			Disp_Table_Sub(point,0x93,n);
    539          			break;
    540          		case 5:
    541          			Disp_Table_Sub(point,0x93,n);
    542          			point+=8;
    543          			Disp_Table_Sub(point,0x8b,n);
    544          			break;	
    545          		case 6:
    546          			point+=4;
    547          			Disp_Table_Sub(point,0x93,n);
    548          			point+=4;
    549          			Disp_Table_Sub(point,0x8b,n);
    550          			break;
    551          	 case 7:			 
    552          			Disp_Table_Sub(point,0x93,n);
    553          			point+=4;
    554          			Disp_Table_Sub(point,0x8b,n);
    555          			point+=4;
    556          			Disp_Table_Sub(point,0x9b,n);
    557          			break;
    558          	}
    559          	
    560          #if 0	
    561          	if(m&1)b=0xFFFE;
    562          	else 
    563          	if(m&2)point+=4,b=0xFFFD;
    564          	else
    565          	if(m&4)point+=8,b=0xFFFB;	
    566          	if(m!=0)		
    567          	Disp_Table_Sub(point,0x93,n);
    568          	m&=b;
    569                  
    570          	if(m&2)point+=4,b=0xFFFD;
    571          	else
    572          	if(m&4)point+=8,b=0xFFFB;	
    573          	if(m!=0)
    574          	Disp_Table_Sub(point,0x8b,n);
    575          	m&=b;
    576            
    577            if(m&1)     
    578          	if(m&4)point+=8;       
    579          	if((m&4)!=0)
    580          	Disp_Table_Sub(point,0x9b,n);
    581          #endif
    582          }
    583          ///////////////////////////////
    584          Int16U display_Fault(Int16U _Over,Int16U _Fast,Int16U _Room,Int16U _Low,Int16U _Fault)
    585          {
    586          	Int16U i,ii,iii,n,m;
    587          	iii=m=0;
    588            if( _Over||_Fast||_Room||_Low||_Fault)WriteChar(0x81,6,TAB_FAU);
    589          	else     WriteChar(0x92,5,NOFAULT_TAB);
    590          		
    591          	for(i=0;i<C_RF_MAX_COUNT;++i)	
    592          	{
    593          		ii=1<<i;
    594          		if((_Fault&1)&&((ii&iii)==0))
    595          			{
    596          				iii|=ii;
    597          				if(++m>=4)return 0;
    598          				if(m==1)n=0x90;
    599          				if(m==2)n=0x88;
    600          				if(m==3)n=0x98;
    601          				WriteOneChar(n,TAB_FAU_D[i],0);
    602          				WriteChar(++n,6,TAB_FAU_C);
    603          			}
    604          		_Fault>>=1;
    605          		if((_Over&1)&&((ii&iii)==0))
    606          			{
    607          				iii|=ii;
    608          				if(++m>=4)return 0;
    609          				if(m==1)n=0x90;
    610          				if(m==2)n=0x88;
    611          				if(m==3)n=0x98;
    612          				WriteOneChar(n,TAB_FAU_D[i],0);
    613          				WriteChar(++n,6,TAB_OVER_C);
    614          			}
    615          		 _Over>>=1;
    616          		 if((_Room&1)&&((ii&iii)==0))
    617          			{
    618          				iii|=ii;
    619          				if(++m>=4)return 0;
    620          				if(m==1)n=0x90;
    621          				if(m==2)n=0x88;
    622          				if(m==3)n=0x98;
    623          				WriteOneChar(n,TAB_FAU_D[i],0);
    624          				WriteChar(++n,7,TAB_Room_C);
    625          			}
    626          		 _Room>>=1;
    627          		 if((_Fast&1)&&((ii&iii)==0))
    628          			{
    629          				iii|=ii;
    630          				if(++m>=4)return 0;
    631          				if(m==1)n=0x90;
    632          				if(m==2)n=0x88;
    633          				if(m==3)n=0x98;
    634          				WriteOneChar(n,TAB_FAU_D[i],0);
    635          				WriteChar(++n,6,TAB_Fast_C);
    636          			}
    637          		 _Fast>>=1;
    638          		 if((_Low&1)&&((ii&iii)==0))
    639          			{
    640          				iii|=ii;
    641          				if(++m>=4)return 0;
    642          				if(m==1)n=0x90;
    643          				if(m==2)n=0x88;
    644          				if(m==3)n=0x98;
    645          				WriteOneChar(n,TAB_FAU_D[i],0);
    646          				WriteChar(++n,6,TAB_Low_C);
    647          			}
    648          		 _Low>>=1;
    649          	}	
    650          	return 0;
    651          }		
    652          		
    653          
    654          ///////////////////////////////
    655          void WritePicture(Int16U *pos)
    656          {
    657            Int16U a,b,c,TempData;
    658               
    659            for(a=0;a<0x20;a++)
    660            {
    661              	LCMCmd(0x34);        // 8bit I/F, extend command
    662              	LCMCmd(0x80|a);      // Y address
    663              	LCMCmd(0x80);        // X address
    664              	        // 8bit I/F, basic command, graphic on
    665                	for(b=0;b<8;b++)
    666               		{   		 	 
    667               			c=a*8+b;
    668               			TempData=*(pos+c);
    669               			LCMData(TempData>>8);     			 
    670               			LCMData(TempData&0xff);     		
    671           		    }
    672           		    for(b=0;b<8;++b)
    673           		    {
    674           		    	  c=(a+32)*8+b;
    675           		    	  TempData=*(pos+c);
    676           		    		LCMData(TempData>>8);     			 
    677               			  LCMData(TempData&0xff);   
    678           		    }
    679           		    
    680           		    
    681              }
    682              LCMCmd(0x30); 
    683              LCMCmd(0x1); 
    684              LCMCmd(0x36);     
    685          }
    686          ///////////////////////////////
    687          //disp_line(History[0].Spacecount,History[0].ATemper,Ddata->_Yorder);
    688          //////////////////////////////
    689          void disp_line(Int8U His_Space,Int8U *p,volatile Int16U DIV1,Int8U x)
    690          {
    691          	Int16U b,a,c,d,e,f,g;
    692            Int16U LineReg[512];
    693            //if(DIV>=18)DIV=0;
    694            for(a=0;a<512;++a)LineReg[a]=ORDER_TAB[a];
    695            LineReg[15]=TAB_1[x];
    696            LineReg[23]=TAB_2[x];
    697            LineReg[31]=TAB_3[x];
    698            LineReg[39]=TAB_4[x];
    699            LineReg[47]=TAB_5[x];
    700            LineReg[55]=TAB_6[x];
    701            LineReg[63]=TAB_7[x];
    702            LineReg[71]=TAB_8[x];
    703           LineReg[8]|=TAB_DIV1[DIV1];
    704           LineReg[16]|=TAB_DIV2[DIV1];
    705           LineReg[24]|=TAB_DIV3[DIV1];
    706           LineReg[32]|=TAB_DIV4[DIV1];
    707           LineReg[40]|=TAB_DIV5[DIV1];
    708           LineReg[48]|=TAB_DIV6[DIV1];
    709           LineReg[56]|=TAB_DIV7[DIV1];
    710           LineReg[64]|=TAB_DIV8[DIV1];
    711           DIV1=LINE_DIV_TAB[DIV1];
    712            c=*p;
    713          	if(c>=0xfe)c=0;
    714            c*=10;
    715            c/=DIV1;//Y轴
    716          	if(c>50)c=50;
    717          	for(a=0;a<His_Space;++a)
    718          	{
    719          		 b=*p;
    720          		 if(b>=0xfe)b=0;
    721               b*=10;
    722          		 b/=DIV1;//Y轴
    723          		 if(b>50)b=50;
    724          		 	
    725          		 
    726          		 if(b>=c)
    727          		 {
    728          		 	e=ORDER_TABX[a];//列
    729          		  f=ORDER_TABXBIT[a];//位	
    730          		  for(g=c;g<=b;++g)
    731          		  {
    732          		  	d=8*(58-g)+e;
    733          		 	 LineReg[d]|=f;
    734          		  }
    735          		 }else
    736          		 if(b<c)
    737          		 {
    738          		  d=8*(58-b)+ORDER_TABX[a];//列
    739          		 	LineReg[d]|=ORDER_TABXBIT[a];//位	
    740          		  
    741          		 	e=ORDER_TABX[a-1];//列
    742          		  f=ORDER_TABXBIT[a-1];//位	
    743          		  for(g=b;g<=c;++g)
    744          		  {
    745          		  	d=8*(58-g)+e;
    746          		 	  LineReg[d]|=f;
    747          		  }
    748          		 }
    749               c=b,p++;
    750          	}
    751          	 WritePicture(&LineReg[0]);
    752          }
    753          ////////////////////////////////
    754          ////////////////////////////////
    755          //disp_Timer(&Year[0],Ddata->_A_Tembuf,Ddata->_A_RHbuf)
    756          Int8U  disp_Timer(Int8U *p,Int16U temp,Int16U rh,Int8U *pos,Int16U m)
    757          {
    758            Int16U a;
    759          	if(*pos==1||(m!=0))
    760          		{
    761          			if(*pos==1)
    762          			{
    763          				LCMCmd(0x30); 
    764          				LCMCmd(0x1);
    765          				
    766          			} 
    767          			 LCMCmd(0x2);      
    768          			 WriteChar(0x90,4,TEM_TAB);
    769          			  WriteChar(0x81,5,RH_TAB);
    770          			if(temp<0xfe)
    771                                  {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -