CN100414982C - 基于单片机的电视机低功耗待机控制方法 - Google Patents

基于单片机的电视机低功耗待机控制方法 Download PDF

Info

Publication number
CN100414982C
CN100414982C CNB2006100447824A CN200610044782A CN100414982C CN 100414982 C CN100414982 C CN 100414982C CN B2006100447824 A CNB2006100447824 A CN B2006100447824A CN 200610044782 A CN200610044782 A CN 200610044782A CN 100414982 C CN100414982 C CN 100414982C
Authority
CN
China
Prior art keywords
mouth
level
signal
standby
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CNB2006100447824A
Other languages
English (en)
Other versions
CN1885931A (zh
Inventor
王立平
施志峰
徐爱臣
孙有新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Co Ltd
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Group Co Ltd
Qingdao Hisense Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Group Co Ltd, Qingdao Hisense Electronics Co Ltd filed Critical Hisense Group Co Ltd
Priority to CNB2006100447824A priority Critical patent/CN100414982C/zh
Publication of CN1885931A publication Critical patent/CN1885931A/zh
Application granted granted Critical
Publication of CN100414982C publication Critical patent/CN100414982C/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Selective Calling Equipment (AREA)
  • Television Receiver Circuits (AREA)
  • Details Of Television Systems (AREA)

Abstract

一种基于单片机的电视机低功耗待机控制方法。包括检测上次关闭时是“开机”还是“待机”;若为“待机”,通过COUT口监控来自遥控接收器的输出信号;接收到“开机”信号后,GP4口输出高电平,蓝色指示灯亮,并将当前开机状态存储;监控来自按键的输出信号;若为“开机”状态,则蓝色指示灯亮,检测来自遥控接收器的输出信号,接收到“待机”信号后,间隔10ms读取GP0的输入电平两次,若两次分别为高、低电平,驱动红色指示灯亮,将当前待机状态存储;同时延时3秒;全过程中GP0口一旦检测到下降沿信号,都通过GP4口输出低电平,将当前待机状态存储、延时3秒等步骤。它待机电源功耗小,控制方法可将待机功耗降至0.3W。

Description

基于单片机的电视机低功耗待机控制方法
技术领域
本发明属于电视机技术领域,更明确地说涉及基于单片机的电视机低功耗待机控制方法的改进。
背景技术
为给电视用户提供方便、同时又尽最太限度降低电视机的待机功耗,原有的依靠主芯片实现待机控制功能的情况并不理想。不理想的原因在于原有待机电源本身的功耗相对太太,而改用功耗小的又满足不了主芯片的工作要求。解决的方法只能是在改用小功耗的待机电源的同时,增加合适的控制电路,实现电视机的低功耗待机。
发明内容
本发明的目的,就在于克服上述缺点和不足,提供一种基于单片机的电视机低功耗待机控制方法。它是在使用小功耗的待机电源的同时,采用一种行之有效的低功耗待机控制方法,在不增加成本的前提下,实现更低的待机功耗。其节能效果好,可广泛应用于各种电视机中。
为了达到上述目的,本发明以单片机控制待机电源的继电器,包括以下步骤:
(1)单片机上电复位后,通过其GP0口检测主芯片指定I/O口输入电平状态,同时通过程序读取E2PROM,检测电视机在上次电源关闭时是处于“开机”还是“待机”状态;
(2)若为“待机”状态,则通过GP1口输出高电平,驱动红色指示灯亮,并执行以下分步骤:
A、通过COUT口监控来自遥控接收器的输出信号,接收到“开机”信号后,通过GP4口输出高电平,同时将GP1口电平拉低用以驱动蓝色指示灯亮,并将当前开机状态存储到E2PROM;
B、通过GP3口监控来自按键的输出信号,接收到“开机”信号后,通过GP4口输出高电平,同时将GP1口电平拉低用以驱动蓝色指示灯亮,并将当前开机状态存储到E2PROM;
(3)若为“开机”状态,则通过GP1口输出低电平驱动蓝色指示灯亮,并执行以下分步骤:
C、
①通过GP2口检测来自遥控接收器的输出信号,接收到“待机”信号后,同时读取GP0口的输入电平两次,其间隔时间为10ms,若第一次为高电平,第二次为低电平,则通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM;
②同时调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应;
③对其它情况,程序不执行任何操作;
D、通过GP3口检测来自按键的输出信号,接收到“待机”信号后,执行下述步骤:
④同时读取GP0口的输入电平两次,其间隔时间为10ms,若第一次为高电平,第二次为低电平,则通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM;
⑤同时调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应;
⑥对其它情况,程序不执行任何操作;
E、在单片机工作的全过程中,GP0口一旦检测到一个下降沿信号,无论有无来自遥控或按键的控制信号,都通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM,同时要调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应。
单片机为PIC12F675型。
单片机的GP4口输出低电平时,控制主电源的继电器处于断开状态,主电源不工作。单片机的GP4口输出高电平时,控制主电源的继电器处于闭合状态,主电源工作。
上电后此低功耗待机控制电路即开始工作,不掉电不停止工作。正常工作时程序一直处于循环中。电视机所处的“待机”或“开机”状态存储于E2PROM中,掉电也不丢失。
本发明的任务就是这样完成的。
本发明是在使用小功耗的待机电源的同时,采用一种行之有效的低功耗待机控制方法,在不增加成本的前提下,实现更低的待机功耗。其节能效果好,待机功耗可降低至0.3W左右。可广泛应用于各种电视机中。
附图说明
图1为本发明单片机PIC12F675的电路连接图。
图2为本方法的流程图。
具体实施方式
实施例1。一种基于单片机的电视机低功耗待机控制方法,如图1~图2所示。本方法以单片机控制待机电源的继电器,包括以下步骤:
(1)单片机上电复位后,通过其GP0口检测主芯片某脚(I/O口)的输入电平状态,同时通过程序读取E2PROM,检测电视机在上次电源关闭时是处于“开机”还是“待机”状态;
(2)若为“待机”状态,则通过GP1口输出高电平,驱动红色指示灯亮,并执行以下分步骤:
①通过COUT口监控来自遥控接收器的输出信号,接收到“开机”信号后,通过GP4口输出高电平,同时将GP1口电平拉低用以驱动蓝色指示灯亮,并将当前开机状态存储到E2PROM;
②通过GP3口监控来自按键的输出信号,接收到“开机”信号后,执行上述①步骤;
(3)若为“开机”状态,则通过GP1口输出低电平驱动蓝色指示灯亮,并执行以下分步骤:
①通过GP2口检测来自遥控接收器的输出信号,接收到“待机”信号后,同时读取GP0口的输入电平两次,其间隔时间为10ms,若第一次为高电平,第二次为低电平,则通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM;
②同时调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应;
③对其它情况,程序不执行任何操作;
④通过GP3口检测来自按键的输出信号,接收到“待机”信号后,执行下述步骤:
a、同时读取GP0口的输入电平两次,其间隔时间为10ms,若第一次为高电平,第二次为低电平,则通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM;
b、同时调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应;
c、对其它情况,程序不执行任何操作;
(4)在单片机工作的全过程中,GP0口一旦检测到一个下降沿信号,无论有无来自遥控或按键的控制信号,都通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM,同时要调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应。
单片机为PIC12F675型。
实施例1是在使用小功耗的待机电源的同时,采用一种行之有效的低功耗待机控制方法,在不增加成本的前提下,实现更低的待机功耗。其节能效果好,待机功耗可降低至0.3W左右。可广泛应用于各种电视机中。
本实施例的源代码如下:
                                           lcd_pwrctr_1216[4]
/**********************************************************************
*                                                                     *
*        Hisense LCD Power Controller
*
*    Author:Glenn Fan                                                 *
*                                                                     *
*    Filename:    PowerController.c                                       *
*    Date:        29/11/05                                            *
*    File Version:1.00                                                *
*                                                                     *
*    Tools used: Hitech PICC 8.05                                     *
*                                                                     *
**********************************************************************/
/*                                     PIC12F629-I/P
                           |///////|  |////////|
                       |        \/         |
       VDD        -|-1 VDD             VSS 8-  | ---  VSS
       NC              <--  |-2GP5             GP0 7- | <--   T_INT
       RLY_ONR    <--|-3 GP4           GP1 6-  | -->  LED
       KEY_PWR    -->|-4 GP3           GP2 5-  | <--  REMOTE
                            |                                |
                               |///////////////////|
*/
#include      <pic.h>
_CONFIG(WDTEN & PWRTEN & BORDIS & MCLRDIS & UNPROTECT & INTIO),
//---------------PORT Defination---------------------------
#define T_INT_PORT            GPIO0
#define LED_PORT              GPIO1
#define REMOTE_PORT           GPIO2
#define KEY_PWR_PORT  GPIO3
#define RLY_ON_PORT           GPIO4
//-----------------Constant Defination---------------------
#define T_BASE                56
//-----------------Variable Defination---------------------
volatile unsigned char SysStatus,
volatile unsigned char t_4ms,
volatile unsigned char t1_4ms,
volatile unsigned char t2_4ms;
volatile unsigned char t_Sec;
volatile unsigned char remoteByteCnt,
volatile unsigned char remoteBitCnt,
volatile unsigned char remoteStep,
volatile union
{
        unsigned int remoteTW,
        struct
        {
                unsigned char remoteTL,
                unsigned char remoteTH,
        }remoteTD,
}remoteTU,
#define remoteTime_L    remoteTU.remoteTD.remoteTL
#define remoteTime_H    remoteTU.remoteTD.remoteTH
#define remoteTime              remoteTU.remoteTW
volatile unsigned char remoteData[4],
volatile union
{
        unsigned char mSysStatus,
        struct
        {
               unsigned RUNON                           :1,
               unsigned POWER                           :1,
                                           lcd_pwrctr_1216[4]
                unsigned IR_RC5_START          :1;
                unsigned EN_REMOTE_DECODE      :1,
                unsigned T_HIGH                         :1,
                unsigned                                        :3,
        }sysStatusBits,
}uSysStatus,
#define bRUNON                           uSysStatus.sysStatusBits.RUNON
#define bPOWER                           uSysStatus.sysStatusBits.POWER
#define bIR_RC5_START            uSysStatus.sysStatusBits.IR_RC5_START
#define bEN_REMOTE_DECODE        uSysStatus.sysStatusBits.EN_REMOTE_DECODE
#define bT_HIGH                          uSysStatus.sysStatusBits.T_HIGH
#define sysStatus        uSysStatus.mSysStatus
//-----------------Function Defination---------------------
void Initial_RAM(void),
void Initial_FSR(void),
void Enhance_Immunlty(void),
void Remote_Receive(void),
void Re_Start_Receive_Remote(void),
void Remote_Decode(void),
void Key_Detect(void),
void T_INT_Detect(void),
void PowerOn(void),
void Standby(void),
void Delay(unsigned char x,unsigned char y),
//-----------------Initial RAM-----------------------------
//---------------------------------------------------------
void Initial_RAM(void)
{
        for(FSR=0x20,FSR<=0x5f,FSR++)
        {
                 asm(″CLRF 0″),
        }
}
//-----------------Initial FSR------------------------------
//----------------------------------------------------------
void Initial_FSR(void)
{
//Clear INT
        OPTION=0b00000011,//PORTA pull-ups is enabled,TMR0 1:16 prescaler
        TRISIO=0b00001101;
        WPU=0b00000000,
        IOCB=0b00000000,
        VRCON=0b00000000,
        INTCON=0b01100000,//Enable PEIE,T0IE
        TMR0=0,
        PIR1=0;
        TMR1L=0,
        TMR1H=0,
        T1CON=0,
        CMCON=0b00000111,//all digital IO
//      ADRESH=0,
//      ADCONO=0b00000000;
//Initial PORT
//      GPIO=0b00000010,
        GPIO=0b00000000,
//      ANSEL=0b10000000,//AN7->AD
//      ADCON1=0b0101000,//FOSC/16
}
//-----------------Enhance Immunity------------------------
//---------------------------------------------------------
void Enhance_Immunity(void)
{
        OPTION=0b00000011;//PORTA pull-ups is enabled,TMR0 1:16 prescaler
        TRISIO=0b00001101;
        T0IE=1,
                                            lcd_pwrctr_1216[4]
        PEIE=1,
        GIE=1,
}
//-----------------Interrupt-------------------------------
//---------------------------------------------------------
void interrupt Int_Serve(void)
{
        if(T0IF)
        {
               T0IF=0,
               t_4ms++,
               t1_4ms++;
               t2_4ms++;
               if(t_4ms>=250)
               {
                       t_4ms=0,
                       t_Sec++,
               }
        }
        else if(TMR1IF)
        {
               TMR1IF=0;
        }
}
//-----------------Remote Data Receive---------------------
//----------------------------------------------------------
void Remote_Receive(void)
{
uns igned char remoteDataTmp=0,
        if(bPOWER)
        {
                Re_Start_Receive_Remote(),
                return,
        }
        if(!bIR_RC5_START)
        {
                if(REMOTE_PORT)return,
                TMR1L=0,
                TMR1H=0,
                TMR1IF=0;
                TMR1IE=1;
                TMR1ON=1;
                t1_4ms=0;
                CLRWDT();
                while(!REMOTE_PORT)//等待高电平
                {
                         if(t1_4ms>=4)
                         {
                                 Re_Start_Receive_Remote(),
                                 return,
                         }
                 }
                 remoteTime_L=TMR1L,
                 remoteTime_H=TMR1H,
能有效
                 if(remoteTime>150*T_BASE && remoteTime<170*T_BASE)//17T>高电平时同>15T  数据头可
                   {
                         CLRWDT(),
                         while(REMOTE_PORT)//等待低电平
                         {
                                 if(t1_4ms>=4)
                                 {
                                         Re_Start_Receive_Remote(),
                                         return,
                                 }
                         }
                         remoteTime_L=TMR1L,
                         remoteTime_H=TMR1H,
                         if(remoteTime>225*T_BASE && remoteTime<255*T_BASE)//25.5T>高电平时间>22.5T
数据头有效
                         {
                                  lcd_pwrctr_1216[4]
                      //添加开始接收数据程序
                      for(remoteByteCnt=0,remoteByteCnt<4,remoteByteCnt++)
                      {
                              for(remoteBitCnt=0;remoteBitCnt<8,remoteBitCnt++)
                              {
                                      TMR1L=0,
                                      TMR1H=0;                          //重新开始计时
                                      CLRWDT(),
                                      t1_4ms=0,
                                      while(!REMOTE_PORT)//等待高电平
                                      {
                                               if(t1_4ms>=4)
                                               {
                                                      Re_Start_Receive_Remote(),
                                                      return,
                                               }
                                      }
                                      while(REMOTE_PORT)//等待低电平
                                      {
                                              if(t1_4ms>=4)
                                              {
                                                      Re_Start_Receive_Remote();
                                                      return,
                                              }
                                      }
                                      remoteTime_L=TMR1L,
                                      remoteTime_H=TMR1H,
//为1                                 if(remoteTime>34*T_BASE && remoteTime<46*T_BASE)
                                      {
                                              CARRY=0,
                                              remoteDataTmp>>=1,
                                              remoteDataTmp+=0x80;
                                      }
                                      else if(remoteTime>14*T_BASE&&remoteTime<24*T_BASE)//为
0
                                      {
                                              CARRY=0,
                                              remoteDataTmp>>=1,
                                      }
                              }
                              remoteData[remoteByteCnt]=remoteDataTmp,
                              remoteBitCnt=0;
                      }
                      bEN_REMOTE_DECODE=1,//接收数据完毕允许解码
              }
              else            //可能为重码,不接收数据
              {
                      Re_Start_Receive_Remote(),
              }
      }
      else if((remoteTime<=1300)&&(remoteTime>=500))//RC5数据头
      {
              CLRWDT(),
              bIR_RC5_START=1,//开始遥控接收RC5码
              TMR1IF=0,
              TMR1L=0,
              TMR1H=0,
              remoteStep=1,
      }
      else            //数据头不正确继续重新开始
      {
              Re_Start_Receive_Remote(),
      }
 }
 else
 {
      switch(remoteStep)
      {
              case 1:  case  3:   case  5:  case  7:  case  9:
              case 11:  case 13:  case 15:  case 17:  case 19:
              case 21:
                      t1_4ms=0,
                      while(REMOTE_PORT)
                      {
                    lcd_pwrctr_1216[4]
                if(t1_4ms>=4)
                {
                        Re_Start_Receive_Remote(),
                        return,
                }
        }
        remoteTime_L=TMR1L,
        remoteTime_H=TMR1H,
        TMR1L=0,
        TMR1H=0,
        if(remoteStep==17)
        {
                if((remoteTime<=2200)&&(remoteTime>=1400))
                {
                        remoteStep++,
                }
                else
                {
                        Re_Start-Receive_Remote(),
                }
        }
        else
        {
                if((remoteTime<=1300)&&(remoteTime>=500))
                {
                        remoteStep++,
                }
                else
                {
                        Re_Start_Receive_Remote(),
                }
        }
        break,
case 2:        case 4:   case 6:   case 8:   case 10:
case 12:       case 14:  case 16:  case 18:  case 20:
case 22:
        t1_4ms=0,
        while(!REMOTE_PORT)
        {
                 if(t1_4ms>=4)
                 {
                        Re_Start_Receive_Remote(),
                        return,
                 }
        }
        remoteTime_L=TMR1L,
        remoteTime_H=TMR1H,
        TMR1L=0,
        TMR1H=0,
        if(remoteStep==20)
        {
                if((remoteTime<=2200)&&(remoteTime>=1400))
                {
                        remoteStep++,
                }
                else
                {
                        Re_Startar_Receive_Remote(),
                }
        }
        else if((remoteStep==2)||(remoteStep==4))
        {
                remoteStep++,
        }
        else
        {
                if((remoteTime<=1300)&&(remoteTime>=500))
                {
                        remoteStep++,
                }
                else
                {
                        Re_Start_Receive_Remote(),
                }
        }
                                           lcd_pwrctr_1216[4]
                               break,
                       default:
                               bPOWER=1,
                               Re_Start_Receive_Remote(),
                               break,
                }
        }
}
//-----------------Re Start Receive Remote-----------------
//---------------------------------------------------------
void Re_Start_Receive_Remote(void)
{
        bIR_RC5_START=0,
        TMR10N=0;     //停止TMR1
        TMR1L=0,
        TMR1H=0,
        TMR1IF=0,
        TMR1IE=0,
}
//-----------------Remote_Decode---------------------------
//---------------------------------------------------------
void Remote_Decode(void)
{
        if(!bEN_REMOTE_DECODE)return,
        bEN_REMOTE_DECODE=0,
        if((remoteData[1]==0xBF||remoteData[0]==0xFC)&&remoteData[0]==0x00)//用户码正确
        {
                if(remoteData[2]==0x10&&remoteData[3]==0xEF)//是电源键
                {
                        bPOWER=1,
                }
        }
        remoteData[3]=0,
        remoteData[2]=0,
        remoteData[1]=0,
        remoteData[0]=0,
}
//-----------------Key Detect------------------------------
//---------------------------------------------------------
void Key_Detect(void)
{
        if(bPOWER)return,
        if(!KEY_PWR_PORT)
        {
                 if(t_4ms>9)
                 {
                         t_4ms=0,
                         bPOWER=1,
                 }
        }
        else t_4ms=0,
}
//-----------------T_INT Detect------------------------------
//-----------------------------------------------------------
void T_INT_Detect(void)
{
        if(!bRUNON)   return,
        if(T_INT_PORT) {bT_HIGH=1,t2_4ms=0,}
        else
        {
               if(bT_HIGH)
               {
                       while(!T_INT_PORT)
                       {
                                CLRWDT(),
                                if(t2_4ms>1)
                                {
                                             lcd_pwrctr_1216[4]
                                         t2_4ms=0,
                                         bT_HIGH=0,
                                         bPOWER=1,
                                         return,
                                 }
                         }
                 }
        }
}
//------------------Read EEPROM-----------------------------
//----------------------------------------------------------
void ReadEEPROM(void)
{
        EEADR=0,
        RD=1,
}
//-----------------Write EEPROM-----------------------------
//----------------------------------------------------------
void WriteEEPROM(unsigned char value)
{
        EEADR=0;
        EEDATA=value,
        WREN=1,
        GIE=0,
        EECON2=0x55,
        EECON2=0xaa,
        WR=1,
        GIE=1,
        while(WR)continue,
        WREN=0,
}
//-----------------Power On--------------------------------
//---------------------------------------------------------
void PowerOn(void)
{
        bPOWER=0,
        RLY_ON_PORT=1,
        LED_PORT=0,
        GPIO5=1,
        bRUNON=1,
        WriteEEPROM(0xa5);
}
//-----------------Standby---------------------------------
//---------------------------------------------------------
void Standby(void)
{
        bPOWER=0,
        RLY_ON_PORT=0,
        LED_PORT=1,
        GPIO5=0,
        bRUNON=0,
        WriteEEPROM(0),
}
//-----------------Delay------------------------------------
//----------------------------------------------------------
void Delay(unsigned char x,unsigned char y)
{       //delay  time=14+(13*Y-1)+7*(X-1)
unsigned char z,
        do
        {
                z=y,
                do{,}
                while(--z),
        }
        while(--x),
                                           lcd_pwrctr_1216[4]
}
//-----------------Main Function---------------------------
//---------------------------------------------------------
void main(void)
{
        OSCCAL=_READ_OSCCAL_DATA(),
        Initial_RAM(),
        Initial_FSR(),
        CLRWDT(),
        ReadEEPROM(),
        if(EEDATA==0xa5)
        {
                RLY_ON_PORT=1;
                LED_PORT=0,
                GPIO5=1,
                bRUNON=1,
        }
        else
        {
                RLY_ON_PORT=0,
                LED_PORT=1,
                GPIO5=0,
                bRUNON=0,
        }
Loop:
        CLRWDT(),
        Enhance_Immunity(),
        if(bRUNON)
        {
                T_INT_Detect(),
                if(bPOWER)
                {
                        Standby(),
                        t_4ms=0,
                        t_Sec=0;
                        while(t_Sec<3){CLRWDT(),}    //delay 3 second
                        t_4ms=0,
                }
        }
        else
        {
                Key_Detect(),
                Remote_Receive(),
                Remote_Decode(),
                if(bPOWER)
                {
                        PowerOn(),
                        t_4ms=0;
                        t_Sec=0,
                        while(t_Sec<3){CLRWDT(),}    //delay 3 second
                        t_4ms=0,
                }
        }
/*      T_INT_Detect(),
        Key_Detect(),
        Remote_Receive(),
        Remote_Decode(),
        if(bPOWER)
        {
                bPOWER=0,
                if(bRUNON)             //开机状态
                {
                        Standby(),    //执行待机
                        t_4ms=0,
                        t_Sec=0,
                        while(t_Sec<3){CLRWDT(),}    //delay 3 second
                        t_4ms=0,
                }
                else                   //待机状态
                {
                        PowerOn(),    //执行开机
                        t_4ms=0,
                        t_Sec=0,
                                        lcd_pwrctr_1216[4]
                   while(t_Sec<3) {CLRWDT(),}      //delay 3 second
                   t_4ms=0,
             }
     }
*/
     goto Loop,
}

Claims (2)

1. 一种基于单片机的电视机低功耗待机控制方法,它以单片机控制待机电源的继电器,其特征在于包括以下步骤:
(1)单片机上电复位后,通过其GP0口检测主芯片指定I/O口的输入电平状态,同时通过程序读取E2PROM,检测电视机在上次电源关闭时是处于“开机”还是“待机”状态;
(2)若为“待机”状态,则通过GP1口输出高电平,驱动红色指示灯亮,并执行以下分步骤:
A、通过COUT口监控来自遥控接收器的输出信号,接收到“开机”信号后,通过GP4口输出高电平,同时将GP1口电平拉低用以驱动蓝色指示灯亮,并将当前开机状态存储到E2PROM;
B、通过GP3口监控来自按键的输出信号,接收到“开机”信号后,通过GP4口输出高电平,同时将GP1口电平拉低用以驱动蓝色指示灯亮,并将当前开机状态存储到E2PROM;
(3)若为“开机”状态,则通过GP1口输出低电平驱动蓝色指示灯亮,并执行以下分步骤:
C、
①通过GP2口检测来自遥控接收器的输出信号,接收到“待机”信号后,同时读取GP0口的输入电平两次,其间隔时间为10ms,若第一次为高电平,第二次为低电平,则通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM;
②同时调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应;
③对其它情况,程序不执行任何操作;
D、通过GP3口检测来自按键的输出信号,接收到“待机”信号后,执行下述步骤:
④同时读取GP0口的输入电平两次,其间隔时间为10ms,若第一次为高电平,第二次为低电平,则通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM;
⑤同时调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应;
⑥对其它情况,程序不执行任何操作;
E、在单片机工作的全过程中,GP0口一旦检测到一个下降沿信号,无论有无来自遥控或按键的控制信号,都通过GP4口输出低电平,同时将GP1口电平拉高驱动红色指示灯亮,并将当前待机状态存储到E2PROM,同时要调用延时程序实现3秒钟的延时,延时期间不对按键及遥控信号响应。
2. 按照权利要求1所述的基于单片机的电视机低功耗待机控制方法,其特征在于所说的单片机为PIC12F675型。
CNB2006100447824A 2006-06-12 2006-06-12 基于单片机的电视机低功耗待机控制方法 Active CN100414982C (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100447824A CN100414982C (zh) 2006-06-12 2006-06-12 基于单片机的电视机低功耗待机控制方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100447824A CN100414982C (zh) 2006-06-12 2006-06-12 基于单片机的电视机低功耗待机控制方法

Publications (2)

Publication Number Publication Date
CN1885931A CN1885931A (zh) 2006-12-27
CN100414982C true CN100414982C (zh) 2008-08-27

Family

ID=37583879

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100447824A Active CN100414982C (zh) 2006-06-12 2006-06-12 基于单片机的电视机低功耗待机控制方法

Country Status (1)

Country Link
CN (1) CN100414982C (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937383A (zh) * 2009-06-29 2011-01-05 深圳Tcl新技术有限公司 开机进度指示装置及其指示开机进度的方法
CN106707891B (zh) * 2017-02-20 2019-01-22 安徽师范大学 一种极低功耗的遥控接收和按键响应电路
CN108040292B (zh) * 2017-11-21 2021-01-12 深圳创维-Rgb电子有限公司 电视待机开机方法、电视及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2419765Y (zh) * 2000-02-02 2001-02-14 海信集团公司 低功耗待机电视机电源
CN1435997A (zh) * 2002-11-22 2003-08-13 张文忠 电视机低功耗待机电路
US20050231870A1 (en) * 2004-04-20 2005-10-20 Fujitsu Limited Power saving control method and device in electronic device, and power saving electronic device
CN2755883Y (zh) * 2004-12-17 2006-02-01 康佳集团股份有限公司 低待机功耗的电视机
CN1735168A (zh) * 2004-08-13 2006-02-15 Tcl王牌电子(深圳)有限公司 一种电视机的低功耗待机电路

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2419765Y (zh) * 2000-02-02 2001-02-14 海信集团公司 低功耗待机电视机电源
CN1435997A (zh) * 2002-11-22 2003-08-13 张文忠 电视机低功耗待机电路
US20050231870A1 (en) * 2004-04-20 2005-10-20 Fujitsu Limited Power saving control method and device in electronic device, and power saving electronic device
CN1735168A (zh) * 2004-08-13 2006-02-15 Tcl王牌电子(深圳)有限公司 一种电视机的低功耗待机电路
CN2755883Y (zh) * 2004-12-17 2006-02-01 康佳集团股份有限公司 低待机功耗的电视机

Also Published As

Publication number Publication date
CN1885931A (zh) 2006-12-27

Similar Documents

Publication Publication Date Title
CN2884600Y (zh) 电视空调智能遥控节电插座
CN101470412B (zh) 降低电子装置功耗的方法及电子装置
CN101197979B (zh) 一种数字电视接收机的节能待机系统
CN1925584A (zh) 一种数字电视接收机的节能系统及方法
CN201063382Y (zh) 一种家用电器智能待机节电插座
CN104333785A (zh) 一种基于蓝牙的电视或电视盒子开关机方法
CN103347210A (zh) 通过hdmi接口实现状态同步的方法和机顶盒
CN100414982C (zh) 基于单片机的电视机低功耗待机控制方法
CN102938851B (zh) 一种基于机顶盒的自动待机处理方法及机顶盒
CN101729830B (zh) 具有混合待机模式的音视频设备及其实现方法
KR20040079474A (ko) 전원제어 기능을 갖는 홈게이트웨이 시스템
CN201601765U (zh) 一种电视机电源控制装置、电视机及系统
CN202331059U (zh) 电器及其待机控制装置和控制系统
CN105376645A (zh) 一种机顶盒及其降低功耗的方法
CN105323618A (zh) 机顶盒操作方法、装置及机顶盒
CN102281467B (zh) 机顶盒待机和定时开关机控制装置
CN2881771Y (zh) 电器待机控制装置
CN101715090A (zh) 一种机顶盒和电视机同步开关机的实现方法
CN101202867A (zh) 一种定时录制方法、装置及数字电视接收终端
CN109688445A (zh) 一种电视显示控制方法、存储介质及电视
CN106707891B (zh) 一种极低功耗的遥控接收和按键响应电路
CN202353741U (zh) 一种节电机顶盒
CN207674687U (zh) 一种可远程遥控的冷风机控制器
CN205430515U (zh) 机顶盒红外遥控电源控制器
CN101557486A (zh) 电视机延时关机的实现方法

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: HISENSE Co.,Ltd.

Patentee after: Hisense Visual Technology Co., Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE Co.,Ltd.

Patentee before: QINGDAO HISENSE ELECTRONICS Co.,Ltd.