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

📄 ht1621.c

📁 HT1621的驱动源程序。HT1621是小LCD的驱动芯片。在实际车载LCD TV系统中使用
💻 C
📖 第 1 页 / 共 2 页
字号:
void DispTimeOnLCD(void)
{
    uchar Buf[2];
    
    IRcvStr(PCF8563_ADDR,0x03,Buf,2);
    ucLCDData1 = LCD_DB_NC;
    ucLCDData2 = (Buf[1]&b00110000B)>>4;
    ucLCDData3 = (Buf[1]&b00001111B);
    ucLCDData4 = (Buf[0]&b00110000B)>>4;
    ucLCDData5 = (Buf[0]&b00001111B);
    ucLCDData6 = LCD_NC;
    
    ucLCDSegment1 &= b00010000B;//保留PLAY显示状态
    ucLCDSegment2 = 0;
    bLCD_COL = bClockFlashID;
    bLCD_DP = 0;
    bLCD_CH = 0;
    SendDataHT1621();
}
/********************************************************************************************************
 Descriptions:          display all segment to lcd according the data
                        替代SEND_DATA_HT1621,但结构不一样,这里是把LCD笔段映射内存显示到LCD上
 input parameters:      None  
 Returned value:        None
 Used global variables: None
 Calling modules:       None
 Created by:            xjj 2006/01/20
-------------------------------------------------------------------------------------------------------
 Modified by:
********************************************************************************************************/
void SendDataHT1621(void)//SEND_DATA_HT1621
{//for test
}
/********************************************************************************************************
 Descriptions:          ;送HT1621命令字节LCALL  SEND_HT1621_COMMAND
 input parameters:      None  
 Returned value:        None
 Used global variables: None
 Calling modules:       None
 Created by:            xjj 2006/01/20
-------------------------------------------------------------------------------------------------------
 Modified by:
********************************************************************************************************/
void SendHT1621Command(void)
{
    SendComA(b00000010B);//开系统振荡器         
    SendComA(b00000110B);//打开LCD偏压发生器    
    SendComA(b00110000B);//系统时钟片内振荡器   
    SendComA(b01010010B);//最后一位1/2或1/3偏压 
    SendComA(b00010000B);//关闭声音输出         
    SendComA(b10000000B);//声音4Kkz      
}
/********************************************************************************************************
 Descriptions:          在LCD(1621)上显示DVDBox信息LCALL DISP_CD_INFO_ON_LCD
 input parameters:      None  
 Returned value:        None
 Used global variables: None
 Calling modules:       None
 Created by:            xjj 2006/01/20
-------------------------------------------------------------------------------------------------------
 Modified by:
********************************************************************************************************/
void DispCDInfoOnLCD(void)
{
    ucLCDData2 = ucDiscCnt & 0x0f;//碟号计数器
    ucLCDData1 = (ucDiscCnt & 0xf0)>>4;
    
    ucLCDData5 = ucTrackCnt & 0x0f;//曲目计数器
    ucLCDData4 = (ucTrackCnt & 0xf0)>>4;

    ucLCDData3 = LCD_DOT_G;
    
    ucLCDData6 = ucCDSecCnt & 0x0f;//秒计数器

    ucLCDSegment1 = 0;//MOV 2BH,#00H
    ucLCDSegment2 = 0;//MOV 2CH,#00H
    bLCD_CD_C = 1;
    bLCD_PLAY = 1;
    bLCD_DISK = 1;
    bLCD_TRACK = 1;
    SendDataHT1621();
}
/********************************************************************************************************
 Descriptions:          在LCD(1621)上显示声音参数显示SOUND_ON_LCD_DISP
                        Called in Only CD
 input parameters:      None  
 Returned value:        None
 Used global variables: None
 Calling modules:       None
 Created by:            xjj 2006/01/20
-------------------------------------------------------------------------------------------------------
 Modified by:
********************************************************************************************************/
void SoundOnLCDDisp(void)
{
    ucLCDSegment1 &= b00010000B;//保留PLAY显示状态
    ucLCDSegment2 = 0;
    bLCD_DP = 0;
    bLCD_COL = 1;
    //判断该对哪路声音参数进行显示
    switch(ucSoundMenu)
    {
        case 0:
        {
            ucLCDData1 = LCD_DB_V;
            ucLCDData2 = LCD_0;
            ucLCDData3 = LCD_L;
            ucLCDData4 = ucVolume/10;
            ucLCDData5 = ucVolume%10;
            ucLCDData6 = LCD_NC;
            bLCD_COL = 1;
            SendDataHT1621();
            break;
        }//the end of case
        case 1:
        {
            if(ucBass == 7)
            {
                ucLCDData4 = LCD__;//显示-
                ucLCDData5 = LCD__;//显示-
            }
            else if(ucBass < 7)
            {
                ucLCDData4 = 7-ucBass;//显示-
                ucLCDData5 = LCD__;//显示-
            }
            else
            {
                ucLCDData4 = LCD__;//显示-
                ucLCDData5 = ucBass-7;//显示-
            }
            ucLCDData1 = LCD_DB_B;
            ucLCDData2 = LCD_A;
            ucLCDData3 = LCD_S;
            ucLCDData6 = LCD_NC;
            bLCD_COL = 1;
            SendDataHT1621();
            break;
        }//the end of case
        case 2:
        {
            if(ucTreble == 7)
            {
                ucLCDData4 = LCD__;//显示-
                ucLCDData5 = LCD__;//显示-
            }
            else if(ucTreble < 7)
            {
                ucLCDData4 = 7-ucTreble;//显示-
                ucLCDData5 = LCD__;//显示-
            }
            else
            {
                ucLCDData4 = LCD__;//显示-
                ucLCDData5 = ucTreble-7;//显示-
            }
            ucLCDData1 = LCD_DB_T;
            ucLCDData2 = LCD_R;
            ucLCDData3 = LCD_E;
            ucLCDData6 = LCD_NC;
            bLCD_COL = 1;
            SendDataHT1621();
            break;
        }//the end of case
        case 3:
        {
            if(ucBalanceRL == 7)
            {
                ucLCDData4 = LCD__;//显示-
                ucLCDData5 = LCD__;//显示-
            }
            else if(ucBalanceRL < 7)
            {
                ucLCDData4 = 7-ucBalanceRL;//显示-
                ucLCDData5 = LCD__;//显示-
            }
            else
            {
                ucLCDData4 = LCD__;//显示-
                ucLCDData5 = ucBalanceRL-7;//显示-
            }
            ucLCDData1 = LCD_B;
            ucLCDData2 = LCD_A;
            ucLCDData3 = LCD_L;
            ucLCDData6 = LCD_NC;
            bLCD_COL = 1;
            SendDataHT1621();
            break;
        }//the end of case
        case 4:
        {
            if(ucBalanceFB == 7)
            {
                ucLCDData4 = LCD__;
                ucLCDData5 = LCD__;
            }
            else if(ucBalanceFB < 7)
            {
                ucLCDData4 = 7-ucBalanceFB;
                ucLCDData5 = LCD__;
            }
            else
            {
                ucLCDData4 = LCD__;
                ucLCDData5 = ucBalanceFB-7;
            }
            ucLCDData1 = LCD_F;
            ucLCDData2 = LCD_A;
            ucLCDData3 = LCD_0;
            ucLCDData6 = LCD_NC;
            bLCD_COL = 1;
            SendDataHT1621();
            break;
        }//the end of case
    }//the end of switch
}
/********************************************************************************************************
 Descriptions:           ClearHT1621();//CLEAR_HT1621
 input parameters:      None  
 Returned value:        None
 Used global variables: None
 Calling modules:       None
 Created by:            xjj 2006/01/20
-------------------------------------------------------------------------------------------------------
 Modified by:
********************************************************************************************************/
void ClearHT1621(void)
{
    FillSameDataTo1621(0);
}

⌨️ 快捷键说明

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