www.pudn.com > pd16682(2006).zip > INIT.C


/*****************************/ 
/*  初始化函数:init()         */ 
/*  内部调用子程序:WriteCommand(),WriteData() */ 
/*  程序调用入口:init()      */ 
/*  程序调用变量:无         */ 
/*****************************/ 
void init() 
  { _nop_(); 
    _nop_(); 
    CS1=0; 
    _nop_(); 
    _nop_(); 
    RES=1; 
    _nop_(); 
    _nop_(); 
    RES=0; 
    _nop_(); 
    _nop_(); 
    _nop_(); 
    _nop_(); 
    RES=1; 
   WriteCommand(0xe2); 
   WriteCommand(0xa3); //LCD偏压 1/9 
   WriteCommand(0xa0); //ADC 
   WriteCommand(0xc0); //Common Output Status Select 
   WriteCommand(0x24); //倍压 
 
   WriteCommand(0x81); //设电压 
   WriteCommand(0x20); 
 
   WriteCommand(0x2f); 
   WriteCommand(0xaf); 
   WriteCommand(0xa4); 
 
  }