⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 displcd.c

📁 PHIPHS液晶驱动代码,芯片为8562,其他芯片与此类似,无非是地址不同
💻 C
字号:

#include"INCLUDE.H"

void DisplayFlash(unsigned char *dispbuf)
{
    //ISendByte(HT6024,0xc8);  
    ISendByte(HT6024,0xe0);    
    ISendByte(HT6024,0x58);
    ISendByte(HT6024,0x60);    
    ISendStr(HT6024,0x00,dispbuf,12);
}
void DisplayAll(void)
{unsigned char i;
 for(i=0;i<12;i++)DispBuf[i] = 0xFF;
 DisplayFlash(DispBuf);
}
void DisplayPingGuPowerCnt(void)
{
 /*========================================================================================================*/       
         IntToBcd(PingPowerCntL,&UniverArray[0],2);
         if((WriteUnLock_EN==1)||(HardWare==0))
         {
         if((!Flash_EN)||QYBZ)
	      {DispBuf[11] = Led_Seg[UniverArray[0]/16]+SEG_X;}     /* 1th Line 6Bit */
         else
          {DispBuf[11] = Led_Seg[UniverArray[0]/16];}
         }
         else
          {DispBuf[11] = Led_Seg[UniverArray[0]/16]+SEG_X;}
          
	     DispBuf[10] = Led_Seg[UniverArray[1]%16]+SEG_X;     /* 1th Line 5Bit */
	     if(BatteryVolLowFlag_EN)
	      // {
	      //  if((!Flash_EN)||QYBZ)
	          {DispBuf[9]  = Led_Seg[UniverArray[1]/16]+SEG_X;}
	      //  else
	      //    {DispBuf[9]  = Led_Seg[UniverArray[1]/16];}
	      // }   /* 1th Line 4Bit */
	       else {DispBuf[9]  = Led_Seg[UniverArray[1]/16];}
         IntToBcd(PingPowerCntH,&UniverArray[2],2);
	     DispBuf[8]  = Led_Seg[UniverArray[2]%16];           /* 1th Line 3Bit */
	     DispBuf[7]  = Led_Seg[UniverArray[2]/16];           /* 1th Line 2Bit */
	     DispBuf[6]  = Led_Seg[UniverArray[3]%16];           /* 1th Line 1Bit */
 /*========================================================================================================*/       
         IntToBcd(GuPowerCntL,&UniverArray[0],2);
	     DispBuf[5] = Led_Seg[UniverArray[0]/16]+SEG_X;      /* 2th Line 6Bit */
	     DispBuf[4] = Led_Seg[UniverArray[1]%16]+SEG_X;      /* 2th Line 5Bit */
	     DispBuf[3]  = Led_Seg[UniverArray[1]/16]+SEG_X;     /* 2th Line 4Bit */
         IntToBcd(GuPowerCntH,&UniverArray[2],2);
	     DispBuf[2]  = Led_Seg[UniverArray[2]%16];           /* 2th Line 3Bit */
	     DispBuf[1]  = Led_Seg[UniverArray[2]/16];           /* 2th Line 2Bit */
	     DispBuf[0]  = Led_Seg[UniverArray[3]%16]+SEG_X;     /* 2th Line 1Bit */
 /*========================================================================================================*/            
         DisplayFlash(DispBuf);
}
/************************************************** The End **************************************************************/

⌨️ 快捷键说明

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