STM32-TFTLCD

Posted clam-hao

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了STM32-TFTLCD相关的知识,希望对你有一定的参考价值。

   1 #include "lcd.h"            //调用LCD.h函数
   2 #include "stdlib.h"
   3 #include "font.h" 
   4 #include "usart.h"            //调用usart.h函数
   5 #include "delay.h"            //调用delay.h函数
   6 
   7 /*******************************************************************************
   8 1.void LCD_WR_REG(u16 data)                            //写寄存器函数
   9 2.void LCD_WR_DATAX(u16 data)                          //写数据函数
  10 3.u16 LCD_RD_DATA(void)                                //读LCD数据
  11 4.void LCD_WriteReg(u16 LCD_Reg,u16 LCD_RegValue    //写寄存器
  12 5.u16 LCD_ReadReg(u16 LCD_Reg)                        //读寄存器
  13 6.void LCD_WriteRAM_Prepare(void)                    //开始写GRAM
  14 7.void LCD_WriteRAM(u16 RGB_Code)                    //LCD写GRAM
  15 *********************************************************************************/
  16 //LCD的画笔颜色和背景色       
  17 u16 POINT_COLOR=0x0000;    //画笔颜色
  18 u16 BACK_COLOR= 0xFFFF;  //背景色 
  19 
  20 //管理LCD重要参数
  21 //默认为竖屏
  22 
  23 _lcd_dev lcddev;
  24                              
  25 
  26 /*******************************************************************************
  27 1.函数名称:写寄存器函数
  28 2.包含变量:data:寄存器值
  29 3.修改日期:
  30 *********************************************************************************/
  31 void LCD_WR_REG(u16 data)
  32 { 
  33     LCD_RS_CLR;        //写地址  
  34      LCD_CS_CLR; 
  35     DATAOUT(data); 
  36     LCD_WR_CLR; 
  37     LCD_WR_SET; 
  38      LCD_CS_SET;   
  39 }
  40 
  41 /*******************************************************************************
  42 1.函数名称:写数据函数
  43 2.包含变量:data:寄存器值
  44 3.修改日期:
  45 4.备注:可以替代LCD_WR_DATAX宏,拿时间换空间.
  46 *********************************************************************************/
  47 void LCD_WR_DATAX(u16 data)
  48 {
  49     LCD_RS_SET;
  50     LCD_CS_CLR;
  51     DATAOUT(data);
  52     LCD_WR_CLR;
  53     LCD_WR_SET;
  54     LCD_CS_SET;
  55 }
  56 
  57 /*******************************************************************************
  58 1.函数名称:读LCD数据
  59 2.包含变量:返回值:读到的值
  60 3.修改日期:
  61 *********************************************************************************/
  62 u16 LCD_RD_DATA(void)
  63 {                                           
  64     u16 t;
  65      GPIOB->CRL=0X88888888; //PB0-7  上拉输入
  66     GPIOB->CRH=0X88888888; //PB8-15 上拉输入
  67     GPIOB->ODR=0X0000;     //全部输出0
  68 
  69     LCD_RS_SET;
  70     LCD_CS_CLR;
  71     //读取数据(读寄存器时,并不需要读2次)
  72     LCD_RD_CLR;
  73     if(lcddev.id==0X8989)delay_us(2);//FOR 8989,延时2us                       
  74     t=DATAIN;  
  75     LCD_RD_SET;
  76     LCD_CS_SET; 
  77 
  78     GPIOB->CRL=0X33333333; //PB0-7  上拉输出
  79     GPIOB->CRH=0X33333333; //PB8-15 上拉输出
  80     GPIOB->ODR=0XFFFF;    //全部输出高
  81     return t;  
  82 }
  83 
  84 /*******************************************************************************
  85 1.函数名称:    写寄存器
  86 2.包含变量:    LCD_Reg:寄存器编号
  87             LCD_RegValue:要写入的值
  88 3.修改日期:
  89 *********************************************************************************/
  90 void LCD_WriteReg(u16 LCD_Reg,u16 LCD_RegValue)
  91 {    
  92     LCD_WR_REG(LCD_Reg);  
  93     LCD_WR_DATA(LCD_RegValue);                 
  94 }   
  95 
  96 /*******************************************************************************
  97 1.函数名称:    读寄存器
  98 2.包含变量:    LCD_Reg:寄存器编号
  99 3.返回值:    读到的值
 100 4.修改日期:
 101 *********************************************************************************/
 102 u16 LCD_ReadReg(u16 LCD_Reg)
 103 {                                           
 104      LCD_WR_REG(LCD_Reg);  //写入要读的寄存器号  
 105     return LCD_RD_DATA(); 
 106 } 
 107 /*******************************************************************************
 108 1.函数名称:    开始写GRAM
 109 2.包含变量:
 110 3.修改日期:
 111 *********************************************************************************/
 112 void LCD_WriteRAM_Prepare(void)
 113 {
 114     LCD_WR_REG(lcddev.wramcmd);
 115 } 
 116 /*******************************************************************************
 117 1.函数名称:LCD写GRAM
 118 2.包含变量:RGB_Code:颜色值
 119 3.修改日期:
 120 *********************************************************************************/
 121 void LCD_WriteRAM(u16 RGB_Code)
 122 {                                
 123     LCD_WR_DATA(RGB_Code);//写十六位GRAM
 124 }
 125 
 126 /*******************************************************************************
 127 1.函数名称:从ILI93xx读出的数据为GBR格式
 128 2.包含变量:c:GBR格式的颜色值
 129 3.修改日期:
 130 4.返回值:    RGB格式的颜色值
 131 *********************************************************************************/
 132 u16 LCD_BGR2RGB(u16 c)
 133 {
 134     u16  r,g,b,rgb;   
 135     b=(c>>0)&0x1f;
 136     g=(c>>5)&0x3f;
 137     r=(c>>11)&0x1f;     
 138     rgb=(b<<11)+(g<<5)+(r<<0);         
 139     return(rgb);
 140 }    
 141 
 142 /*******************************************************************************
 143 1.函数名称:当mdk -O1时间优化时需要设置
 144 2.包含变量:延时i
 145 3.修改日期:
 146 *********************************************************************************/
 147 void opt_delay(u8 i)
 148 {
 149     while(i--);
 150 }
 151 
 152 /*******************************************************************************
 153 1.函数名称:    读取个某点的颜色值
 154 2.包含变量:    x,y:坐标
 155 3.修改日期:
 156 4.返回值:    此点的颜色
 157 *********************************************************************************/
 158 u16 LCD_ReadPoint(u16 x,u16 y)
 159 {
 160      u16 r,g,b;
 161     if(x>=lcddev.width||y>=lcddev.height)return 0;    //超过了范围,直接返回           
 162     LCD_SetCursor(x,y);
 163     if(lcddev.id==0X9341||lcddev.id==0X6804||lcddev.id==0X5310||lcddev.id==0X1963)LCD_WR_REG(0X2E);//9341/6804/3510/1963 发送读GRAM指令
 164     else if(lcddev.id==0X5510)LCD_WR_REG(0X2E00);    //5510 发送读GRAM指令
 165     else LCD_WR_REG(0X22);                           //其他IC发送读GRAM指令
 166     GPIOB->CRL=0X88888888;                             //PB0-7  上拉输入
 167     GPIOB->CRH=0X88888888;                             //PB8-15 上拉输入
 168     GPIOB->ODR=0XFFFF;                                 //全部输出高
 169 
 170     LCD_RS_SET;
 171     LCD_CS_CLR;        
 172     //读取数据(读GRAM时,第一次为假读)    
 173     LCD_RD_CLR;           
 174     opt_delay(2);                                    //延时        
 175      r=DATAIN;                                          //实际坐标颜色 
 176     LCD_RD_SET;
 177     if(lcddev.id==0X1963)
 178     {
 179         LCD_CS_SET;
 180         GPIOB->CRL=0X33333333;         //PB0-7  上拉输出
 181         GPIOB->CRH=0X33333333;         //PB8-15 上拉输出
 182         GPIOB->ODR=0XFFFF;            //全部输出高  
 183         return r;                    //1963直接读就可以 
 184      }
 185      //dummy READ
 186     LCD_RD_CLR;                       
 187     opt_delay(2);//延时                       
 188      r=DATAIN;      //实际坐标颜色
 189     LCD_RD_SET;
 190      if(lcddev.id==0X9341||lcddev.id==0X5310||lcddev.id==0X5510)    //9341/NT35310/NT35510要分2次读出
 191     {     
 192         LCD_RD_CLR;                       
 193         opt_delay(2);//延时               
 194         b=DATAIN;//读取蓝色值        
 195          LCD_RD_SET;
 196         g=r&0XFF;//对于9341,第一次读取的是RG的值,R在前,G在后,各占8位
 197         g<<=8;
 198     }else if(lcddev.id==0X6804)
 199     {
 200         LCD_RD_CLR;                       
 201          LCD_RD_SET;
 202         r=DATAIN;//6804第二次读取的才是真实值 
 203     }     
 204     LCD_CS_SET;
 205     GPIOB->CRL=0X33333333;         //PB0-7  上拉输出
 206     GPIOB->CRH=0X33333333;         //PB8-15 上拉输出
 207     GPIOB->ODR=0XFFFF;            //全部输出高  
 208     if(lcddev.id==0X9325||lcddev.id==0X4535||lcddev.id==0X4531||lcddev.id==0X8989||lcddev.id==0XB505)return r;    //这几种IC直接返回颜色值
 209     else if(lcddev.id==0X9341||lcddev.id==0X5310||lcddev.id==0X5510)return (((r>>11)<<11)|((g>>10)<<5)|(b>>11));//ILI9341/NT35310/NT35510需要公式转换一下
 210     else return LCD_BGR2RGB(r);    //其他IC
 211 }    
 212 
 213 
 214 
 215 /*******************************************************************************
 216 1.函数名称:    LCD开启显示
 217 2.包含变量:    
 218 3.修改日期:
 219 4.返回值:    
 220 *********************************************************************************/
 221 void LCD_DisplayOn(void)
 222 {                       
 223     if(lcddev.id==0X9341||lcddev.id==0X6804||lcddev.id==0X5310||lcddev.id==0X1963)LCD_WR_REG(0X29);    //开启显示
 224     else if(lcddev.id==0X5510)LCD_WR_REG(0X2900);    //开启显示
 225     else LCD_WriteReg(0X07,0x0173);                      //开启显示
 226 }     
 227 
 228 /*******************************************************************************
 229 1.函数名称:    LCD关闭显示
 230 2.包含变量:    
 231 3.修改日期:
 232 4.返回值:    
 233 *********************************************************************************/
 234 void LCD_DisplayOff(void)
 235 {       
 236     if(lcddev.id==0X9341||lcddev.id==0X6804||lcddev.id==0X5310||lcddev.id==0X1963)LCD_WR_REG(0X28);    //关闭显示
 237     else if(lcddev.id==0X5510)LCD_WR_REG(0X2800);    //关闭显示
 238     else LCD_WriteReg(0X07,0x0);//关闭显示 
 239 }   
 240 
 241 
 242 /*******************************************************************************
 243 1.函数名称:    设置光标位置
 244 2.包含变量:    Xpos:横坐标    Ypos:纵坐标
 245 3.修改日期:
 246 4.返回值:    
 247 *********************************************************************************/
 248 void LCD_SetCursor(u16 Xpos, u16 Ypos)
 249 {     
 250      if(lcddev.id==0X9341||lcddev.id==0X5310)
 251     {            
 252         LCD_WR_REG(lcddev.setxcmd); 
 253         LCD_WR_DATA(Xpos>>8);LCD_WR_DATA(Xpos&0XFF);              
 254         LCD_WR_REG(lcddev.setycmd); 
 255         LCD_WR_DATA(Ypos>>8);LCD_WR_DATA(Ypos&0XFF);         
 256     }else if(lcddev.id==0X6804)
 257     {
 258         if(lcddev.dir==1)Xpos=lcddev.width-1-Xpos;//横屏时处理
 259         LCD_WR_REG(lcddev.setxcmd); 
 260         LCD_WR_DATA(Xpos>>8);LCD_WR_DATA(Xpos&0XFF); 
 261         LCD_WR_REG(lcddev.setycmd); 
 262         LCD_WR_DATA(Ypos>>8);LCD_WR_DATA(Ypos&0XFF); 
 263     }else if(lcddev.id==0X1963)
 264     {                       
 265         if(lcddev.dir==0)//x坐标需要变换
 266         {
 267             Xpos=lcddev.width-1-Xpos;
 268             LCD_WR_REG(lcddev.setxcmd); 
 269             LCD_WR_DATA(0);LCD_WR_DATA(0);         
 270             LCD_WR_DATA(Xpos>>8);LCD_WR_DATA(Xpos&0XFF);              
 271         }else
 272         {
 273             LCD_WR_REG(lcddev.setxcmd); 
 274             LCD_WR_DATA(Xpos>>8);LCD_WR_DATA(Xpos&0XFF);         
 275             LCD_WR_DATA((lcddev.width-1)>>8);LCD_WR_DATA((lcddev.width-1)&0XFF);                          
 276         }    
 277         LCD_WR_REG(lcddev.setycmd); 
 278         LCD_WR_DATA(Ypos>>8);LCD_WR_DATA(Ypos&0XFF);         
 279         LCD_WR_DATA((lcddev.height-1)>>8);LCD_WR_DATA((lcddev.height-1)&0XFF);                      
 280         
 281     }else if(lcddev.id==0X5510)
 282     {
 283         LCD_WR_REG(lcddev.setxcmd);LCD_WR_DATA(Xpos>>8);         
 284         LCD_WR_REG(lcddev.setxcmd+1);LCD_WR_DATA(Xpos&0XFF);             
 285         LCD_WR_REG(lcddev.setycmd);LCD_WR_DATA(Ypos>>8);          
 286         LCD_WR_REG(lcddev.setycmd+1);LCD_WR_DATA(Ypos&0XFF);            
 287     }else
 288     {
 289         if(lcddev.dir==1)Xpos=lcddev.width-1-Xpos;//横屏其实就是调转x,y坐标
 290         LCD_WriteReg(lcddev.setxcmd, Xpos);
 291         LCD_WriteReg(lcddev.setycmd, Ypos);
 292     }     
 293 }          
 294     
 295 /*******************************************************************************
 296 1.函数名称:    设置LCD的自动扫描方向
 297 2.包含变量:    Xpos:横坐标    Ypos:纵坐标
 298 3.修改日期:
 299 4.备注:        注意:其他函数可能会受到此函数设置的影响(尤其是9341/6804这两个奇葩),
 300             所以,一般设置为L2R_U2D即可,如果设置为其他扫描方式,可能导致显示不正常.
 301             dir:0~7,代表8个方向(具体定义见lcd.h)
 302             9320/9325/9328/4531/4535/1505/b505/5408/9341/5310/5510/1963等IC已经实际测试
 303 *********************************************************************************/
 304 void LCD_Scan_Dir(u8 dir)
 305 {
 306     u16 regval=0;
 307     u16 dirreg=0;
 308     u16 temp;  
 309     if((lcddev.dir==1&&lcddev.id!=0X6804&&lcddev.id!=0X1963)||(lcddev.dir==0&&lcddev.id==0X1963))//横屏时,对6804和1963不改变扫描方向!竖屏时1963改变方向
 310     {               
 311         switch(dir)//方向转换
 312         {
 313             case 0:dir=6;break;
 314             case 1:dir=7;break;
 315             case 2:dir=4;break;
 316             case 3:dir=5;break;
 317             case 4:dir=1;break;
 318             case 5:dir=0;break;
 319             case 6:dir=3;break;
 320             case 7:dir=2;break;         
 321         }
 322     } 
 323     if(lcddev.id==0x9341||lcddev.id==0X6804||lcddev.id==0X5310||lcddev.id==0X5510||lcddev.id==0X1963)//9341/6804/5310/5510/1963,特殊处理
 324     {
 325         switch(dir)
 326         {
 327             case L2R_U2D://从左到右,从上到下
 328                 regval|=(0<<7)|(0<<6)|(0<<5); 
 329                 break;
 330             case L2R_D2U://从左到右,从下到上
 331                 regval|=(1<<7)|(0<<6)|(0<<5); 
 332                 break;
 333             case R2L_U2D://从右到左,从上到下
 334                 regval|=(0<<7)|(1<<6)|(0<<5); 
 335                 break;
 336             case R2L_D2U://从右到左,从下到上
 337                 regval|=(1<<7)|(1<<6)|(0<<5); 
 338                 break;     
 339             case U2D_L2R://从上到下,从左到右
 340                 regval|=(0<<7)|(0<<6)|(1<<5); 
 341                 break;
 342             case U2D_R2L://从上到下,从右到左
 343                 regval|=(0<<7)|(1<<6)|(1<<5); 
 344                 break;
 345             case D2U_L2R://从下到上,从左到右
 346                 regval|=(1<<7)|(0<<6)|(1<<5); 
 347                 break;
 348             case D2U_R2L://从下到上,从右到左
 349                 regval|=(1<<7)|(1<<6)|(1<<5); 
 350                 break;     
 351         }
 352         if(lcddev.id==0X5510)dirreg=0X3600;
 353         else dirreg=0X36;
 354          if((lcddev.id!=0X5310)&&(lcddev.id!=0X5510)&&(lcddev.id!=0X1963))regval|=0X08;//5310/5510/1963不需要BGR   
 355         if(lcddev.id==0X6804)regval|=0x02;//6804的BIT6和9341的反了       
 356         LCD_WriteReg(dirreg,regval);
 357         if(lcddev.id!=0X1963)//1963不做坐标处理
 358         {
 359             if(regval&0X20)
 360             {
 361                 if(lcddev.width<lcddev.height)//交换X,Y
 362                 {
 363                     temp=lcddev.width;
 364                     lcddev.width=lcddev.height;
 365                     lcddev.height=temp;
 366                 }
 367             }else  
 368             {
 369                 if(lcddev.width>lcddev.height)//交换X,Y
 370                 {
 371                     temp=lcddev.width;
 372                     lcddev.width=lcddev.height;
 373                     lcddev.height=temp;
 374                 }
 375             }  
 376         }
 377         if(lcddev.id==0X5510)
 378         {
 379             LCD_WR_REG(lcddev.setxcmd);LCD_WR_DATA(0); 
 380             LCD_WR_REG(lcddev.setxcmd+1);LCD_WR_DATA(0); 
 381             LCD_WR_REG(lcddev.setxcmd+2);LCD_WR_DATA((lcddev.width-1)>>8); 
 382             LCD_WR_REG(lcddev.setxcmd+3);LCD_WR_DATA((lcddev.width-1)&0XFF); 
 383             LCD_WR_REG(lcddev.setycmd);LCD_WR_DATA(0); 
 384             LCD_WR_REG(lcddev.setycmd+1);LCD_WR_DATA(0); 
 385             LCD_WR_REG(lcddev.setycmd+2);LCD_WR_DATA((lcddev.height-1)>>8); 
 386             LCD_WR_REG(lcddev.setycmd+3);LCD_WR_DATA((lcddev.height-1)&0XFF);
 387         }else
 388         {
 389             LCD_WR_REG(lcddev.setxcmd); 
 390             LCD_WR_DATA(0);LCD_WR_DATA(0);
 391             LCD_WR_DATA((lcddev.width-1)>>8);LCD_WR_DATA((lcddev.width-1)&0XFF);
 392             LCD_WR_REG(lcddev.setycmd); 
 393             LCD_WR_DATA(0);LCD_WR_DATA(0);
 394             LCD_WR_DATA((lcddev.height-1)>>8);LCD_WR_DATA((lcddev.height-1)&0XFF);  
 395         }
 396       }else 
 397     {
 398         switch(dir)
 399         {
 400             case L2R_U2D://从左到右,从上到下
 401                 regval|=(1<<5)|(1<<4)|(0<<3); 
 402                 break;
 403             case L2R_D2U://从左到右,从下到上
 404                 regval|=(0<<5)|(1<<4)|(0<<3); 
 405                 break;
 406             case R2L_U2D://从右到左,从上到下
 407                 regval|=(1<<5)|(0<<4)|(0<<3);
 408                 break;
 409             case R2L_D2U://从右到左,从下到上
 410                 regval|=(0<<5)|(0<<4)|(0<<3); 
 411                 break;     
 412             case U2D_L2R://从上到下,从左到右
 413                 regval|=(1<<5)|(1<<4)|(1<<3); 
 414                 break;
 415             case U2D_R2L://从上到下,从右到左
 416                 regval|=(1<<5)|(0<<4)|(1<<3); 
 417                 break;
 418             case D2U_L2R://从下到上,从左到右
 419                 regval|=(0<<5)|(1<<4)|(1<<3); 
 420                 break;
 421             case D2U_R2L://从下到上,从右到左
 422                 regval|=(0<<5)|(0<<4)|(1<<3); 
 423                 break;     
 424         } 
 425         dirreg=0X03;
 426         regval|=1<<12; 
 427         LCD_WriteReg(dirreg,regval);
 428     }
 429 }     
 430 
 431 /*******************************************************************************
 432 1.函数名称:    画点
 433 2.包含变量:    x,y:坐标     POINT_COLOR:此点的颜色
 434 3.修改日期:
 435 4.返回值:    
 436 *********************************************************************************/
 437 void LCD_DrawPoint(u16 x,u16 y)
 438 {
 439     LCD_SetCursor(x,y);        //设置光标位置 
 440     LCD_WriteRAM_Prepare();    //开始写入GRAM
 441     LCD_WR_DATA(POINT_COLOR); 
 442 }     
 443 
 444 /*******************************************************************************
 445 1.函数名称:    快速画点
 446 2.包含变量:    x,y:坐标     color:颜色
 447 3.修改日期:
 448 4.返回值:    
 449 *********************************************************************************/
 450 void LCD_Fast_DrawPoint(u16 x,u16 y,u16 color)
 451 {       
 452     if(lcddev.id==0X9341||lcddev.id==0X5310)
 453     {
 454         LCD_WR_REG(lcddev.setxcmd); 
 455         LCD_WR_DATA(x>>8);LCD_WR_DATA(x&0XFF);               
 456         LCD_WR_REG(lcddev.setycmd); 
 457         LCD_WR_DATA(y>>8);LCD_WR_DATA(y&0XFF);               
 458     }else if(lcddev.id==0X5510)
 459     {
 460         LCD_WR_REG(lcddev.setxcmd);LCD_WR_DATA(x>>8);  
 461         LCD_WR_REG(lcddev.setxcmd+1);LCD_WR_DATA(x&0XFF);      
 462         LCD_WR_REG(lcddev.setycmd);LCD_WR_DATA(y>>8);  
 463         LCD_WR_REG(lcddev.setycmd+1);LCD_WR_DATA(y&0XFF); 
 464     }else if(lcddev.id==0X1963)
 465     {
 466         if(lcddev.dir==0)x=lcddev.width-1-x;
 467         LCD_WR_REG(lcddev.setxcmd); 
 468         LCD_WR_DATA(x>>8);LCD_WR_DATA(x&0XFF);         
 469         LCD_WR_DATA(x>>8);LCD_WR_DATA(x&0XFF);         
 470         LCD_WR_REG(lcddev.setycmd); 
 471         LCD_WR_DATA(y>>8);LCD_WR_DATA(y&0XFF);         
 472         LCD_WR_DATA(y>>8);LCD_WR_DATA(y&0XFF);         
 473     }else if(lcddev.id==0X6804)
 474     {            
 475         if(lcddev.dir==1)x=lcddev.width-1-x;//横屏时处理
 476         LCD_WR_REG(lcddev.setxcmd); 
 477         LCD_WR_DATA(x>>8);LCD_WR_DATA(x&0XFF);             
 478         LCD_WR_REG(lcddev.setycmd); 
 479         LCD_WR_DATA(y>>8);LCD_WR_DATA(y&0XFF);         
 480     }else
 481     {
 482          if(lcddev.dir==1)x=lcddev.width-1-x;//横屏其实就是调转x,y坐标
 483         LCD_WriteReg(lcddev.setxcmd,x);
 484         LCD_WriteReg(lcddev.setycmd,y);
 485     }    
 486     LCD_RS_CLR;
 487      LCD_CS_CLR; 
 488     DATAOUT(lcddev.wramcmd);//写指令  
 489     LCD_WR_CLR; 
 490     LCD_WR_SET; 
 491      LCD_CS_SET; 
 492     LCD_WR_DATA(color);        //写数据
 493 }
 494 
 495 /*******************************************************************************
 496 1.函数名称:    SSD1963 背光设置
 497 2.包含变量: pwm:背光等级,0~100.越大越亮.
 498 3.修改日期:
 499 4.返回值:    
 500 *********************************************************************************/
 501 void LCD_SSD_BackLightSet(u8 pwm)
 502 {    
 503     LCD_WR_REG(0xBE);    //配置PWM输出
 504     LCD_WR_DATA(0x05);    //1设置PWM频率
 505     LCD_WR_DATA(pwm*2.55);//2设置PWM占空比
 506     LCD_WR_DATA(0x01);    //3设置C
 507     LCD_WR_DATA(0xFF);    //4设置D
 508     LCD_WR_DATA(0x00);    //5设置E
 509     LCD_WR_DATA(0x00);    //6设置F
 510 }
 511 
 512 /*******************************************************************************
 513 1.函数名称:    设置LCD显示方向
 514 2.包含变量: dir:0,竖屏;1,横屏
 515 3.修改日期:
 516 4.返回值:    
 517 *********************************************************************************/
 518 void LCD_Display_Dir(u8 dir)
 519 {
 520     if(dir==0)            //竖屏
 521     {
 522         lcddev.dir=0;    //竖屏
 523         lcddev.width=240;
 524         lcddev.height=320;
 525         if(lcddev.id==0X9341||lcddev.id==0X6804||lcddev.id==0X5310)
 526         {
 527             lcddev.wramcmd=0X2C;
 528              lcddev.setxcmd=0X2A;
 529             lcddev.setycmd=0X2B;       
 530             if(lcddev.id==0X6804||lcddev.id==0X5310)
 531             {
 532                 lcddev.width=320;
 533                 lcddev.height=480;
 534             }
 535         }else if(lcddev.id==0x5510)
 536         {
 537             lcddev.wramcmd=0X2C00;
 538              lcddev.setxcmd=0X2A00;
 539             lcddev.setycmd=0X2B00; 
 540             lcddev.width=480;
 541             lcddev.height=800;
 542         }else if(lcddev.id==0X1963)
 543         {
 544             lcddev.wramcmd=0X2C;    //设置写入GRAM的指令 
 545             lcddev.setxcmd=0X2B;    //设置写X坐标指令
 546             lcddev.setycmd=0X2A;    //设置写Y坐标指令
 547             lcddev.width=480;        //设置宽度480
 548             lcddev.height=800;        //设置高度800  
 549         }else
 550         {
 551             lcddev.wramcmd=0X22;
 552              lcddev.setxcmd=0X20;
 553             lcddev.setycmd=0X21;  
 554         }
 555     }else                 //横屏
 556     {                      
 557         lcddev.dir=1;    //横屏
 558         lcddev.width=320;
 559         lcddev.height=240;
 560         if(lcddev.id==0X9341||lcddev.id==0X5310)
 561         {
 562             lcddev.wramcmd=0X2C;
 563              lcddev.setxcmd=0X2A;
 564             lcddev.setycmd=0X2B;       
 565         }else if(lcddev.id==0X6804)     
 566         {
 567              lcddev.wramcmd=0X2C;
 568              lcddev.setxcmd=0X2B;
 569             lcddev.setycmd=0X2A; 
 570         }else if(lcddev.id==0x5510)
 571         {
 572             lcddev.wramcmd=0X2C00;
 573              lcddev.setxcmd=0X2A00;
 574             lcddev.setycmd=0X2B00; 
 575             lcddev.width=800;
 576             lcddev.height=480;
 577         }else if(lcddev.id==0X1963)
 578         {
 579             lcddev.wramcmd=0X2C;    //设置写入GRAM的指令 
 580             lcddev.setxcmd=0X2A;    //设置写X坐标指令
 581             lcddev.setycmd=0X2B;    //设置写Y坐标指令
 582             lcddev.width=800;        //设置宽度800
 583             lcddev.height=480;        //设置高度480  
 584         }else
 585         {
 586             lcddev.wramcmd=0X22;
 587              lcddev.setxcmd=0X21;
 588             lcddev.setycmd=0X20;  
 589         }
 590         if(lcddev.id==0X6804||lcddev.id==0X5310)
 591         {      
 592             lcddev.width=480;
 593             lcddev.height=320;             
 594         }
 595     } 
 596     LCD_Scan_Dir(DFT_SCAN_DIR);    //默认扫描方向
 597 }     
 598 
 599 /*******************************************************************************
 600 1.函数名称:    设置窗口,并自动设置画点坐标到窗口左上角(sx,sy).
 601 2.包含变量: sx,sy:窗口起始坐标(左上角)
 602             width,height:窗口宽度和高度,必须大于0!!
 603             窗体大小:width*height. 
 604 3.修改日期:
 605 4.返回值:    
 606 *********************************************************************************/
 607 void LCD_Set_Window(u16 sx,u16 sy,u16 width,u16 height)
 608 {    
 609     u8 hsareg,heareg,vsareg,veareg;
 610     u16 hsaval,heaval,vsaval,veaval; 
 611     u16 twidth,theight;
 612     twidth=sx+width-1;
 613     theight=sy+height-1;
 614     if(lcddev.id==0X9341||lcddev.id==0X5310||lcddev.id==0X6804||(lcddev.dir==1&&lcddev.id==0X1963))
 615     {
 616         LCD_WR_REG(lcddev.setxcmd); 
 617         LCD_WR_DATA(sx>>8); 
 618         LCD_WR_DATA(sx&0XFF);     
 619         LCD_WR_DATA(twidth>>8); 
 620         LCD_WR_DATA(twidth&0XFF);  
 621         LCD_WR_REG(lcddev.setycmd); 
 622         LCD_WR_DATA(sy>>8); 
 623         LCD_WR_DATA(sy&0XFF); 
 624         LCD_WR_DATA(theight>>8); 
 625         LCD_WR_DATA(theight&0XFF); 
 626     }else if(lcddev.id==0X1963)//1963竖屏特殊处理
 627     {
 628         sx=lcddev.width-width-sx; 
 629         height=sy+height-1; 
 630         LCD_WR_REG(lcddev.setxcmd); 
 631         LCD_WR_DATA(sx>>8); 
 632         LCD_WR_DATA(sx&0XFF);     
 633         LCD_WR_DATA((sx+width-1)>>8); 
 634         LCD_WR_DATA((sx+width-1)&0XFF);  
 635         LCD_WR_REG(lcddev.setycmd); 
 636         LCD_WR_DATA(sy>>8); 
 637         LCD_WR_DATA(sy&0XFF); 
 638         LCD_WR_DATA(height>>8); 
 639         LCD_WR_DATA(height&0XFF);         
 640     }else if(lcddev.id==0X5510)
 641     {
 642         LCD_WR_REG(lcddev.setxcmd);LCD_WR_DATA(sx>>8);  
 643         LCD_WR_REG(lcddev.setxcmd+1);LCD_WR_DATA(sx&0XFF);      
 644         LCD_WR_REG(lcddev.setxcmd+2);LCD_WR_DATA(twidth>>8);   
 645         LCD_WR_REG(lcddev.setxcmd+3);LCD_WR_DATA(twidth&0XFF);   
 646         LCD_WR_REG(lcddev.setycmd);LCD_WR_DATA(sy>>8);   
 647         LCD_WR_REG(lcddev.setycmd+1);LCD_WR_DATA(sy&0XFF);  
 648         LCD_WR_REG(lcddev.setycmd+2);LCD_WR_DATA(theight>>8);   
 649         LCD_WR_REG(lcddev.setycmd+3);LCD_WR_DATA(theight&0XFF);  
 650     }else    //其他驱动IC
 651     {
 652         if(lcddev.dir==1)//横屏
 653         {
 654             //窗口值
 655             hsaval=sy;                
 656             heaval=theight;
 657             vsaval=lcddev.width-twidth-1;
 658             veaval=lcddev.width-sx-1;                
 659         }else
 660         { 
 661             hsaval=sx;                
 662             heaval=twidth;
 663             vsaval=sy;
 664             veaval=theight;
 665         } 
 666         hsareg=0X50;heareg=0X51;//水平方向窗口寄存器
 667         vsareg=0X52;veareg=0X53;//垂直方向窗口寄存器                                     
 668         //设置寄存器值
 669         LCD_WriteReg(hsareg,hsaval);
 670         LCD_WriteReg(heareg,heaval);
 671         LCD_WriteReg(vsareg,vsaval);
 672         LCD_WriteReg(veareg,veaval);        
 673         LCD_SetCursor(sx,sy);    //设置光标位置
 674     }
 675 }
 676 //初始化lcd
 677 //该初始化函数可以初始化各种ALIENTEK出品的LCD液晶屏
 678 //本函数占用较大flash,用户可以根据自己的实际情况,删掉未用到的LCD初始化代码.以节省空间.
 679 /*******************************************************************************
 680 1.函数名称:    初始化lcd
 681 2.包含变量:
 682 3.修改日期:
 683 4.备注:        该初始化函数可以初始化各种ALIENTEK出品的LCD液晶屏
 684             本函数占用较大flash,用户可以根据自己的实际情况,删掉未用到的LCD初始化代码.以节省空间.
 685 *********************************************************************************/
 686 void LCD_Init(void)
 687 { 
 688      GPIO_InitTypeDef GPIO_InitStructure;
 689      RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOB|RCC_APB2Periph_AFIO, ENABLE); //使能PORTB,C时钟和AFIO时钟
 690     GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable , ENABLE);//开启SWD,失能JTAG
 691     
 692     GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10|GPIO_Pin_9|GPIO_Pin_8|GPIO_Pin_7|GPIO_Pin_6;       ///PORTC6~10复用推挽输出
 693     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;   
 694     GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
 695     GPIO_Init(GPIOC, &GPIO_InitStructure); //GPIOC    
 696 
 697     GPIO_SetBits(GPIOC,GPIO_Pin_10|GPIO_Pin_9|GPIO_Pin_8|GPIO_Pin_7|GPIO_Pin_6);
 698 
 699     GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;    //  PORTB推挽输出
 700     GPIO_Init(GPIOB, &GPIO_InitStructure); //GPIOB
 701  
 702     GPIO_SetBits(GPIOB,GPIO_Pin_All);
 703 
 704 delay_ms(50); // delay 50 ms 
 705     LCD_WriteReg(0x0000,0x0001);
 706     delay_ms(50); // delay 50 ms 
 707       lcddev.id = LCD_ReadReg(0x0000);   
 708     if(lcddev.id<0XFF||lcddev.id==0XFFFF||lcddev.id==0X9300)//读到ID不正确,新增lcddev.id==0X9300判断,因为9341在未被复位的情况下会被读成9300
 709     {    
 710          //尝试9341 ID的读取        
 711         LCD_WR_REG(0XD3);                   
 712         LCD_RD_DATA();                 //dummy read     
 713          LCD_RD_DATA();               //读到0X00
 714           lcddev.id=LCD_RD_DATA();       //读取93                                   
 715          lcddev.id<<=8;
 716         lcddev.id|=LCD_RD_DATA();      //读取41                       
 717          if(lcddev.id!=0X9341)        //非9341,尝试是不是6804
 718         {    
 719              LCD_WR_REG(0XBF);                   
 720             LCD_RD_DATA();             //dummy read      
 721              LCD_RD_DATA();           //读回0X01               
 722              LCD_RD_DATA();             //读回0XD0                   
 723               lcddev.id=LCD_RD_DATA();//这里读回0X68 
 724             lcddev.id<<=8;
 725               lcddev.id|=LCD_RD_DATA();//这里读回0X04      
 726             if(lcddev.id!=0X6804)    //也不是6804,尝试看看是不是NT35310
 727             { 
 728                 LCD_WR_REG(0XD4);                   
 729                 LCD_RD_DATA();                 //dummy read  
 730                 LCD_RD_DATA();               //读回0X01     
 731                 lcddev.id=LCD_RD_DATA();    //读回0X53    
 732                 lcddev.id<<=8;     
 733                 lcddev.id|=LCD_RD_DATA();    //这里读回0X10     
 734                 if(lcddev.id!=0X5310)        //也不是NT35310,尝试看看是不是NT35510
 735                 {
 736                     LCD_WR_REG(0XDA00);    
 737                     LCD_RD_DATA();           //读回0X00     
 738                     LCD_WR_REG(0XDB00);    
 739                     lcddev.id=LCD_RD_DATA();//读回0X80
 740                     lcddev.id<<=8;    
 741                     LCD_WR_REG(0XDC00);    
 742                     lcddev.id|=LCD_RD_DATA();//读回0X00        
 743                     if(lcddev.id==0x8000)lcddev.id=0x5510;//NT35510读回的ID是8000H,为方便区分,我们强制设置为5510
 744                     if(lcddev.id!=0X5510)            //也不是NT5510,尝试看看是不是SSD1963
 745                     {
 746                         LCD_WR_REG(0XA1);
 747                         lcddev.id=LCD_RD_DATA();
 748                         lcddev.id=LCD_RD_DATA();    //读回0X57
 749                         lcddev.id<<=8;     
 750                         lcddev.id|=LCD_RD_DATA();    //读回0X61    
 751                         if(lcddev.id==0X5761)lcddev.id=0X1963;//SSD1963读回的ID是5761H,为方便区分,我们强制设置为1963
 752                     }
 753                 }
 754             }
 755          }      
 756     }
 757      printf(" LCD ID:%x
",lcddev.id); //打印LCD ID  
 758     if(lcddev.id==0X9341)    //9341初始化
 759     {     
 760         LCD_WR_REG(0xCF);  
 761         LCD_WR_DATAX(0x00); 
 762         LCD_WR_DATAX(0xC1); 
 763         LCD_WR_DATAX(0X30); 
 764         LCD_WR_REG(0xED);  
 765         LCD_WR_DATAX(0x64); 
 766         LCD_WR_DATAX(0x03); 
 767         LCD_WR_DATAX(0X12); 
 768         LCD_WR_DATAX(0X81); 
 769         LCD_WR_REG(0xE8);  
 770         LCD_WR_DATAX(0x85); 
 771         LCD_WR_DATAX(0x10); 
 772         LCD_WR_DATAX(0x7A); 
 773         LCD_WR_REG(0xCB);  
 774         LCD_WR_DATAX(0x39); 
 775         LCD_WR_DATAX(0x2C); 
 776         LCD_WR_DATAX(0x00); 
 777         LCD_WR_DATAX(0x34); 
 778         LCD_WR_DATAX(0x02); 
 779         LCD_WR_REG(0xF7);  
 780         LCD_WR_DATAX(0x20); 
 781         LCD_WR_REG(0xEA);  
 782         LCD_WR_DATAX(0x00); 
 783         LCD_WR_DATAX(0x00); 
 784         LCD_WR_REG(0xC0);    //Power control 
 785         LCD_WR_DATAX(0x1B);   //VRH[5:0] 
 786         LCD_WR_REG(0xC1);    //Power control 
 787         LCD_WR_DATAX(0x01);   //SAP[2:0];BT[3:0] 
 788         LCD_WR_REG(0xC5);    //VCM control 
 789         LCD_WR_DATAX(0x30);      //3F
 790         LCD_WR_DATAX(0x30);      //3C
 791         LCD_WR_REG(0xC7);    //VCM control2 
 792         LCD_WR_DATAX(0XB7); 
 793         LCD_WR_REG(0x36);    // Memory Access Control 
 794         LCD_WR_DATAX(0x48); 
 795         LCD_WR_REG(0x3A);   
 796         LCD_WR_DATAX(0x55); 
 797         LCD_WR_REG(0xB1);   
 798         LCD_WR_DATAX(0x00);   
 799         LCD_WR_DATAX(0x1A); 
 800         LCD_WR_REG(0xB6);    // Display Function Control 
 801         LCD_WR_DATAX(0x0A); 
 802         LCD_WR_DATAX(0xA2); 
 803         LCD_WR_REG(0xF2);    // 3Gamma Function Disable 
 804         LCD_WR_DATAX(0x00); 
 805         LCD_WR_REG(0x26);    //Gamma curve selected 
 806         LCD_WR_DATAX(0x01); 
 807         LCD_WR_REG(0xE0);    //Set Gamma 
 808         LCD_WR_DATAX(0x0F); 
 809         LCD_WR_DATAX(0x2A); 
 810         LCD_WR_DATAX(0x28); 
 811         LCD_WR_DATAX(0x08); 
 812         LCD_WR_DATAX(0x0E); 
 813         LCD_WR_DATAX(0x08); 
 814         LCD_WR_DATAX(0x54); 
 815         LCD_WR_DATAX(0XA9); 
 816         LCD_WR_DATAX(0x43); 
 817         LCD_WR_DATAX(0x0A); 
 818         LCD_WR_DATAX(0x0F); 
 819         LCD_WR_DATAX(0x00); 
 820         LCD_WR_DATAX(0x00); 
 821         LCD_WR_DATAX(0x00); 
 822         LCD_WR_DATAX(0x00);          
 823         LCD_WR_REG(0XE1);    //Set Gamma 
 824         LCD_WR_DATAX(0x00); 
 825         LCD_WR_DATAX(0x15); 
 826         LCD_WR_DATAX(0x17); 
 827         LCD_WR_DATAX(0x07); 
 828         LCD_WR_DATAX(0x11); 
 829         LCD_WR_DATAX(0x06); 
 830         LCD_WR_DATAX(0x2B); 
 831         LCD_WR_DATAX(0x56); 
 832         LCD_WR_DATAX(0x3C); 
 833         LCD_WR_DATAX(0x05); 
 834         LCD_WR_DATAX(0x10); 
 835         LCD_WR_DATAX(0x0F); 
 836         LCD_WR_DATAX(0x3F); 
 837         LCD_WR_DATAX(0x3F); 
 838         LCD_WR_DATAX(0x0F); 
 839         LCD_WR_REG(0x2B); 
 840         LCD_WR_DATAX(0x00);
 841         LCD_WR_DATAX(0x00);
 842         LCD_WR_DATAX(0x01);
 843         LCD_WR_DATAX(0x3f);
 844         LCD_WR_REG(0x2A); 
 845         LCD_WR_DATAX(0x00);
 846         LCD_WR_DATAX(0x00);
 847         LCD_WR_DATAX(0x00);
 848         LCD_WR_DATAX(0xef);     
 849         LCD_WR_REG(0x11); //Exit Sleep
 850         delay_ms(120);
 851         LCD_WR_REG(0x29); //display on    
 852     }else if(lcddev.id==0x6804) //6804初始化
 853     {
 854         LCD_WR_REG(0X11);
 855         delay_ms(20);
 856         LCD_WR_REG(0XD0);//VCI1  VCL  VGH  VGL DDVDH VREG1OUT power amplitude setting
 857         LCD_WR_DATAX(0X07); 
 858         LCD_WR_DATAX(0X42); 
 859         LCD_WR_DATAX(0X1D); 
 860         LCD_WR_REG(0XD1);//VCOMH VCOM_AC amplitude setting
 861         LCD_WR_DATAX(0X00);
 862         LCD_WR_DATAX(0X1a);
 863         LCD_WR_DATAX(0X09); 
 864         LCD_WR_REG(0XD2);//Operational Amplifier Circuit Constant Current Adjust , charge pump frequency setting
 865         LCD_WR_DATAX(0X01);
 866         LCD_WR_DATAX(0X22);
 867         LCD_WR_REG(0XC0);//REV SM GS 
 868         LCD_WR_DATAX(0X10);
 869         LCD_WR_DATAX(0X3B);
 870         LCD_WR_DATAX(0X00);
 871         LCD_WR_DATAX(0X02);
 872         LCD_WR_DATAX(0X11);
 873         
 874         LCD_WR_REG(0XC5);// Frame rate setting = 72HZ  when setting 0x03
 875         LCD_WR_DATAX(0X03);
 876         
 877         LCD_WR_REG(0XC8);//Gamma setting
 878         LCD_WR_DATAX(0X00);
 879         LCD_WR_DATAX(0X25);
 880         LCD_WR_DATAX(0X21);
 881         LCD_WR_DATAX(0X05);
 882         LCD_WR_DATAX(0X00);
 883         LCD_WR_DATAX(0X0a);
 884         LCD_WR_DATAX(0X65);
 885         LCD_WR_DATAX(0X25);
 886         LCD_WR_DATAX(0X77);
 887         LCD_WR_DATAX(0X50);
 888         LCD_WR_DATAX(0X0f);
 889         LCD_WR_DATAX(0X00);      
 890                           
 891            LCD_WR_REG(0XF8);
 892         LCD_WR_DATAX(0X01);      
 893 
 894          LCD_WR_REG(0XFE);
 895          LCD_WR_DATAX(0X00);
 896          LCD_WR_DATAX(0X02);
 897         
 898         LCD_WR_REG(0X20);//Exit invert mode
 899 
 900         LCD_WR_REG(0X36);
 901         LCD_WR_DATAX(0X08);//原来是a
 902         
 903         LCD_WR_REG(0X3A);
 904         LCD_WR_DATAX(0X55);//16位模式      
 905         LCD_WR_REG(0X2B);
 906         LCD_WR_DATAX(0X00);
 907         LCD_WR_DATAX(0X00);
 908         LCD_WR_DATAX(0X01);
 909         LCD_WR_DATAX(0X3F);
 910         
 911         LCD_WR_REG(0X2A);
 912         LCD_WR_DATAX(0X00);
 913         LCD_WR_DATAX(0X00);
 914         LCD_WR_DATAX(0X01);
 915         LCD_WR_DATAX(0XDF);
 916         delay_ms(120);
 917         LCD_WR_REG(0X29);      
 918      }else if(lcddev.id==0x5310)
 919     {  
 920         LCD_WR_REG(0xED);
 921         LCD_WR_DATAX(0x01);
 922         LCD_WR_DATAX(0xFE);
 923 
 924         LCD_WR_REG(0xEE);
 925         LCD_WR_DATAX(0xDE);
 926         LCD_WR_DATAX(0x21);
 927 
 928         LCD_WR_REG(0xF1);
 929         LCD_WR_DATAX(0x01);
 930         LCD_WR_REG(0xDF);
 931         LCD_WR_DATAX(0x10);
 932 
 933         //VCOMvoltage//
 934         LCD_WR_REG(0xC4);
 935         LCD_WR_DATAX(0x8F);      //5f
 936 
 937         LCD_WR_REG(0xC6);
 938         LCD_WR_DATAX(0x00);
 939         LCD_WR_DATAX(0xE2);
 940         LCD_WR_DATAX(0xE2);
 941         LCD_WR_DATAX(0xE2);
 942         LCD_WR_REG(0xBF);
 943         LCD_WR_DATAX(0xAA);
 944 
 945         LCD_WR_REG(0xB0);
 946         LCD_WR_DATAX(0x0D);
 947         LCD_WR_DATAX(0x00);
 948         LCD_WR_DATAX(0x0D);
 949         LCD_WR_DATAX(0x00);
 950         LCD_WR_DATAX(0x11);
 951         LCD_WR_DATAX(0x00);
 952         LCD_WR_DATAX(0x19);
 953         LCD_WR_DATAX(0x00);
 954         LCD_WR_DATAX(0x21);
 955         LCD_WR_DATAX(0x00);
 956         LCD_WR_DATAX(0x2D);
 957         LCD_WR_DATAX(0x00);
 958         LCD_WR_DATAX(0x3D);
 959         LCD_WR_DATAX(0x00);
 960         LCD_WR_DATAX(0x5D);
 961         LCD_WR_DATAX(0x00);
 962         LCD_WR_DATAX(0x5D);
 963         LCD_WR_DATAX(0x00);
 964 
 965         LCD_WR_REG(0xB1);
 966         LCD_WR_DATAX(0x80);
 967         LCD_WR_DATAX(0x00);
 968         LCD_WR_DATAX(0x8B);
 969         LCD_WR_DATAX(0x00);
 970         LCD_WR_DATAX(0x96);
 971         LCD_WR_DATAX(0x00);
 972 
 973         LCD_WR_REG(0xB2);
 974         LCD_WR_DATAX(0x00);
 975         LCD_WR_DATAX(0x00);
 976         LCD_WR_DATAX(0x02);
 977         LCD_WR_DATAX(0x00);
 978         LCD_WR_DATAX(0x03);
 979         LCD_WR_DATAX(0x00);
 980 
 981         LCD_WR_REG(0xB3);
 982         LCD_WR_DATAX(0x00);
 983         LCD_WR_DATAX(0x00);
 984         LCD_WR_DATAX(0x00);
 985         LCD_WR_DATAX(0x00);
 986         LCD_WR_DATAX(0x00);
 987         LCD_WR_DATAX(0x00);
 988         LCD_WR_DATAX(0x00);
 989         LCD_WR_DATAX(0x00);
 990         LCD_WR_DATAX(0x00);
 991         LCD_WR_DATAX(0x00);
 992         LCD_WR_DATAX(0x00);
 993         LCD_WR_DATAX(0x00);
 994         LCD_WR_DATAX(0x00);
 995         LCD_WR_DATAX(0x00);
 996         LCD_WR_DATAX(0x00);
 997         LCD_WR_DATAX(0x00);
 998         LCD_WR_DATAX(0x00);
 999         LCD_WR_DATAX(0x00);
1000         LCD_WR_DATAX(0x00);
1001         LCD_WR_DATAX(0x00);
1002         LCD_WR_DATAX(0x00);
1003         LCD_WR_DATAX(0x00);
1004         LCD_WR_DATAX(0x00);
1005         LCD_WR_DATAX(0x00);
1006 
1007         LCD_WR_REG(0xB4);
1008         LCD_WR_DATAX(0x8B);
1009         LCD_WR_DATAX(0x00);
1010         LCD_WR_DATAX(0x96);
1011         LCD_WR_DATAX(0x00);
1012         LCD_WR_DATAX(0xA1);
1013         LCD_WR_DATAX(0x00);
1014 
1015         LCD_WR_REG(0xB5);
1016         LCD_WR_DATAX(0x02);
1017         LCD_WR_DATAX(0x00);
1018         LCD_WR_DATAX(0x03);
1019         LCD_WR_DATAX(0x00);
1020         LCD_WR_DATAX(0x04);
1021         LCD_WR_DATAX(0x00);
1022 
1023         LCD_WR_REG(0xB6);
1024         LCD_WR_DATAX(0x00);
1025         LCD_WR_DATAX(0x00);
1026 
1027         LCD_WR_REG(0xB7);
1028         LCD_WR_DATAX(0x00);
1029         LCD_WR_DATAX(0x00);
1030         LCD_WR_DATAX(0x3F);
1031         LCD_WR_DATAX(0x00);
1032         LCD_WR_DATAX(0x5E);
1033         LCD_WR_DATAX(0x00);
1034         LCD_WR_DATAX(0x64);
1035         LCD_WR_DATAX(0x00);
1036         LCD_WR_DATAX(0x8C);
1037         LCD_WR_DATAX(0x00);
1038         LCD_WR_DATAX(0xAC);
1039         LCD_WR_DATAX(0x00);
1040         LCD_WR_DATAX(0xDC);
1041         LCD_WR_DATAX(0x00);
1042         LCD_WR_DATAX(0x70);
1043         LCD_WR_DATAX(0x00);
1044         LCD_WR_DATAX(0x90);
1045         LCD_WR_DATAX(0x00);
1046         LCD_WR_DATAX(0xEB);
1047         LCD_WR_DATAX(0x00);
1048         LCD_WR_DATAX(0xDC);
1049         LCD_WR_DATAX(0x00);
1050 
1051         LCD_WR_REG(0xB8);
1052         LCD_WR_DATAX(0x00);
1053         LCD_WR_DATAX(0x00);
1054         LCD_WR_DATAX(0x00);
1055         LCD_WR_DATAX(0x00);
1056         LCD_WR_DATAX(0x00);
1057         LCD_WR_DATAX(0x00);
1058         LCD_WR_DATAX(0x00);
1059         LCD_WR_DATAX(0x00);
1060 
1061         LCD_WR_REG(0xBA);
1062         LCD_WR_DATAX(0x24);
1063         LCD_WR_DATAX(0x00);
1064         LCD_WR_DATAX(0x00);
1065         LCD_WR_DATAX(0x00);
1066 
1067         LCD_WR_REG(0xC1);
1068         LCD_WR_DATAX(0x20);
1069         LCD_WR_DATAX(0x00);
1070         LCD_WR_DATAX(0x54);
1071         LCD_WR_DATAX(0x00);
1072         LCD_WR_DATAX(0xFF);
1073         LCD_WR_DATAX(0x00);
1074 
1075         LCD_WR_REG(0xC2);
1076         LCD_WR_DATAX(0x0A);
1077         LCD_WR_DATAX(0x00);
1078         LCD_WR_DATAX(0x04);
1079         LCD_WR_DATAX(0x00);
1080 
1081         LCD_WR_REG(0xC3);
1082         LCD_WR_DATAX(0x3C);
1083         LCD_WR_DATAX(0x00);
1084         LCD_WR_DATAX(0x3A);
1085         LCD_WR_DATAX(0x00);
1086         LCD_WR_DATAX(0x39);
1087         LCD_WR_DATAX(0x00);
1088         LCD_WR_DATAX(0x37);
1089         LCD_WR_DATAX(0x00);
1090         LCD_WR_DATAX(0x3C);
1091         LCD_WR_DATAX(0x00);
1092         LCD_WR_DATAX(0x36);
1093         LCD_WR_DATAX(0x00);
1094         LCD_WR_DATAX(0x32);
1095         LCD_WR_DATAX(0x00);
1096         LCD_WR_DATAX(0x2F);
1097         LCD_WR_DATAX(0x00);
1098         LCD_WR_DATAX(0x2C);
1099         LCD_WR_DATAX(0x00);
1100         LCD_WR_DATAX(0x29);
1101         LCD_WR_DATAX(0x00);
1102         LCD_WR_DATAX(0x26);
1103         LCD_WR_DATAX(0x00);
1104         LCD_WR_DATAX(0x24);
1105         LCD_WR_DATAX(0x00);
1106         LCD_WR_DATAX(0x24);
1107         LCD_WR_DATAX(0x00);
1108         LCD_WR_DATAX(0x23);
1109         LCD_WR_DATAX(0x00);
1110         LCD_WR_DATAX(0x3C);
1111         LCD_WR_DATAX(0x00);
1112         LCD_WR_DATAX(0x36);
1113         LCD_WR_DATAX(0x00);
1114         LCD_WR_DATAX(0x32);
1115         LCD_WR_DATAX(0x00);
1116         LCD_WR_DATAX(0x2F);
1117         LCD_WR_DATAX(0x00);
1118         LCD_WR_DATAX(0x2C);
1119         LCD_WR_DATAX(0x00);
1120         LCD_WR_DATAX(0x29);
1121         LCD_WR_DATAX(0x00);
1122         LCD_WR_DATAX(0x26);
1123         LCD_WR_DATAX(0x00);
1124         LCD_WR_DATAX(0x24);
1125         LCD_WR_DATAX(0x00);
1126         LCD_WR_DATAX(0x24);
1127         LCD_WR_DATAX(0x00);
1128         LCD_WR_DATAX(0x23);
1129         LCD_WR_DATAX(0x00);
1130 
1131         LCD_WR_REG(0xC4);
1132         LCD_WR_DATAX(0x62);
1133         LCD_WR_DATAX(0x00);
1134         LCD_WR_DATAX(0x05);
1135         LCD_WR_DATAX(0x00);
1136         LCD_WR_DATAX(0x84);
1137         LCD_WR_DATAX(0x00);
1138         LCD_WR_DATAX(0xF0);
1139         LCD_WR_DATAX(0x00);
1140         LCD_WR_DATAX(0x18);
1141         LCD_WR_DATAX(0x00);
1142         LCD_WR_DATAX(0xA4);
1143         LCD_WR_DATAX(0x00);
1144         LCD_WR_DATAX(0x18);
1145         LCD_WR_DATAX(0x00);
1146         LCD_WR_DATAX(0x50);
1147         LCD_WR_DATAX(0x00);
1148         LCD_WR_DATAX(0x0C);
1149         LCD_WR_DATAX(0x00);
1150         LCD_WR_DATAX(0x17);
1151         LCD_WR_DATAX(0x00);
1152         LCD_WR_DATAX(0x95);
1153         LCD_WR_DATAX(0x00);
1154         LCD_WR_DATAX(0xF3);
1155         LCD_WR_DATAX(0x00);
1156         LCD_WR_DATAX(0xE6);
1157         LCD_WR_DATAX(0x00);
1158 
1159         LCD_WR_REG(0xC5);
1160         LCD_WR_DATAX(0x32);
1161         LCD_WR_DATAX(0x00);
1162         LCD_WR_DATAX(0x44);
1163         LCD_WR_DATAX(0x00);
1164         LCD_WR_DATAX(0x65);
1165         LCD_WR_DATAX(0x00);
1166         LCD_WR_DATAX(0x76);
1167         LCD_WR_DATAX(0x00);
1168         LCD_WR_DATAX(0x88);
1169         LCD_WR_DATAX(0x00);
1170 
1171         LCD_WR_REG(0xC6);
1172         LCD_WR_DATAX(0x20);
1173         LCD_WR_DATAX(0x00);
1174         LCD_WR_DATAX(0x17);
1175         LCD_WR_DATAX(0x00);
1176         LCD_WR_DATAX(0x01);
1177         LCD_WR_DATAX(0x00);
1178 
1179         LCD_WR_REG(0xC7);
1180         LCD_WR_DATAX(0x00);
1181         LCD_WR_DATAX(0x00);
1182         LCD_WR_DATAX(0x00);
1183         LCD_WR_DATAX(0x00);
1184 
1185         LCD_WR_REG(0xC8);
1186         LCD_WR_DATAX(0x00);
1187         LCD_WR_DATAX(0x00);
1188         LCD_WR_DATAX(0x00);
1189         LCD_WR_DATAX(0x00);
1190 
1191         LCD_WR_REG(0xC9);
1192         LCD_WR_DATAX(0x00);
1193         LCD_WR_DATAX(0x00);
1194         LCD_WR_DATAX(0x00);
1195         LCD_WR_DATAX(0x00);
1196         LCD_WR_DATAX(0x00);
1197         LCD_WR_DATAX(0x00);
1198         LCD_WR_DATAX(0x00);
1199         LCD_WR_DATAX(0x00);
1200         LCD_WR_DATAX(0x00);
1201         LCD_WR_DATAX(0x00);
1202         LCD_WR_DATAX(0x00);
1203         LCD_WR_DATAX(0x00);
1204         LCD_WR_DATAX(0x00);
1205         LCD_WR_DATAX(0x00);
1206         LCD_WR_DATAX(0x00);
1207         LCD_WR_DATAX(0x00);
1208 
1209         LCD_WR_REG(0xE0);
1210         LCD_WR_DATAX(0x16);
1211         LCD_WR_DATAX(0x00);
1212         LCD_WR_DATAX(0x1C);
1213         LCD_WR_DATAX(0x00);
1214         LCD_WR_DATAX(0x21);
1215         LCD_WR_DATAX(0x00);
1216         LCD_WR_DATAX(0x36);
1217         LCD_WR_DATAX(0x00);
1218         LCD_WR_DATAX(0x46);
1219         LCD_WR_DATAX(0x00);
1220         LCD_WR_DATAX(0x52);
1221         LCD_WR_DATAX(0x00);
1222         LCD_WR_DATAX(0x64);
1223         LCD_WR_DATAX(0x00);
1224         LCD_WR_DATAX(0x7A);
1225         LCD_WR_DATAX(0x00);
1226         LCD_WR_DATAX(0x8B);
1227         LCD_WR_DATAX(0x00);
1228         LCD_WR_DATAX(0x99);
1229         LCD_WR_DATAX(0x00);
1230         LCD_WR_DATAX(0xA8);
1231         LCD_WR_DATAX(0x00);
1232         LCD_WR_DATAX(0xB9);
1233         LCD_WR_DATAX(0x00);
1234         LCD_WR_DATAX(0xC4);
1235         LCD_WR_DATAX(0x00);
1236         LCD_WR_DATAX(0xCA);
1237         LCD_WR_DATAX(0x00);
1238         LCD_WR_DATAX(0xD2);
1239         LCD_WR_DATAX(0x00);
1240         LCD_WR_DATAX(0xD9);
1241         LCD_WR_DATAX(0x00);
1242         LCD_WR_DATAX(0xE0);
1243         LCD_WR_DATAX(0x00);
1244         LCD_WR_DATAX(0xF3);
1245         LCD_WR_DATAX(0x00);
1246 
1247         LCD_WR_REG(0xE1);
1248         LCD_WR_DATAX(0x16);
1249         LCD_WR_DATAX(0x00);
1250         LCD_WR_DATAX(0x1C);
1251         LCD_WR_DATAX(0x00);
1252         LCD_WR_DATAX(0x22);
1253         LCD_WR_DATAX(0x00);
1254         LCD_WR_DATAX(0x36);
1255         LCD_WR_DATAX(0x00);
1256         LCD_WR_DATAX(0x45);
1257         LCD_WR_DATAX(0x00);
1258         LCD_WR_DATAX(0x52);
1259         LCD_WR_DATAX(0x00);
1260         LCD_WR_DATAX(0x64);
1261         LCD_WR_DATAX(0x00);
1262         LCD_WR_DATAX(0x7A);
1263         LCD_WR_DATAX(0x00);
1264         LCD_WR_DATAX(0x8B);
1265         LCD_WR_DATAX(0x00);
1266         LCD_WR_DATAX(0x99);
1267         LCD_WR_DATAX(0x00);
1268         LCD_WR_DATAX(0xA8);
1269         LCD_WR_DATAX(0x00);
1270         LCD_WR_DATAX(0xB9);
1271         LCD_WR_DATAX(0x00);
1272         LCD_WR_DATAX(0xC4);
1273         LCD_WR_DATAX(0x00);
1274         LCD_WR_DATAX(0xCA);
1275         LCD_WR_DATAX(0x00);
1276         LCD_WR_DATAX(0xD2);
1277         LCD_WR_DATAX(0x00);
1278         LCD_WR_DATAX(0xD8);
1279         LCD_WR_DATAX(0x00);
1280         LCD_WR_DATAX(0xE0);
1281         LCD_WR_DATAX(0x00);
1282         LCD_WR_DATAX(0xF3);
1283         LCD_WR_DATAX(0x00);
1284 
1285         LCD_WR_REG(0xE2);
1286         LCD_WR_DATAX(0x05);
1287         LCD_WR_DATAX(0x00);
1288         LCD_WR_DATAX(0x0B);
1289         LCD_WR_DATAX(0x00);
1290         LCD_WR_DATAX(0x1B);
1291         LCD_WR_DATAX(0x00);
1292         LCD_WR_DATAX(0x34);
1293         LCD_WR_DATAX(0x00);
1294         LCD_WR_DATAX(0x44);
1295         LCD_WR_DATAX(0x00);
1296         LCD_WR_DATAX(0x4F);
1297         LCD_WR_DATAX(0x00);
1298         LCD_WR_DATAX(0x61);
1299         LCD_WR_DATAX(0x00);
1300         LCD_WR_DATAX(0x79);
1301         LCD_WR_DATAX(0x00);
1302         LCD_WR_DATAX(0x88);
1303         LCD_WR_DATAX(0x00);
1304         LCD_WR_DATAX(0x97);
1305         LCD_WR_DATAX(0x00);
1306         LCD_WR_DATAX(0xA6);
1307         LCD_WR_DATAX(0x00);
1308         LCD_WR_DATAX(0xB7);
1309         LCD_WR_DATAX(0x00);
1310         LCD_WR_DATAX(0xC2);
1311         LCD_WR_DATAX(0x00);
1312         LCD_WR_DATAX(0xC7);
1313         LCD_WR_DATAX(0x00);
1314         LCD_WR_DATAX(0xD1);
1315         LCD_WR_DATAX(0x00);
1316         LCD_WR_DATAX(0xD6);
1317         LCD_WR_DATAX(0x00);
1318         LCD_WR_DATAX(0xDD);
1319         LCD_WR_DATAX(0x00);
1320         LCD_WR_DATAX(0xF3);
1321         LCD_WR_DATAX(0x00);
1322         LCD_WR_REG(0xE3);
1323         LCD_WR_DATAX(0x05);
1324         LCD_WR_DATAX(0x00);
1325         LCD_WR_DATAX(0xA);
1326         LCD_WR_DATAX(0x00);
1327         LCD_WR_DATAX(0x1C);
1328         LCD_WR_DATAX(0x00);
1329         LCD_WR_DATAX(0x33);
1330         LCD_WR_DATAX(0x00);
1331         LCD_WR_DATAX(0x44);
1332         LCD_WR_DATAX(0x00);
1333         LCD_WR_DATAX(0x50);
1334         LCD_WR_DATAX(0x00);
1335         LCD_WR_DATAX(0x62);
1336         LCD_WR_DATAX(0x00);
1337         LCD_WR_DATAX(0x78);
1338         LCD_WR_DATAX(0x00);
1339         LCD_WR_DATAX(0x88);
1340         LCD_WR_DATAX(0x00);
1341         LCD_WR_DATAX(0x97);
1342         LCD_WR_DATAX(0x00);
1343         LCD_WR_DATAX(0xA6);
1344         LCD_WR_DATAX(0x00);
1345         LCD_WR_DATAX(0xB7);
1346         LCD_WR_DATAX(0x00);
1347         LCD_WR_DATAX(0xC2);
1348         LCD_WR_DATAX(0x00);
1349         LCD_WR_DATAX(0xC7);
1350         LCD_WR_DATAX(0x00);
1351         LCD_WR_DATAX(0xD1);
1352         LCD_WR_DATAX(0x00);
1353         LCD_WR_DATAX(0xD5);
1354         LCD_WR_DATAX(0x00);
1355         LCD_WR_DATAX(0xDD);
1356         LCD_WR_DATAX(0x00);
1357         LCD_WR_DATAX(0xF3);
1358         LCD_WR_DATAX(0x00);
1359 
1360         LCD_WR_REG(0xE4);
1361         LCD_WR_DATAX(0x01);
1362         LCD_WR_DATAX(0x00);
1363         LCD_WR_DATAX(0x01);
1364         LCD_WR_DATAX(0x00);
1365         LCD_WR_DATAX(0x02);
1366         LCD_WR_DATAX(0x00);
1367         LCD_WR_DATAX(0x2A);
1368         LCD_WR_DATAX(0x00);
1369         LCD_WR_DATAX(0x3C);
1370         LCD_WR_DATAX(0x00);
1371         LCD_WR_DATAX(0x4B);
1372         LCD_WR_DATAX(0x00);
1373         LCD_WR_DATAX(0x5D);
1374         LCD_WR_DATAX(0x00);
1375         LCD_WR_DATAX(0x74);
1376         LCD_WR_DATAX(0x00);
1377         LCD_WR_DATAX(0x84);
1378         LCD_WR_DATAX(0x00);
1379         LCD_WR_DATAX(0x93);
1380         LCD_WR_DATAX(0x00);
1381         LCD_WR_DATAX(0xA2);
1382         LCD_WR_DATAX(0x00);
1383         LCD_WR_DATAX(0xB3);
1384         LCD_WR_DATAX(0x00);
1385         LCD_WR_DATAX(0xBE);
1386         LCD_WR_DATAX(0x00);
1387         LCD_WR_DATAX(0xC4);
1388         LCD_WR_DATAX(0x00);
1389         LCD_WR_DATAX(0xCD);
1390         LCD_WR_DATAX(0x00);
1391         LCD_WR_DATAX(0xD3);
1392         LCD_WR_DATAX(0x00);
1393         LCD_WR_DATAX(0xDD);
1394         LCD_WR_DATAX(0x00);
1395         LCD_WR_DATAX(0xF3);
1396         LCD_WR_DATAX(0x00);
1397         LCD_WR_REG(0xE5);
1398         LCD_WR_DATAX(0x00);
1399         LCD_WR_DATAX(0x00);
1400         LCD_WR_DATAX(0x00);
1401         LCD_WR_DATAX(0x00);
1402         LCD_WR_DATAX(0x02);
1403         LCD_WR_DATAX(0x00);
1404         LCD_WR_DATAX(0x29);
1405         LCD_WR_DATAX(0x00);
1406         LCD_WR_DATAX(0x3C);
1407         LCD_WR_DATAX(0x00);
1408         LCD_WR_DATAX(0x4B);
1409         LCD_WR_DATAX(0x00);
1410         LCD_WR_DATAX(0x5D);
1411         LCD_WR_DATAX(0x00);
1412         LCD_WR_DATAX(0x74);
1413         LCD_WR_DATAX(0x00);
1414         LCD_WR_DATAX(0x84);
1415         LCD_WR_DATAX(0x00);
1416         LCD_WR_DATAX(0x93);
1417         LCD_WR_DATAX(0x00);
1418         LCD_WR_DATAX(0xA2);
1419         LCD_WR_DATAX(0x00);
1420         LCD_WR_DATAX(0xB3);
1421         LCD_WR_DATAX(0x00);
1422         LCD_WR_DATAX(0xBE);
1423         LCD_WR_DATAX(0x00);
1424         LCD_WR_DATAX(0xC4);
1425         LCD_WR_DATAX(0x00);
1426         LCD_WR_DATAX(0xCD);
1427         LCD_WR_DATAX(0x00);
1428         LCD_WR_DATAX(0xD3);
1429         LCD_WR_DATAX(0x00);
1430         LCD_WR_DATAX(0xDC);
1431         LCD_WR_DATAX(0x00);
1432         LCD_WR_DATAX(0xF3);
1433         LCD_WR_DATAX(0x00);
1434 
1435         LCD_WR_REG(0xE6);
1436         LCD_WR_DATAX(0x11);
1437         LCD_WR_DATAX(0x00);
1438         LCD_WR_DATAX(0x34);
1439         LCD_WR_DATAX(0x00);
1440         LCD_WR_DATAX(0x56);
1441         LCD_WR_DATAX(0x00);
1442         LCD_WR_DATAX(0x76);
1443         LCD_WR_DATAX(0x00);
1444         LCD_WR_DATAX(0x77);
1445         LCD_WR_DATAX(0x00);
1446         LCD_WR_DATAX(0x66);
1447         LCD_WR_DATAX(0x00);
1448         LCD_WR_DATAX(0x88);
1449         LCD_WR_DATAX(0x00);
1450         LCD_WR_DATAX(0x99);
1451         LCD_WR_DATAX(0x00);
1452         LCD_WR_DATAX(0xBB);
1453         LCD_WR_DATAX(0x00);
1454         LCD_WR_DATAX(0x99);
1455         LCD_WR_DATAX(0x00);
1456         LCD_WR_DATAX(0x66);
1457         LCD_WR_DATAX(0x00);
1458         LCD_WR_DATAX(0x55);
1459         LCD_WR_DATAX(0x00);
1460         LCD_WR_DATAX(0x55);
1461         LCD_WR_DATAX(0x00);
1462         LCD_WR_DATAX(0x45);
1463         LCD_WR_DATAX(0x00);
1464         LCD_WR_DATAX(0x43);
1465         LCD_WR_DATAX(0x00);
1466         LCD_WR_DATAX(0x44);
1467         LCD_WR_DATAX(0x00);
1468 
1469         LCD_WR_REG(0xE7);
1470         LCD_WR_DATAX(0x32);
1471         LCD_WR_DATAX(0x00);
1472         LCD_WR_DATAX(0x55);
1473         LCD_WR_DATAX(0x00);
1474         LCD_WR_DATAX(0x76);
1475         LCD_WR_DATAX(0x00);
1476         LCD_WR_DATAX(0x66);
1477         LCD_WR_DATAX(0x00);
1478         LCD_WR_DATAX(0x67);
1479         LCD_WR_DATAX(0x00);
1480         LCD_WR_DATAX(0x67);
1481         LCD_WR_DATAX(0x00);
1482         LCD_WR_DATAX(0x87);
1483         LCD_WR_DATAX(0x00);
1484         LCD_WR_DATAX(0x99);
1485         LCD_WR_DATAX(0x00);
1486         LCD_WR_DATAX(0xBB);
1487         LCD_WR_DATAX(0x00);
1488         LCD_WR_DATAX(0x99);
1489         LCD_WR_DATAX(0x00);
1490         LCD_WR_DATAX(0x77);
1491         LCD_WR_DATAX(0x00);
1492         LCD_WR_DATAX(0x44);
1493         LCD_WR_DATAX(0x00);
1494         LCD_WR_DATAX(0x56);
1495         LCD_WR_DATAX(0x00);
1496         LCD_WR_DATAX(0x23); 
1497         LCD_WR_DATAX(0x00);
1498         LCD_WR_DATAX(0x33);
1499         LCD_WR_DATAX(0x00);
1500         LCD_WR_DATAX(0x45);
1501         LCD_WR_DATAX(0x00);
1502 
1503         LCD_WR_REG(0xE8);
1504         LCD_WR_DATAX(0x00);
1505         LCD_WR_DATAX(0x00);
1506         LCD_WR_DATAX(0x99);
1507         LCD_WR_DATAX(0x00);
1508         LCD_WR_DATAX(0x87);
1509         LCD_WR_DATAX(0x00);
1510         LCD_WR_DATAX(0x88);
1511         LCD_WR_DATAX(0x00);
1512         LCD_WR_DATAX(0x77);
1513         LCD_WR_DATAX(0x00);
1514         LCD_WR_DATAX(0x66);
1515         LCD_WR_DATAX(0x00);
1516         LCD_WR_DATAX(0x88);
1517         LCD_WR_DATAX(0x00);
1518         LCD_WR_DATAX(0xAA);
1519         LCD_WR_DATAX(0x00);
1520         LCD_WR_DATAX(0xBB);
1521         LCD_WR_DATAX(0x00);
1522         LCD_WR_DATAX(0x99);
1523         LCD_WR_DATAX(0x00);
1524         LCD_WR_DATAX(0x66);
1525         LCD_WR_DATAX(0x00);
1526         LCD_WR_DATAX(0x55);
1527         LCD_WR_DATAX(0x00);
1528         LCD_WR_DATAX(0x55);
1529         LCD_WR_DATAX(0x00);
1530         LCD_WR_DATAX(0x44);
1531         LCD_WR_DATAX(0x00);
1532         LCD_WR_DATAX(0x44);
1533         LCD_WR_DATAX(0x00);
1534         LCD_WR_DATAX(0x55);
1535         LCD_WR_DATAX(0x00);
1536 
1537         LCD_WR_REG(0xE9);
1538         LCD_WR_DATAX(0xAA);
1539         LCD_WR_DATAX(0x00);
1540         LCD_WR_DATAX(0x00);
1541         LCD_WR_DATAX(0x00);
1542 
1543         LCD_WR_REG(0x00);
1544         LCD_WR_DATAX(0xAA);
1545 
1546         LCD_WR_REG(0xCF);
1547         LCD_WR_DATAX(0x00);
1548         LCD_WR_DATAX(0x00);
1549         LCD_WR_DATAX(0x00);
1550         LCD_WR_DATAX(0x00);
1551         LCD_WR_DATAX(0x00);
1552         LCD_WR_DATAX(0x00);
1553         LCD_WR_DATAX(0x00);
1554         LCD_WR_DATAX(0x00);
1555         LCD_WR_DATAX(0x00);
1556         LCD_WR_DATAX(0x00);
1557         LCD_WR_DATAX(0x00);
1558         LCD_WR_DATAX(0x00);
1559         LCD_WR_DATAX(0x00);
1560         LCD_WR_DATAX(0x00);
1561         LCD_WR_DATAX(0x00);
1562         LCD_WR_DATAX(0x00);
1563         LCD_WR_DATAX(0x00);
1564 
1565         LCD_WR_REG(0xF0);
1566         LCD_WR_DATAX(0x00);
1567         LCD_WR_DATAX(0x50);
1568         LCD_WR_DATAX(0x00);
1569         LCD_WR_DATAX(0x00);
1570         LCD_WR_DATAX(0x00);
1571 
1572         LCD_WR_REG(0xF3);
1573         LCD_WR_DATAX(0x00);
1574 
1575         LCD_WR_REG(0xF9);
1576         LCD_WR_DATAX(0x06);
1577         LCD_WR_DATAX(0x10);
1578         LCD_WR_DATAX(0x29);
1579         LCD_WR_DATAX(0x00);
1580 
1581         LCD_WR_REG(0x3A);
1582         LCD_WR_DATAX(0x55);    //66
1583 
1584         LCD_WR_REG(0x11);
1585         delay_ms(100);
1586         LCD_WR_REG(0x29);
1587         LCD_WR_REG(0x35);
1588         LCD_WR_DATAX(0x00);
1589 
1590         LCD_WR_REG(0x51);
1591         LCD_WR_DATAX(0xFF);
1592         LCD_WR_REG(0x53);
1593         LCD_WR_DATAX(0x2C);
1594         LCD_WR_REG(0x55);
1595         LCD_WR_DATAX(0x82);
1596         LCD_WR_REG(0x2c); 
1597     }else if(lcddev.id==0x5510)
1598     {
1599         LCD_WriteReg(0xF000,0x55);
1600         LCD_WriteReg(0xF001,0xAA);
1601         LCD_WriteReg(0xF002,0x52);
1602         LCD_WriteReg(0xF003,0x08);
1603         LCD_WriteReg(0xF004,0x01);
1604         //AVDD Set AVDD 5.2V
1605         LCD_WriteReg(0xB000,0x0D);
1606         LCD_WriteReg(0xB001,0x0D);
1607         LCD_WriteReg(0xB002,0x0D);
1608         //AVDD ratio
1609         LCD_WriteReg(0xB600,0x34);
1610         LCD_WriteReg(0xB601,0x34);
1611         LCD_WriteReg(0xB602,0x34);
1612         //AVEE -5.2V
1613         LCD_WriteReg(0xB100,0x0D);
1614         LCD_WriteReg(0xB101,0x0D);
1615         LCD_WriteReg(0xB102,0x0D);
1616         //AVEE ratio
1617         LCD_WriteReg(0xB700,0x34);
1618         LCD_WriteReg(0xB701,0x34);
1619         LCD_WriteReg(0xB702,0x34);
1620         //VCL -2.5V
1621         LCD_WriteReg(0xB200,0x00);
1622         LCD_WriteReg(0xB201,0x00);
1623         LCD_WriteReg(0xB202,0x00);
1624         //VCL ratio
1625         LCD_WriteReg(0xB800,0x24);
1626         LCD_WriteReg(0xB801,0x24);
1627         LCD_WriteReg(0xB802,0x24);
1628         //VGH 15V (Free pump)
1629         LCD_WriteReg(0xBF00,0x01);
1630         LCD_WriteReg(0xB300,0x0F);
1631         LCD_WriteReg(0xB301,0x0F);
1632         LCD_WriteReg(0xB302,0x0F);
1633         //VGH ratio
1634         LCD_WriteReg(0xB900,0x34);
1635         LCD_WriteReg(0xB901,0x34);
1636         LCD_WriteReg(0xB902,0x34);
1637         //VGL_REG -10V
1638         LCD_WriteReg(0xB500,0x08);
1639         LCD_WriteReg(0xB501,0x08);
1640         LCD_WriteReg(0xB502,0x08);
1641         LCD_WriteReg(0xC200,0x03);
1642         //VGLX ratio
1643         LCD_WriteReg(0xBA00,0x24);
1644         LCD_WriteReg(0xBA01,0x24);
1645         LCD_WriteReg(0xBA02,0x24);
1646         //VGMP/VGSP 4.5V/0V
1647         LCD_WriteReg(0xBC00,0x00);
1648         LCD_WriteReg(0xBC01,0x78);
1649         LCD_WriteReg(0xBC02,0x00);
1650         //VGMN/VGSN -4.5V/0V
1651         LCD_WriteReg(0xBD00,0x00);
1652         LCD_WriteReg(0xBD01,0x78);
1653         LCD_WriteReg(0xBD02,0x00);
1654         //VCOM
1655         LCD_WriteReg(0xBE00,0x00);
1656         LCD_WriteReg(0xBE01,0x64);
1657         //Gamma Setting
1658         LCD_WriteReg(0xD100,0x00);
1659         LCD_WriteReg(0xD101,0x33);
1660         LCD_WriteReg(0xD102,0x00);
1661         LCD_WriteReg(0xD103,0x34);
1662         LCD_WriteReg(0xD104,0x00);
1663         LCD_WriteReg(0xD105,0x3A);
1664         LCD_WriteReg(0xD106,0x00);
1665         LCD_WriteReg(0xD107,0x4A);
1666         LCD_WriteReg(0xD108,0x00);
1667         LCD_WriteReg(0xD109,0x5C);
1668         LCD_WriteReg(0xD10A,0x00);
1669         LCD_WriteReg(0xD10B,0x81);
1670         LCD_WriteReg(0xD10C,0x00);
1671         LCD_WriteReg(0xD10D,0xA6);
1672         LCD_WriteReg(0xD10E,0x00);
1673         LCD_WriteReg(0xD10F,0xE5);
1674         LCD_WriteReg(0xD110,0x01);
1675         LCD_WriteReg(0xD111,0x13);
1676         LCD_WriteReg(0xD112,0x01);
1677         LCD_WriteReg(0xD113,0x54);
1678         LCD_WriteReg(0xD114,0x01);
1679         LCD_WriteReg(0xD115,0x82);
1680         LCD_WriteReg(0xD116,0x01);
1681         LCD_WriteReg(0xD117,0xCA);
1682         LCD_WriteReg(0xD118,0x02);
1683         LCD_WriteReg(0xD119,0x00);
1684         LCD_WriteReg(0xD11A,0x02);
1685         LCD_WriteReg(0xD11B,0x01);
1686         LCD_WriteReg(0xD11C,0x02);
1687         LCD_WriteReg(0xD11D,0x34);
1688         LCD_WriteReg(0xD11E,0x02);
1689         LCD_WriteReg(0xD11F,0x67);
1690         LCD_WriteReg(0xD120,0x02);
1691         LCD_WriteReg(0xD121,0x84);
1692         LCD_WriteReg(0xD122,0x02);
1693         LCD_WriteReg(0xD123,0xA4);
1694         LCD_WriteReg(0xD124,0x02);
1695         LCD_WriteReg(0xD125,0xB7);
1696         LCD_WriteReg(0xD126,0x02);
1697         LCD_WriteReg(0xD127,0xCF);
1698         LCD_WriteReg(0xD128,0x02);
1699         LCD_WriteReg(0xD129,0xDE);
1700         LCD_WriteReg(0xD12A,0x02);
1701         LCD_WriteReg(0xD12B,0xF2);
1702         LCD_WriteReg(0xD12C,0x02);
1703         LCD_WriteReg(0xD12D,0xFE);
1704         LCD_WriteReg(0xD12E,0x03);
1705         LCD_WriteReg(0xD12F,0x10);
1706         LCD_WriteReg(0xD130,0x03);
1707         LCD_WriteReg(0xD131,0x33);
1708         LCD_WriteReg(0xD132,0x03);
1709         LCD_WriteReg(0xD133,0x6D);
1710         LCD_WriteReg(0xD200,0x00);
1711         LCD_WriteReg(0xD201,0x33);
1712         LCD_WriteReg(0xD202,0x00);
1713         LCD_WriteReg(0xD203,0x34);
1714         LCD_WriteReg(0xD204,0x00);
1715         LCD_WriteReg(0xD205,0x3A);
1716         LCD_WriteReg(0xD206,0x00);
1717         LCD_WriteReg(0xD207,0x4A);
1718         LCD_WriteReg(0xD208,0x00);
1719         LCD_WriteReg(0xD209,0x5C);
1720         LCD_WriteReg(0xD20A,0x00);
1721 
1722         LCD_WriteReg(0xD20B,0x81);
1723         LCD_WriteReg(0xD20C,0x00);
1724         LCD_WriteReg(0xD20D,0xA6);
1725         LCD_WriteReg(0xD20E,0x00);
1726         LCD_WriteReg(0xD20F,0xE5);
1727         LCD_WriteReg(0xD210,0x01);
1728         LCD_WriteReg(0xD211,0x13);
1729         LCD_WriteReg(0xD212,0x01);
1730         LCD_WriteReg(0xD213,0x54);
1731         LCD_WriteReg(0xD214,0x01);
1732         LCD_WriteReg(0xD215,0x82);
1733         LCD_WriteReg(0xD216,0x01);
1734         LCD_WriteReg(0xD217,0xCA);
1735         LCD_WriteReg(0xD218,0x02);
1736         LCD_WriteReg(0xD219,0x00);
1737         LCD_WriteReg(0xD21A,0x02);
1738         LCD_WriteReg(0xD21B,0x01);
1739         LCD_WriteReg(0xD21C,0x02);
1740         LCD_WriteReg(0xD21D,0x34);
1741         LCD_WriteReg(0xD21E,0x02);
1742         LCD_WriteReg(0xD21F,0x67);
1743         LCD_WriteReg(0xD220,0x02);
1744         LCD_WriteReg(0xD221,0x84);
1745         LCD_WriteReg(0xD222,0x02);
1746         LCD_WriteReg(0xD223,0xA4);
1747         LCD_WriteReg(0xD224,0x02);
1748         LCD_WriteReg(0xD225,0xB7);
1749         LCD_WriteReg(0xD226,0x02);
1750         LCD_WriteReg(0xD227,0xCF);
1751         LCD_WriteReg(0xD228,0x02);
1752         LCD_WriteReg(0xD229,0xDE);
1753         LCD_WriteReg(0xD22A,0x02);
1754         LCD_WriteReg(0xD22B,0xF2);
1755         LCD_WriteReg(0xD22C,0x02);
1756         LCD_WriteReg(0xD22D,0xFE);
1757         LCD_WriteReg(0xD22E,0x03);
1758         LCD_WriteReg(0xD22F,0x10);
1759         LCD_WriteReg(0xD230,0x03);
1760         LCD_WriteReg(0xD231,0x33);
1761         LCD_WriteReg(0xD232,0x03);
1762         LCD_WriteReg(0xD233,0x6D);
1763         LCD_WriteReg(0xD300,0x00);
1764         LCD_WriteReg(0xD301,0x33);
1765         LCD_WriteReg(0xD302,0x00);
1766         LCD_WriteReg(0xD303,0x34);
1767         LCD_WriteReg(0xD304,0x00);
1768         LCD_WriteReg(0xD305,0x3A);
1769         LCD_WriteReg(0xD306,0x00);
1770         LCD_WriteReg(0xD307,0x4A);
1771         LCD_WriteReg(0xD308,0x00);
1772         LCD_WriteReg(0xD309,0x5C);
1773         LCD_WriteReg(0xD30A,0x00);
1774 
1775         LCD_WriteReg(0xD30B,0x81);
1776         LCD_WriteReg(0xD30C,0x00);
1777         LCD_WriteReg(0xD30D,0xA6);
1778         LCD_WriteReg(0xD30E,0x00);
1779         LCD_WriteReg(0xD30F,0xE5);
1780         LCD_WriteReg(0xD310,0x01);
1781         LCD_WriteReg(0xD311,0x13);
1782         LCD_WriteReg(0xD312,0x01);
1783         LCD_WriteReg(0xD313,0x54);
1784         LCD_WriteReg(0xD314,0x01);
1785         LCD_WriteReg(0xD315,0x82);
1786         LCD_WriteReg(0xD316,0x01);
1787         LCD_WriteReg(0xD317,0xCA);
1788         LCD_WriteReg(0xD318,0x02);
1789         LCD_WriteReg(0xD319,0x00);
1790         LCD_WriteReg(0xD31A,0x02);
1791         LCD_WriteReg(0xD31B,0x01);
1792         LCD_WriteReg(0xD31C,0x02);
1793         LCD_WriteReg(0xD31D,0x34);
1794         LCD_WriteReg(0xD31E,0x02);
1795         LCD_WriteReg(0xD31F,0x67);
1796         LCD_WriteReg(0xD320,0x02);
1797         LCD_WriteReg(0xD321,0x84);
1798         LCD_WriteReg(0xD322,0x02);
1799         LCD_WriteReg(0xD323,0xA4);
1800         LCD_WriteReg(0xD324,0x02);
1801         LCD_WriteReg(0xD325,0xB7);
1802         LCD_WriteReg(0xD326,0x02);
1803         LCD_WriteReg(0xD327,0xCF);
1804         LCD_WriteReg(0xD328,0x02);
1805         LCD_WriteReg(0xD329,0xDE);
1806         LCD_WriteReg(0xD32A,0x02);
1807         LCD_WriteReg(0xD32B,0xF2);
1808         LCD_WriteReg(0xD32C,0x02);
1809         LCD_WriteReg(0xD32D,0xFE);
1810         LCD_WriteReg(0xD32E,0x03);
1811         LCD_WriteReg(0xD32F,0x10);
1812         LCD_WriteReg(0xD330,0x03);
1813         LCD_WriteReg(0xD331,0x33);
1814         LCD_WriteReg(0xD332,0x03);
1815         LCD_WriteReg(0xD333,0x6D);
1816         LCD_WriteReg(0xD400,0x00);
1817         LCD_WriteReg(0xD401,0x33);
1818         LCD_WriteReg(0xD402,0x00);
1819         LCD_WriteReg(0xD403,0x34);
1820         LCD_WriteReg(0xD404,0x00);
1821         LCD_WriteReg(0xD405,0x3A);
1822         LCD_WriteReg(0xD406,0x00);
1823         LCD_WriteReg(0xD407,0x4A);
1824         LCD_WriteReg(0xD408,0x00);
1825         LCD_WriteReg(0xD409,0x5C);
1826         LCD_WriteReg(0xD40A,0x00);
1827         LCD_WriteReg(0xD40B,0x81);
1828 
1829         LCD_WriteReg(0xD40C,0x00);
1830         LCD_WriteReg(0xD40D,0xA6);
1831         LCD_WriteReg(0xD40E,0x00);
1832         LCD_WriteReg(0xD40F,0xE5);
1833         LCD_WriteReg(0xD410,0x01);
1834         LCD_WriteReg(0xD411,0x13);
1835         LCD_WriteReg(0xD412,0x01);
1836         LCD_WriteReg(0xD413,0x54);
1837         LCD_WriteReg(0xD414,0x01);
1838         LCD_WriteReg(0xD415,0x82);
1839         LCD_WriteReg(0xD416,0x01);
1840         LCD_WriteReg(0xD417,0xCA);
1841         LCD_WriteReg(0xD418,0x02);
1842         LCD_WriteReg(0xD419,0x00);
1843         LCD_WriteReg(0xD41A,0x02);
1844         LCD_WriteReg(0xD41B,0x01);
1845         LCD_WriteReg(0xD41C,0x02);
1846         LCD_WriteReg(0xD41D,0x34);
1847         LCD_WriteReg(0xD41E,0x02);
1848         LCD_WriteReg(0xD41F,0x67);
1849         LCD_WriteReg(0xD420,0x02);
1850         LCD_WriteReg(0xD421,0x84);
1851         LCD_WriteReg(0xD422,0x02);
1852         LCD_WriteReg(0xD423,0xA4);
1853         LCD_WriteReg(0xD424,0x02);
1854         LCD_WriteReg(0xD425,0xB7);
1855         LCD_WriteReg(0xD426,0x02);
1856         LCD_WriteReg(0xD427,0xCF);
1857         LCD_WriteReg(0xD428,0x02);
1858         LCD_WriteReg(0xD429,0xDE);
1859         LCD_WriteReg(0xD42A,0x02);
1860         LCD_WriteReg(0xD42B,0xF2);
1861         LCD_WriteReg(0xD42C,0x02);
1862         LCD_WriteReg(0xD42D,0xFE);
1863         LCD_WriteReg(0xD42E,0x03);
1864         LCD_WriteReg(0xD42F,0x10);
1865         LCD_WriteReg(0xD430,0x03);
1866         LCD_WriteReg(0xD431,0x33);
1867         LCD_WriteReg(0xD432,0x03);
1868         LCD_WriteReg(0xD433,0x6D);
1869         LCD_WriteReg(0xD500,0x00);
1870         LCD_WriteReg(0xD501,0x33);
1871         LCD_WriteReg(0xD502,0x00);
1872         LCD_WriteReg(0xD503,0x34);
1873         LCD_WriteReg(0xD504,0x00);
1874         LCD_WriteReg(0xD505,0x3A);
1875         LCD_WriteReg(0xD506,0x00);
1876         LCD_WriteReg(0xD507,0x4A);
1877         LCD_WriteReg(0xD508,0x00);
1878         LCD_WriteReg(0xD509,0x5C);
1879         LCD_WriteReg(0xD50A,0x00);
1880         LCD_WriteReg(0xD50B,0x81);
1881 
1882         LCD_WriteReg(0xD50C,0x00);
1883         LCD_WriteReg(0xD50D,0xA6);
1884         LCD_WriteReg(0xD50E,0x00);
1885         LCD_WriteReg(0xD50F,0xE5);
1886         LCD_WriteReg(0xD510,0x01);
1887         LCD_WriteReg(0xD511,0x13);
1888         LCD_WriteReg(0xD512,0x01);
1889         LCD_WriteReg(0xD513,0x54);
1890         LCD_WriteReg(0xD514,0x01);
1891         LCD_WriteReg(0xD515,0x82);
1892         LCD_WriteReg(0xD516,0x01);
1893         LCD_WriteReg(0xD517,0xCA);
1894         LCD_WriteReg(0xD518,0x02);
1895         LCD_WriteReg(0xD519,0x00);
1896         LCD_WriteReg(0xD51A,0x02);
1897         LCD_WriteReg(0xD51B,0x01);
1898         LCD_WriteReg(0xD51C,0x02);
1899         LCD_WriteReg(0xD51D,0x34);
1900         LCD_WriteReg(0xD51E,0x02);
1901         LCD_WriteReg(0xD51F,0x67);
1902         LCD_WriteReg(0xD520,0x02);
1903         LCD_WriteReg(0xD521,0x84);
1904         LCD_WriteReg(0xD522,0x02);
1905         LCD_WriteReg(0xD523,0xA4);
1906         LCD_WriteReg(0xD524,0x02);
1907         LCD_WriteReg(0xD525,0xB7);
1908         LCD_WriteReg(0xD526,0x02);
1909         LCD_WriteReg(0xD527,0xCF);
1910         LCD_WriteReg(0xD528,0x02);
1911         LCD_WriteReg(0xD529,0xDE);
1912         LCD_WriteReg(0xD52A,0x02);
1913         LCD_WriteReg(0xD52B,0xF2);
1914         LCD_WriteReg(0xD52C,0x02);
1915         LCD_WriteReg(0xD52D,0xFE);
1916         LCD_WriteReg(0xD52E,0x03);
1917         LCD_WriteReg(0xD52F,0x10);
1918         LCD_WriteReg(0xD530,0x03);
1919         LCD_WriteReg(0xD531,0x33);
1920         LCD_WriteReg(0xD532,0x03);
1921         LCD_WriteReg(0xD533,0x6D);
1922         LCD_WriteReg(0xD600,0x00);
1923         LCD_WriteReg(0xD601,0x33);
1924         LCD_WriteReg(0xD602,0x00);
1925         LCD_WriteReg(0xD603,0x34);
1926         LCD_WriteReg(0xD604,0x00);
1927         LCD_WriteReg(0xD605,0x3A);
1928         LCD_WriteReg(0xD606,0x00);
1929         LCD_WriteReg(0xD607,0x4A);
1930         LCD_WriteReg(0xD608,0x00);
1931         LCD_WriteReg(0xD609,0x5C);
1932         LCD_WriteReg(0xD60A,0x00);
1933         LCD_WriteReg(0xD60B,0x81);
1934 
1935         LCD_WriteReg(0xD60C,0x00);
1936         LCD_WriteReg(0xD60D,0xA6);
1937         LCD_WriteReg(0xD60E,0x00);
1938         LCD_WriteReg(0xD60F,0xE5);
1939         LCD_WriteReg(0xD610,0x01);
1940         LCD_WriteReg(0xD611,0x13);
1941         LCD_WriteReg(0xD612,0x01);
1942         LCD_WriteReg(0xD613,0x54);
1943         LCD_WriteReg(0xD614,0x01);
1944         LCD_WriteReg(0xD615,0x82);
1945         LCD_WriteReg(0xD616,0x01);
1946         LCD_WriteReg(0xD617,0xCA);
1947         LCD_WriteReg(0xD618,0x02);
1948         LCD_WriteReg(0xD619,0x00);
1949         LCD_WriteReg(0xD61A,0x02);
1950         LCD_WriteReg(0xD61B,0x01);
1951         LCD_WriteReg(0xD61C,0x02);
1952         LCD_WriteReg(0xD61D,0x34);
1953         LCD_WriteReg(0xD61E,0x02);
1954         LCD_WriteReg(0xD61F,0x67);
1955         LCD_WriteReg(0xD620,0x02);
1956         LCD_WriteReg(0xD621,0x84);
1957         LCD_WriteReg(0xD622,0x02);
1958         LCD_WriteReg(0xD623,0xA4);
1959         LCD_WriteReg(0xD624,0x02);
1960         LCD_WriteReg(0xD625,0xB7);
1961         LCD_WriteReg(0xD626,0x02);
1962         LCD_WriteReg(0xD627,0xCF);
1963         LCD_WriteReg(0xD628,0x02);
1964         LCD_WriteReg(0xD629,0xDE);
1965         LCD_WriteReg(0xD62A,0x02);
1966         LCD_WriteReg(0xD62B,0xF2);
1967         LCD_WriteReg(0xD62C,0x02);
1968         LCD_WriteReg(0xD62D,0xFE);
1969         LCD_WriteReg(0xD62E,0x03);
1970         LCD_WriteReg(0xD62F,0x10);
1971         LCD_WriteReg(0xD630,0x03);
1972         LCD_WriteReg(0xD631,0x33);
1973         LCD_WriteReg(0xD632,0x03);
1974         LCD_WriteReg(0xD633,0x6D);
1975         //LV2 Page 0 enable
1976         LCD_WriteReg(0xF000,0x55);
1977         LCD_WriteReg(0xF001,0xAA);
1978         LCD_WriteReg(0xF002,0x52);
1979         LCD_WriteReg(0xF003,0x08);
1980         LCD_WriteReg(0xF004,0x00);
1981         //Display control
1982         LCD_WriteReg(0xB100, 0xCC);
1983         LCD_WriteReg(0xB101, 0x00);
1984         //Source hold time
1985         LCD_WriteReg(0xB600,0x05);
1986         //Gate EQ control
1987         LCD_WriteReg(0xB700,0x70);
1988         LCD_WriteReg(0xB701,0x70);
1989         //Source EQ control (Mode 2)
1990         LCD_WriteReg(0xB800,0x01);
1991         LCD_WriteReg(0xB801,0x03);
1992         LCD_WriteReg(0xB802,0x03);
1993         LCD_WriteReg(0xB803,0x03);
1994         //Inversion mode (2-dot)
1995         LCD_WriteReg(0xBC00,0x02);
1996         LCD_WriteReg(0xBC01,0x00);
1997         LCD_WriteReg(0xBC02,0x00);
1998         //Timing control 4H w/ 4-delay
1999         LCD_WriteReg(0xC900,0xD0);
2000         LCD_WriteReg(0xC901,0x02);
2001         LCD_WriteReg(0xC902,0x50);
2002         LCD_WriteReg(0xC903,0x50);
2003         LCD_WriteReg(0xC904,0x50);
2004         LCD_WriteReg(0x3500,0x00);
2005         LCD_WriteReg(0x3A00,0x55);  //16-bit/pixel
2006         LCD_WR_REG(0x1100);
2007         delay_us(120);
2008         LCD_WR_REG(0x2900);
2009     }else if(lcddev.id==0x9325)//9325
2010     {
2011         LCD_WriteReg(0x00E5,0x78F0); 
2012         LCD_WriteReg(0x0001,0x0100); 
2013         LCD_WriteReg(0x0002,0x0700); 
2014         LCD_WriteReg(0x0003,0x1030); 
2015         LCD_WriteReg(0x0004,0x0000); 
2016         LCD_WriteReg(0x0008,0x0202);  
2017         LCD_WriteReg(0x0009,0x0000);
2018         LCD_WriteReg(0x000A,0x0000); 
2019         LCD_WriteReg(0x000C,0x0000); 
2020         LCD_WriteReg(0x000D,0x0000);
2021         LCD_WriteReg(0x000F,0x0000);
2022         //power on sequence VGHVGL
2023         LCD_WriteReg(0x0010,0x0000);   
2024         LCD_WriteReg(0x0011,0x0007);  
2025         LCD_WriteReg(0x0012,0x0000);  
2026         LCD_WriteReg(0x0013,0x0000); 
2027         LCD_WriteReg(0x0007,0x0000); 
2028         //vgh 
2029         LCD_WriteReg(0x0010,0x1690);   
2030         LCD_WriteReg(0x0011,0x0227);
2031         //delayms(100);
2032         //vregiout 
2033         LCD_WriteReg(0x0012,0x009D); //0x001b
2034         //delayms(100); 
2035         //vom amplitude
2036         LCD_WriteReg(0x0013,0x1900);
2037         //delayms(100); 
2038         //vom H
2039         LCD_WriteReg(0x0029,0x0025); 
2040         LCD_WriteReg(0x002B,0x000D); 
2041         //gamma
2042         LCD_WriteReg(0x0030,0x0007);
2043         LCD_WriteReg(0x0031,0x0303);
2044         LCD_WriteReg(0x0032,0x0003);// 0006
2045         LCD_WriteReg(0x0035,0x0206);
2046         LCD_WriteReg(0x0036,0x0008);
2047         LCD_WriteReg(0x0037,0x0406); 
2048         LCD_WriteReg(0x0038,0x0304);//0200
2049         LCD_WriteReg(0x0039,0x0007); 
2050         LCD_WriteReg(0x003C,0x0602);// 0504
2051         LCD_WriteReg(0x003D,0x0008); 
2052         //ram
2053         LCD_WriteReg(0x0050,0x0000); 
2054         LCD_WriteReg(0x0051,0x00EF);
2055         LCD_WriteReg(0x0052,0x0000); 
2056         LCD_WriteReg(0x0053,0x013F);  
2057         LCD_WriteReg(0x0060,0xA700); 
2058         LCD_WriteReg(0x0061,0x0001); 
2059         LCD_WriteReg(0x006A,0x0000); 
2060         //
2061         LCD_WriteReg(0x0080,0x0000); 
2062         LCD_WriteReg(0x0081,0x0000); 
2063         LCD_WriteReg(0x0082,0x0000); 
2064         LCD_WriteReg(0x0083,0x0000); 
2065         LCD_WriteReg(0x0084,0x0000); 
2066         LCD_WriteReg(0x0085,0x0000); 
2067         //
2068         LCD_WriteReg(0x0090,0x0010); 
2069         LCD_WriteReg(0x0092,0x0600); 
2070         
2071         LCD_WriteReg(0x0007,0x0133);
2072         LCD_WriteReg(0x00,0x0022);//
2073     }else if(lcddev.id==0x9328)//ILI9328   OK  
2074     {
2075           LCD_WriteReg(0x00EC,0x108F);// internal timeing      
2076          LCD_WriteReg(0x00EF,0x1234);// ADD        
2077         //LCD_WriteReg(0x00e7,0x0010);      
2078         //LCD_WriteReg(0x0000,0x0001);//开启内部时钟
2079         LCD_WriteReg(0x0001,0x0100);     
2080         LCD_WriteReg(0x0002,0x0700);//电源开启                    
2081         //LCD_WriteReg(0x0003,(1<<3)|(1<<4) );     //65K  RGB
2082         //DRIVE TABLE(寄存器 03H)
2083         //BIT3=AM BIT4:5=ID0:1
2084         //AM ID0 ID1   FUNCATION
2085         // 0  0   0       R->L D->U
2086         // 1  0   0       D->U    R->L
2087         // 0  1   0       L->R D->U
2088         // 1  1   0    D->U    L->R
2089         // 0  0   1       R->L U->D
2090         // 1  0   1    U->D    R->L
2091         // 0  1   1    L->R U->D 正常就用这个.
2092         // 1  1   1       U->D    L->R
2093         LCD_WriteReg(0x0003,(1<<12)|(3<<4)|(0<<3) );//65K    
2094         LCD_WriteReg(0x0004,0x0000);                                   
2095         LCD_WriteReg(0x0008,0x0202);               
2096         LCD_WriteReg(0x0009,0x0000);         
2097         LCD_WriteReg(0x000a,0x0000);//display setting         
2098         LCD_WriteReg(0x000c,0x0001);//display setting          
2099         LCD_WriteReg(0x000d,0x0000);//0f3c          
2100         LCD_WriteReg(0x000f,0x0000);
2101         //电源配置
2102         LCD_WriteReg(0x0010,0x0000);   
2103         LCD_WriteReg(0x0011,0x0007);
2104         LCD_WriteReg(0x0012,0x0000);                                                                 
2105         LCD_WriteReg(0x0013,0x0000);                 
2106          LCD_WriteReg(0x0007,0x0001);                 
2107            delay_ms(50); 
2108         LCD_WriteReg(0x0010,0x1490);   
2109         LCD_WriteReg(0x0011,0x0227);
2110         delay_ms(50); 
2111         LCD_WriteReg(0x0012,0x008A);                  
2112         delay_ms(50); 
2113         LCD_WriteReg(0x0013,0x1a00);   
2114         LCD_WriteReg(0x0029,0x0006);
2115         LCD_WriteReg(0x002b,0x000d);
2116         delay_ms(50); 
2117         LCD_WriteReg(0x0020,0x0000);                                                            
2118         LCD_WriteReg(0x0021,0x0000);           
2119         delay_ms(50); 
2120         //伽马校正
2121         LCD_WriteReg(0x0030,0x0000); 
2122         LCD_WriteReg(0x0031,0x0604);   
2123         LCD_WriteReg(0x0032,0x0305);
2124         LCD_WriteReg(0x0035,0x0000);
2125         LCD_WriteReg(0x0036,0x0C09); 
2126         LCD_WriteReg(0x0037,0x0204);
2127         LCD_WriteReg(0x0038,0x0301);        
2128         LCD_WriteReg(0x0039,0x0707);     
2129         LCD_WriteReg(0x003c,0x0000);
2130         LCD_WriteReg(0x003d,0x0a0a);
2131         delay_ms(50); 
2132         LCD_WriteReg(0x0050,0x0000); //水平GRAM起始位置 
2133         LCD_WriteReg(0x0051,0x00ef); //水平GRAM终止位置                    
2134         LCD_WriteReg(0x0052,0x0000); //垂直GRAM起始位置                    
2135         LCD_WriteReg(0x0053,0x013f); //垂直GRAM终止位置  
2136  
2137          LCD_WriteReg(0x0060,0xa700);        
2138         LCD_WriteReg(0x0061,0x0001); 
2139         LCD_WriteReg(0x006a,0x0000);
2140         LCD_WriteReg(0x0080,0x0000);
2141         LCD_WriteReg(0x0081,0x0000);
2142         LCD_WriteReg(0x0082,0x0000);
2143         LCD_WriteReg(0x0083,0x0000);
2144         LCD_WriteReg(0x0084,0x0000);
2145         LCD_WriteReg(0x0085,0x0000);
2146       
2147         LCD_WriteReg(0x0090,0x0010);     
2148         LCD_WriteReg(0x0092,0x0600);  
2149         //开启显示设置    
2150         LCD_WriteReg(0x0007,0x0133); 
2151     }else if(lcddev.id==0x9320)//测试OK.
2152     {
2153         LCD_WriteReg(0x00,0x0000);
2154         LCD_WriteReg(0x01,0x0100);    //Driver Output Contral.
2155         LCD_WriteReg(0x02,0x0700);    //LCD Driver Waveform Contral.
2156         LCD_WriteReg(0x03,0x1030);//Entry Mode Set.
2157         //LCD_WriteReg(0x03,0x1018);    //Entry Mode Set.
2158     
2159         LCD_WriteReg(0x04,0x0000);    //Scalling Contral.
2160         LCD_WriteReg(0x08,0x0202);    //Display Contral 2.(0x0207)
2161         LCD_WriteReg(0x09,0x0000);    //Display Contral 3.(0x0000)
2162         LCD_WriteReg(0x0a,0x0000);    //Frame Cycle Contal.(0x0000)
2163         LCD_WriteReg(0x0c,(1<<0));    //Extern Display Interface Contral 1.(0x0000)
2164         LCD_WriteReg(0x0d,0x0000);    //Frame Maker Position.
2165         LCD_WriteReg(0x0f,0x0000);    //Extern Display Interface Contral 2.        
2166         delay_ms(50); 
2167         LCD_WriteReg(0x07,0x0101);    //Display Contral.
2168         delay_ms(50);                                   
2169         LCD_WriteReg(0x10,(1<<12)|(0<<8)|(1<<7)|(1<<6)|(0<<4));    //Power Control 1.(0x16b0)
2170         LCD_WriteReg(0x11,0x0007);                                //Power Control 2.(0x0001)
2171         LCD_WriteReg(0x12,(1<<8)|(1<<4)|(0<<0));                //Power Control 3.(0x0138)
2172         LCD_WriteReg(0x13,0x0b00);                                //Power Control 4.
2173         LCD_WriteReg(0x29,0x0000);                                //Power Control 7.
2174     
2175         LCD_WriteReg(0x2b,(1<<14)|(1<<4));        
2176         LCD_WriteReg(0x50,0);    //Set X Star
2177         //水平GRAM终止位置Set X End.
2178         LCD_WriteReg(0x51,239);    //Set Y Star
2179         LCD_WriteReg(0x52,0);    //Set Y End.t.
2180         LCD_WriteReg(0x53,319);    //
2181     
2182         LCD_WriteReg(0x60,0x2700);    //Driver Output Control.
2183         LCD_WriteReg(0x61,0x0001);    //Driver Output Control.
2184         LCD_WriteReg(0x6a,0x0000);    //Vertical Srcoll Control.
2185     
2186         LCD_WriteReg(0x80,0x0000);    //Display Position? Partial Display 1.
2187         LCD_WriteReg(0x81,0x0000);    //RAM Address Start? Partial Display 1.
2188         LCD_WriteReg(0x82,0x0000);    //RAM Address End-Partial Display 1.
2189         LCD_WriteReg(0x83,0x0000);    //Displsy Position? Partial Display 2.
2190         LCD_WriteReg(0x84,0x0000);    //RAM Address Start? Partial Display 2.
2191         LCD_WriteReg(0x85,0x0000);    //RAM Address End? Partial Display 2.
2192     
2193         LCD_WriteReg(0x90,(0<<7)|(16<<0));    //Frame Cycle Contral.(0x0013)
2194         LCD_WriteReg(0x92,0x0000);    //Panel Interface Contral 2.(0x0000)
2195         LCD_WriteReg(0x93,0x0001);    //Panel Interface Contral 3.
2196         LCD_WriteReg(0x95,0x0110);    //Frame Cycle Contral.(0x0110)
2197         LCD_WriteReg(0x97,(0<<8));    //
2198         LCD_WriteReg(0x98,0x0000);    //Frame Cycle Contral.       
2199         LCD_WriteReg(0x07,0x0173);    //(0x0173)
2200     }else if(lcddev.id==0X9331)//OK |/|/|             
2201     {
2202         LCD_WriteReg(0x00E7, 0x1014);
2203         LCD_WriteReg(0x0001, 0x0100); // set SS and SM bit
2204         LCD_WriteReg(0x0002, 0x0200); // set 1 line inversion
2205         LCD_WriteReg(0x0003,(1<<12)|(3<<4)|(1<<3));//65K    
2206         //LCD_WriteReg(0x0003, 0x1030); // set GRAM write direction and BGR=1.
2207         LCD_WriteReg(0x0008, 0x0202); // set the back porch and front porch
2208         LCD_WriteReg(0x0009, 0x0000); // set non-display area refresh cycle ISC[3:0]
2209         LCD_WriteReg(0x000A, 0x0000); // FMARK function
2210         LCD_WriteReg(0x000C, 0x0000); // RGB interface setting
2211         LCD_WriteReg(0x000D, 0x0000); // Frame marker Position
2212         LCD_WriteReg(0x000F, 0x0000); // RGB interface polarity
2213         //*************Power On sequence ****************//
2214         LCD_WriteReg(0x0010, 0x0000); // SAP, BT[3:0], AP, DSTB, SLP, STB
2215         LCD_WriteReg(0x0011, 0x0007); // DC1[2:0], DC0[2:0], VC[2:0]
2216         LCD_WriteReg(0x0012, 0x0000); // VREG1OUT voltage
2217         LCD_WriteReg(0x0013, 0x0000); // VDV[4:0] for VCOM amplitude
2218         delay_ms(200); // Dis-charge capacitor power voltage
2219         LCD_WriteReg(0x0010, 0x1690); // SAP, BT[3:0], AP, DSTB, SLP, STB
2220         LCD_WriteReg(0x0011, 0x0227); // DC1[2:0], DC0[2:0], VC[2:0]
2221         delay_ms(50); // Delay 50ms
2222         LCD_WriteReg(0x0012, 0x000C); // Internal reference voltage= Vci;
2223         delay_ms(50); // Delay 50ms
2224         LCD_WriteReg(0x0013, 0x0800); // Set VDV[4:0] for VCOM amplitude
2225         LCD_WriteReg(0x0029, 0x0011); // Set VCM[5:0] for VCOMH
2226         LCD_WriteReg(0x002B, 0x000B); // Set Frame Rate
2227         delay_ms(50); // Delay 50ms
2228         LCD_WriteReg(0x0020, 0x0000); // GRAM horizontal Address
2229         LCD_WriteReg(0x0021, 0x013f); // GRAM Vertical Address
2230         // ----------- Adjust the Gamma Curve ----------//
2231         LCD_WriteReg(0x0030, 0x0000);
2232         LCD_WriteReg(0x0031, 0x0106);
2233         LCD_WriteReg(0x0032, 0x0000);
2234         LCD_WriteReg(0x0035, 0x0204);
2235         LCD_WriteReg(0x0036, 0x160A);
2236         LCD_WriteReg(0x0037, 0x0707);
2237         LCD_WriteReg(0x0038, 0x0106);
2238         LCD_WriteReg(0x0039, 0x0707);
2239         LCD_WriteReg(0x003C, 0x0402);
2240         LCD_WriteReg(0x003D, 0x0C0F);
2241         //------------------ Set GRAM area ---------------//
2242         LCD_WriteReg(0x0050, 0x0000); // Horizontal GRAM Start Address
2243         LCD_WriteReg(0x0051, 0x00EF); // Horizontal GRAM End Address
2244         LCD_WriteReg(0x0052, 0x0000); // Vertical GRAM Start Address
2245         LCD_WriteReg(0x0053, 0x013F); // Vertical GRAM Start Address
2246         LCD_WriteReg(0x0060, 0x2700); // Gate Scan Line
2247         LCD_WriteReg(0x0061, 0x0001); // NDL,VLE, REV 
2248         LCD_WriteReg(0x006A, 0x0000); // set scrolling line
2249         //-------------- Partial Display Control ---------//
2250         LCD_WriteReg(0x0080, 0x0000);
2251         LCD_WriteReg(0x0081, 0x0000);
2252         LCD_WriteReg(0x0082, 0x0000);
2253         LCD_WriteReg(0x0083, 0x0000);
2254         LCD_WriteReg(0x0084, 0x0000);
2255         LCD_WriteReg(0x0085, 0x0000);
2256         //-------------- Panel Control -------------------//
2257         LCD_WriteReg(0x0090, 0x0010);
2258         LCD_WriteReg(0x0092, 0x0600);
2259         LCD_WriteReg(0x0007, 0x0133); // 262K color and display ON
2260     }else if(lcddev.id==0x5408)
2261     {
2262         LCD_WriteReg(0x01,0x0100);                                  
2263         LCD_WriteReg(0x02,0x0700);//LCD Driving Waveform Contral 
2264         LCD_WriteReg(0x03,0x1030);//Entry Mode设置        
2265         //指针从左至右自上而下的自动增模式
2266         //Normal Mode(Window Mode disable)
2267         //RGB格式
2268         //16位数据2次传输的8总线设置
2269         LCD_WriteReg(0x04,0x0000); //Scalling Control register     
2270         LCD_WriteReg(0x08,0x0207); //Display Control 2 
2271         LCD_WriteReg(0x09,0x0000); //Display Control 3     
2272         LCD_WriteReg(0x0A,0x0000); //Frame Cycle Control     
2273         LCD_WriteReg(0x0C,0x0000); //External Display Interface Control 1 
2274         LCD_WriteReg(0x0D,0x0000); //Frame Maker Position         
2275         LCD_WriteReg(0x0F,0x0000); //External Display Interface Control 2 
2276          delay_ms(20);
2277         //TFT 液晶彩色图像显示方法14
2278         LCD_WriteReg(0x10,0x16B0); //0x14B0 //Power Control 1
2279         LCD_WriteReg(0x11,0x0001); //0x0007 //Power Control 2
2280         LCD_WriteReg(0x17,0x0001); //0x0000 //Power Control 3
2281         LCD_WriteReg(0x12,0x0138); //0x013B //Power Control 4
2282         LCD_WriteReg(0x13,0x0800); //0x0800 //Power Control 5
2283         LCD_WriteReg(0x29,0x0009); //NVM read data 2
2284         LCD_WriteReg(0x2a,0x0009); //NVM read data 3
2285         LCD_WriteReg(0xa4,0x0000);     
2286         LCD_WriteReg(0x50,0x0000); //设置操作窗口的X轴开始列
2287         LCD_WriteReg(0x51,0x00EF); //设置操作窗口的X轴结束列
2288         LCD_WriteReg(0x52,0x0000); //设置操作窗口的Y轴开始行
2289         LCD_WriteReg(0x53,0x013F); //设置操作窗口的Y轴结束行
2290         LCD_WriteReg(0x60,0x2700); //Driver Output Control
2291         //设置屏幕的点数以及扫描的起始行
2292         LCD_WriteReg(0x61,0x0001); //Driver Output Control
2293         LCD_WriteReg(0x6A,0x0000); //Vertical Scroll Control
2294         LCD_WriteReg(0x80,0x0000); //Display Position – Partial Display 1
2295         LCD_WriteReg(0x81,0x0000); //RAM Address Start – Partial Display 1
2296         LCD_WriteReg(0x82,0x0000); //RAM address End - Partial Display 1
2297         LCD_WriteReg(0x83,0x0000); //Display Position – Partial Display 2
2298         LCD_WriteReg(0x84,0x0000); //RAM Address Start – Partial Display 2
2299         LCD_WriteReg(0x85,0x0000); //RAM address End – Partail Display2
2300         LCD_WriteReg(0x90,0x0013); //Frame Cycle Control
2301         LCD_WriteReg(0x92,0x0000);  //Panel Interface Control 2
2302         LCD_WriteReg(0x93,0x0003); //Panel Interface control 3
2303         LCD_WriteReg(0x95,0x0110);  //Frame Cycle Control
2304         LCD_WriteReg(0x07,0x0173);         
2305         delay_ms(50);
2306     }else if(lcddev.id==0x1505)//OK
2307     {
2308         // second release on 3/5  ,luminance is acceptable,water wave appear during camera preview
2309         LCD_WriteReg(0x0007,0x0000);
2310         delay_ms(50); 
2311         LCD_WriteReg(0x0012,0x011C);//0x011A   why need to set several times?
2312         LCD_WriteReg(0x00A4,0x0001);//NVM     
2313         LCD_WriteReg(0x0008,0x000F);
2314         LCD_WriteReg(0x000A,0x0008);
2315         LCD_WriteReg(0x000D,0x0008);        
2316           //伽马校正
2317         LCD_WriteReg(0x0030,0x0707);
2318         LCD_WriteReg(0x0031,0x0007); //0x0707
2319         LCD_WriteReg(0x0032,0x0603); 
2320         LCD_WriteReg(0x0033,0x0700); 
2321         LCD_WriteReg(0x0034,0x0202); 
2322         LCD_WriteReg(0x0035,0x0002); //?0x0606
2323         LCD_WriteReg(0x0036,0x1F0F);
2324         LCD_WriteReg(0x0037,0x0707); //0x0f0f  0x0105
2325         LCD_WriteReg(0x0038,0x0000); 
2326         LCD_WriteReg(0x0039,0x0000); 
2327         LCD_WriteReg(0x003A,0x0707); 
2328         LCD_WriteReg(0x003B,0x0000); //0x0303
2329         LCD_WriteReg(0x003C,0x0007); //?0x0707
2330         LCD_WriteReg(0x003D,0x0000); //0x1313//0x1f08
2331         delay_ms(50); 
2332         LCD_WriteReg(0x0007,0x0001);
2333         LCD_WriteReg(0x0017,0x0001);//开启电源
2334         delay_ms(50); 
2335           //电源配置
2336         LCD_WriteReg(0x0010,0x17A0); 
2337         LCD_WriteReg(0x0011,0x0217);//reference voltage VC[2:0]   Vciout = 1.00*Vcivl
2338         LCD_WriteReg(0x0012,0x011E);//0x011c  //Vreg1out = Vcilvl*1.80   is it the same as Vgama1out ?
2339         LCD_WriteReg(0x0013,0x0F00);//VDV[4:0]-->VCOM Amplitude VcomL = VcomH - Vcom Ampl
2340         LCD_WriteReg(0x002A,0x0000);  
2341         LCD_WriteReg(0x0029,0x000A);//0x0001F  Vcomh = VCM1[4:0]*Vreg1out    gate source voltage??
2342         LCD_WriteReg(0x0012,0x013E);// 0x013C  power supply on
2343         //Coordinates Control//
2344         LCD_WriteReg(0x0050,0x0000);//0x0e00
2345         LCD_WriteReg(0x0051,0x00EF); 
2346         LCD_WriteReg(0x0052,0x0000); 
2347         LCD_WriteReg(0x0053,0x013F); 
2348         //Pannel Image Control//
2349         LCD_WriteReg(0x0060,0x2700); 
2350         LCD_WriteReg(0x0061,0x0001); 
2351         LCD_WriteReg(0x006A,0x0000); 
2352         LCD_WriteReg(0x0080,0x0000); 
2353         //Partial Image Control//
2354         LCD_WriteReg(0x0081,0x0000); 
2355         LCD_WriteReg(0x0082,0x0000); 
2356         LCD_WriteReg(0x0083,0x0000); 
2357         LCD_WriteReg(0x0084,0x0000); 
2358         LCD_WriteReg(0x0085,0x0000); 
2359           //Panel Interface Control//
2360         LCD_WriteReg(0x0090,0x0013);//0x0010 frenqucy
2361         LCD_WriteReg(0x0092,0x0300); 
2362         LCD_WriteReg(0x0093,0x0005); 
2363         LCD_WriteReg(0x0095,0x0000); 
2364         LCD_WriteReg(0x0097,0x0000); 
2365         LCD_WriteReg(0x0098,0x0000); 
2366   
2367         LCD_WriteReg(0x0001,0x0100); 
2368         LCD_WriteReg(0x0002,0x0700); 
2369         LCD_WriteReg(0x0003,0x1038);//扫描方向 上->下  左->右 
2370         LCD_WriteReg(0x0004,0x0000); 
2371         LCD_WriteReg(0x000C,0x0000); 
2372         LCD_WriteReg(0x000F,0x0000); 
2373         LCD_WriteReg(0x0020,0x0000); 
2374         LCD_WriteReg(0x0021,0x0000); 
2375         LCD_WriteReg(0x0007,0x0021); 
2376         delay_ms(20);
2377         LCD_WriteReg(0x0007,0x0061); 
2378         delay_ms(20);
2379         LCD_WriteReg(0x0007,0x0173); 
2380         delay_ms(20);
2381     }else if(lcddev.id==0xB505)
2382     {
2383         LCD_WriteReg(0x0000,0x0000);
2384         LCD_WriteReg(0x0000,0x0000);
2385         LCD_WriteReg(0x0000,0x0000);
2386         LCD_WriteReg(0x0000,0x0000);
2387         
2388         LCD_WriteReg(0x00a4,0x0001);
2389         delay_ms(20);          
2390         LCD_WriteReg(0x0060,0x2700);
2391         LCD_WriteReg(0x0008,0x0202);
2392         
2393         LCD_WriteReg(0x0030,0x0214);
2394         LCD_WriteReg(0x0031,0x3715);
2395         LCD_WriteReg(0x0032,0x0604);
2396         LCD_WriteReg(0x0033,0x0e16);
2397         LCD_WriteReg(0x0034,0x2211);
2398         LCD_WriteReg(0x0035,0x1500);
2399         LCD_WriteReg(0x0036,0x8507);
2400         LCD_WriteReg(0x0037,0x1407);
2401         LCD_WriteReg(0x0038,0x1403);
2402         LCD_WriteReg(0x0039,0x0020);
2403         
2404         LCD_WriteReg(0x0090,0x001a);
2405         LCD_WriteReg(0x0010,0x0000);
2406         LCD_WriteReg(0x0011,0x0007);
2407         LCD_WriteReg(0x0012,0x0000);
2408         LCD_WriteReg(0x0013,0x0000);
2409         delay_ms(20);
2410         
2411         LCD_WriteReg(0x0010,0x0730);
2412         LCD_WriteReg(0x0011,0x0137);
2413         delay_ms(20);
2414         
2415         LCD_WriteReg(0x0012,0x01b8);
2416         delay_ms(20);
2417         
2418         LCD_WriteReg(0x0013,0x0f00);
2419         LCD_WriteReg(0x002a,0x0080);
2420         LCD_WriteReg(0x0029,0x0048);
2421         delay_ms(20);
2422         
2423         LCD_WriteReg(0x0001,0x0100);
2424         LCD_WriteReg(0x0002,0x0700);
2425         LCD_WriteReg(0x0003,0x1038);//扫描方向 上->下  左->右 
2426         LCD_WriteReg(0x0008,0x0202);
2427         LCD_WriteReg(0x000a,0x0000);
2428         LCD_WriteReg(0x000c,0x0000);
2429         LCD_WriteReg(0x000d,0x0000);
2430         LCD_WriteReg(0x000e,0x0030);
2431         LCD_WriteReg(0x0050,0x0000);
2432         LCD_WriteReg(0x0051,0x00ef);
2433         LCD_WriteReg(0x0052,0x0000);
2434         LCD_WriteReg(0x0053,0x013f);
2435         LCD_WriteReg(0x0060,0x2700);
2436         LCD_WriteReg(0x0061,0x0001);
2437         LCD_WriteReg(0x006a,0x0000);
2438         //LCD_WriteReg(0x0080,0x0000);
2439         //LCD_WriteReg(0x0081,0x0000);
2440         LCD_WriteReg(0x0090,0X0011);
2441         LCD_WriteReg(0x0092,0x0600);
2442         LCD_WriteReg(0x0093,0x0402);
2443         LCD_WriteReg(0x0094,0x0002);
2444         delay_ms(20);
2445         
2446         LCD_WriteReg(0x0007,0x0001);
2447         delay_ms(20);
2448         LCD_WriteReg(0x0007,0x0061);
2449         LCD_WriteReg(0x0007,0x0173);
2450         
2451         LCD_WriteReg(0x0020,0x0000);
2452         LCD_WriteReg(0x0021,0x0000);      
2453         LCD_WriteReg(0x00,0x22);  
2454     }else if(lcddev.id==0xC505)
2455     {
2456         LCD_WriteReg(0x0000,0x0000);
2457         LCD_WriteReg(0x0000,0x0000);
2458         delay_ms(20);          
2459         LCD_WriteReg(0x0000,0x0000);
2460         LCD_WriteReg(0x0000,0x0000);
2461         LCD_WriteReg(0x0000,0x0000);
2462         LCD_WriteReg(0x0000,0x0000);
2463          LCD_WriteReg(0x00a4,0x0001);
2464         delay_ms(20);          
2465         LCD_WriteReg(0x0060,0x2700);
2466         LCD_WriteReg(0x0008,0x0806);
2467         
2468         LCD_WriteReg(0x0030,0x0703);//gamma setting
2469         LCD_WriteReg(0x0031,0x0001);
2470         LCD_WriteReg(0x0032,0x0004);
2471         LCD_WriteReg(0x0033,0x0102);
2472         LCD_WriteReg(0x0034,0x0300);
2473         LCD_WriteReg(0x0035,0x0103);
2474         LCD_WriteReg(0x0036,0x001F);
2475         LCD_WriteReg(0x0037,0x0703);
2476         LCD_WriteReg(0x0038,0x0001);
2477         LCD_WriteReg(0x0039,0x0004);
2478         
2479         LCD_WriteReg(0x0090, 0x0015);    //80Hz
2480         LCD_WriteReg(0x0010, 0X0410);    //BT,AP
2481         LCD_WriteReg(0x0011,0x0247);    //DC1,DC0,VC
2482         LCD_WriteReg(0x0012, 0x01BC);
2483         LCD_WriteReg(0x0013, 0x0e00);
2484         delay_ms(120);
2485         LCD_WriteReg(0x0001, 0x0100);
2486         LCD_WriteReg(0x0002, 0x0200);
2487         LCD_WriteReg(0x0003, 0x1030);
2488         
2489         LCD_WriteReg(0x000A, 0x0008);
2490         LCD_WriteReg(0x000C, 0x0000);
2491         
2492         LCD_WriteReg(0x000E, 0x0020);
2493         LCD_WriteReg(0x000F, 0x0000);
2494         LCD_WriteReg(0x0020, 0x0000);    //H Start
2495         LCD_WriteReg(0x0021, 0x0000);    //V Start
2496         LCD_WriteReg(0x002A,0x003D);    //vcom2
2497         delay_ms(20);
2498         LCD_WriteReg(0x0029, 0x002d);
2499         LCD_WriteReg(0x0050, 0x0000);
2500         LCD_WriteReg(0x0051, 0xD0EF);
2501         LCD_WriteReg(0x0052, 0x0000);
2502         LCD_WriteReg(0x0053, 0x013F);
2503         LCD_WriteReg(0x0061, 0x0000);
2504         LCD_WriteReg(0x006A, 0x0000);
2505         LCD_WriteReg(0x0092,0x0300); 
2506  
2507          LCD_WriteReg(0x0093, 0x0005);
2508         LCD_WriteReg(0x0007, 0x0100);
2509     }else if(lcddev.id==0x8989)//OK |/|/|
2510     {       
2511         LCD_WriteReg(0x0000,0x0001);//打开晶振
2512         LCD_WriteReg(0x0003,0xA8A4);//0xA8A4
2513         LCD_WriteReg(0x000C,0x0000);    
2514         LCD_WriteReg(0x000D,0x080C);   
2515         LCD_WriteReg(0x000E,0x2B00);    
2516         LCD_WriteReg(0x001E,0x00B0);    
2517         LCD_WriteReg(0x0001,0x2B3F);//驱动输出控制320*240  0x6B3F
2518         LCD_WriteReg(0x0002,0x0600);
2519         LCD_WriteReg(0x0010,0x0000);  
2520         LCD_WriteReg(0x0011,0x6078); //定义数据格式  16位色         横屏 0x6058
2521         LCD_WriteReg(0x0005,0x0000);  
2522         LCD_WriteReg(0x0006,0x0000);  
2523         LCD_WriteReg(0x0016,0xEF1C);  
2524         LCD_WriteReg(0x0017,0x0003);  
2525         LCD_WriteReg(0x0007,0x0233); //0x0233       
2526         LCD_WriteReg(0x000B,0x0000);  
2527         LCD_WriteReg(0x000F,0x0000); //扫描开始地址
2528         LCD_WriteReg(0x0041,0x0000);  
2529         LCD_WriteReg(0x0042,0x0000);  
2530         LCD_WriteReg(0x0048,0x0000);  
2531         LCD_WriteReg(0x0049,0x013F);  
2532         LCD_WriteReg(0x004A,0x0000);  
2533         LCD_WriteReg(0x004B,0x0000);  
2534         LCD_WriteReg(0x0044,0xEF00);  
2535         LCD_WriteReg(0x0045,0x0000);  
2536         LCD_WriteReg(0x0046,0x013F);  
2537         LCD_WriteReg(0x0030,0x0707);  
2538         LCD_WriteReg(0x0031,0x0204);  
2539         LCD_WriteReg(0x0032,0x0204);  
2540         LCD_WriteReg(0x0033,0x0502);  
2541         LCD_WriteReg(0x0034,0x0507);  
2542         LCD_WriteReg(0x0035,0x0204);  
2543         LCD_WriteReg(0x0036,0x0204);  
2544         LCD_WriteReg(0x0037,0x0502);  
2545         LCD_WriteReg(0x003A,0x0302);  
2546         LCD_WriteReg(0x003B,0x0302);  
2547         LCD_WriteReg(0x0023,0x0000);  
2548         LCD_WriteReg(0x0024,0x0000);  
2549         LCD_WriteReg(0x0025,0x8000);  
2550         LCD_WriteReg(0x004f,0);        //行首址0
2551         LCD_WriteReg(0x004e,0);        //列首址0
2552     }else if(lcddev.id==0x4531)//OK |/|/|
2553     {
2554         LCD_WriteReg(0X00,0X0001);   
2555         delay_ms(10);   
2556         LCD_WriteReg(0X10,0X1628);   
2557         LCD_WriteReg(0X12,0X000e);//0x0006    
2558         LCD_WriteReg(0X13,0X0A39);   
2559         delay_ms(10);   
2560         LCD_WriteReg(0X11,0X0040);   
2561         LCD_WriteReg(0X15,0X0050);   
2562         delay_ms(10);   
2563         LCD_WriteReg(0X12,0X001e);//16    
2564         delay_ms(10);   
2565         LCD_WriteReg(0X10,0X1620);   
2566         LCD_WriteReg(0X13,0X2A39);   
2567         delay_ms(10);   
2568         LCD_WriteReg(0X01,0X0100);   
2569         LCD_WriteReg(0X02,0X0300);   
2570         LCD_WriteReg(0X03,0X1038);//改变方向的   
2571         LCD_WriteReg(0X08,0X0202);   
2572         LCD_WriteReg(0X0A,0X0008);   
2573         LCD_WriteReg(0X30,0X0000);   
2574         LCD_WriteReg(0X31,0X0402);   
2575         LCD_WriteReg(0X32,0X0106);   
2576         LCD_WriteReg(0X33,0X0503);   
2577         LCD_WriteReg(0X34,0X0104);   
2578         LCD_WriteReg(0X35,0X0301);   
2579         LCD_WriteReg(0X36,0X0707);   
2580         LCD_WriteReg(0X37,0X0305);   
2581         LCD_WriteReg(0X38,0X0208);   
2582         LCD_WriteReg(0X39,0X0F0B);   
2583         LCD_WriteReg(0X41,0X0002);   
2584         LCD_WriteReg(0X60,0X2700);   
2585         LCD_WriteReg(0X61,0X0001);   
2586         LCD_WriteReg(0X90,0X0210);   
2587         LCD_WriteReg(0X92,0X010A);   
2588         LCD_WriteReg(0X93,0X0004);   
2589         LCD_WriteReg(0XA0,0X0100);   
2590         LCD_WriteReg(0X07,0X0001);   
2591         LCD_WriteReg(0X07,0X0021);   
2592         LCD_WriteReg(0X07,0X0023);   
2593         LCD_WriteReg(0X07,0X0033);   
2594         LCD_WriteReg(0X07,0X0133);   
2595         LCD_WriteReg(0XA0,0X0000); 
2596     }else if(lcddev.id==0x4535)
2597     {                  
2598         LCD_WriteReg(0X15,0X0030);   
2599         LCD_WriteReg(0X9A,0X0010);   
2600          LCD_WriteReg(0X11,0X0020);   
2601          LCD_WriteReg(0X10,0X3428);   
2602         LCD_WriteReg(0X12,0X0002);//16    
2603          LCD_WriteReg(0X13,0X1038);   
2604         delay_ms(40);   
2605         LCD_WriteReg(0X12,0X0012);//16    
2606         delay_ms(40);   
2607           LCD_WriteReg(0X10,0X3420);   
2608          LCD_WriteReg(0X13,0X3038);   
2609         delay_ms(70);   
2610         LCD_WriteReg(0X30,0X0000);   
2611         LCD_WriteReg(0X31,0X0402);   
2612         LCD_WriteReg(0X32,0X0307);   
2613         LCD_WriteReg(0X33,0X0304);   
2614         LCD_WriteReg(0X34,0X0004);   
2615         LCD_WriteReg(0X35,0X0401);   
2616         LCD_WriteReg(0X36,0X0707);   
2617         LCD_WriteReg(0X37,0X0305);   
2618         LCD_WriteReg(0X38,0X0610);   
2619         LCD_WriteReg(0X39,0X0610); 
2620           
2621         LCD_WriteReg(0X01,0X0100);   
2622         LCD_WriteReg(0X02,0X0300);   
2623         LCD_WriteReg(0X03,0X1030);//改变方向的   
2624         LCD_WriteReg(0X08,0X0808);   
2625         LCD_WriteReg(0X0A,0X0008);   
2626          LCD_WriteReg(0X60,0X2700);   
2627         LCD_WriteReg(0X61,0X0001);   
2628         LCD_WriteReg(0X90,0X013E);   
2629         LCD_WriteReg(0X92,0X0100);   
2630         LCD_WriteReg(0X93,0X0100);   
2631          LCD_WriteReg(0XA0,0X3000);   
2632          LCD_WriteReg(0XA3,0X0010);   
2633         LCD_WriteReg(0X07,0X0001);   
2634         LCD_WriteReg(0X07,0X0021);   
2635         LCD_WriteReg(0X07,0X0023);   
2636         LCD_WriteReg(0X07,0X0033);   
2637         LCD_WriteReg(0X07,0X0133);   
2638     }else if(lcddev.id==0X1963)
2639     {
2640         LCD_WR_REG(0xE2);        //Set PLL with OSC = 10MHz (hardware),    Multiplier N = 35, 250MHz < VCO < 800MHz = OSC*(N+1), VCO = 300MHz
2641         LCD_WR_DATA(0x1D);        //参数1 
2642         LCD_WR_DATA(0x02);        //参数2 Divider M = 2, PLL = 300/(M+1) = 100MHz
2643         LCD_WR_DATA(0x04);        //参数3 Validate M and N values   
2644         delay_us(100);
2645         LCD_WR_REG(0xE0);        // Start PLL command
2646         LCD_WR_DATA(0x01);        // enable PLL
2647         delay_ms(10);
2648         LCD_WR_REG(0xE0);        // Start PLL command again
2649         LCD_WR_DATA(0x03);        // now, use PLL output as system clock    
2650         delay_ms(12);  
2651         LCD_WR_REG(0x01);        //软复位
2652         delay_ms(10);
2653         
2654         LCD_WR_REG(0xE6);        //设置像素频率,33Mhz
2655         LCD_WR_DATA(0x2F);
2656         LCD_WR_DATA(0xFF);
2657         LCD_WR_DATA(0xFF);
2658         
2659         LCD_WR_REG(0xB0);        //设置LCD模式
2660         LCD_WR_DATA(0x20);        //24位模式
2661         LCD_WR_DATA(0x00);        //TFT 模式 
2662     
2663         LCD_WR_DATA((SSD_HOR_RESOLUTION-1)>>8);//设置LCD水平像素
2664         LCD_WR_DATA(SSD_HOR_RESOLUTION-1);         
2665         LCD_WR_DATA((SSD_VER_RESOLUTION-1)>>8);//设置LCD垂直像素
2666         LCD_WR_DATA(SSD_VER_RESOLUTION-1);         
2667         LCD_WR_DATA(0x00);        //RGB序列 
2668         
2669         LCD_WR_REG(0xB4);        //Set horizontal period
2670         LCD_WR_DATA((SSD_HT-1)>>8);
2671         LCD_WR_DATA(SSD_HT-1);
2672         LCD_WR_DATA(SSD_HPS>>8);
2673         LCD_WR_DATA(SSD_HPS);
2674         LCD_WR_DATA(SSD_HOR_PULSE_WIDTH-1);
2675         LCD_WR_DATA(0x00);
2676         LCD_WR_DATA(0x00);
2677         LCD_WR_DATA(0x00);
2678         LCD_WR_REG(0xB6);        //Set vertical period
2679         LCD_WR_DATA((SSD_VT-1)>>8);
2680         LCD_WR_DATA(SSD_VT-1);
2681         LCD_WR_DATA(SSD_VPS>>8);
2682         LCD_WR_DATA(SSD_VPS);
2683         LCD_WR_DATA(SSD_VER_FRONT_PORCH-1);
2684         LCD_WR_DATA(0x00);
2685         LCD_WR_DATA(0x00);
2686         
2687         LCD_WR_REG(0xF0);    //设置SSD1963与CPU接口为16bit  
2688         LCD_WR_DATA(0x03);    //16-bit(565 format) data for 16bpp 
2689 
2690         LCD_WR_REG(0x29);    //开启显示
2691         //设置PWM输出  背光通过占空比可调 
2692         LCD_WR_REG(0xD0);    //设置自动白平衡DBC
2693         LCD_WR_DATA(0x00);    //disable
2694     
2695         LCD_WR_REG(0xBE);    //配置PWM输出
2696         LCD_WR_DATA(0x05);    //1设置PWM频率
2697         LCD_WR_DATA(0xFE);    //2设置PWM占空比
2698         LCD_WR_DATA(0x01);    //3设置C
2699         LCD_WR_DATA(0x00);    //4设置D
2700         LCD_WR_DATA(0x00);    //5设置E 
2701         LCD_WR_DATA(0x00);    //6设置F 
2702         
2703         LCD_WR_REG(0xB8);    //设置GPIO配置
2704         LCD_WR_DATA(0x03);    //2个IO口设置成输出
2705         LCD_WR_DATA(0x01);    //GPIO使用正常的IO功能 
2706         LCD_WR_REG(0xBA);
2707         LCD_WR_DATA(0X01);    //GPIO[1:0]=01,控制LCD方向
2708         
2709         LCD_SSD_BackLightSet(100);//背光设置为最亮
2710     }    
2711     LCD_Display_Dir(0);             //默认为竖屏
2712     LCD_LED=1;                    //点亮背光
2713     LCD_Clear(WHITE);
2714 }            
2715   
2716 
2717 /*******************************************************************************
2718 1.函数名称:    清屏函数
2719 2.包含变量: color:要清屏的填充色
2720 3.修改日期:
2721 4.返回值:    
2722 *********************************************************************************/
2723 void LCD_Clear(u16 color)
2724 {
2725     u32 index=0;      
2726     u32 totalpoint=lcddev.width;
2727     totalpoint*=lcddev.height;             //得到总点数
2728     if((lcddev.id==0X6804)&&(lcddev.dir==1))//6804横屏的时候特殊处理  
2729     {                            
2730          lcddev.dir=0;     
2731          lcddev.setxcmd=0X2A;
2732         lcddev.setycmd=0X2B;                   
2733         LCD_SetCursor(0x00,0x0000);        //设置光标位置  
2734          lcddev.dir=1;     
2735           lcddev.setxcmd=0X2B;
2736         lcddev.setycmd=0X2A;       
2737      }else LCD_SetCursor(0x00,0x0000);    //设置光标位置 
2738     LCD_WriteRAM_Prepare();             //开始写入GRAM            
2739     for(index=0;index<totalpoint;index++)LCD_WR_DATA(color);    
2740 }  
2741 
2742 /*******************************************************************************
2743 1.函数名称:    在指定区域内填充指定颜色
2744 2.包含变量:    区域大小:(xend-xsta+1)*(yend-ysta+1)
2745             xsta
2746             color:要填充的颜色
2747 3.修改日期:
2748 4.返回值:    
2749 *********************************************************************************/
2750 void LCD_Fill(u16 sx,u16 sy,u16 ex,u16 ey,u16 color)
2751 {          
2752     u16 i,j;
2753     u16 xlen=0;
2754     u16 temp;
2755     if((lcddev.id==0X6804)&&(lcddev.dir==1))    //6804横屏的时候特殊处理  
2756     {
2757         temp=sx;
2758         sx=sy;
2759         sy=lcddev.width-ex-1;      
2760         ex=ey;
2761         ey=lcddev.width-temp-1;
2762          lcddev.dir=0;     
2763          lcddev.setxcmd=0X2A;
2764         lcddev.setycmd=0X2B;                   
2765         LCD_Fill(sx,sy,ex,ey,color);  
2766          lcddev.dir=1;     
2767           lcddev.setxcmd=0X2B;
2768         lcddev.setycmd=0X2A;       
2769      }else
2770     {
2771         xlen=ex-sx+1;     
2772         for(i=sy;i<=ey;i++)
2773         {
2774              LCD_SetCursor(sx,i);                      //设置光标位置 
2775             LCD_WriteRAM_Prepare();                 //开始写入GRAM      
2776             for(j=0;j<xlen;j++)LCD_WR_DATA(color);    //设置光标位置         
2777         }
2778     }
2779 }  
2780 
2781 /*******************************************************************************
2782 1.函数名称:    在指定区域内填充指定颜色块
2783 2.包含变量:    (sx,sy),(ex,ey):填充矩形对角坐标,区域大小为:(ex-sx+1)*(ey-sy+1)   
2784             color:要填充的颜色
2785 3.修改日期:
2786 4.返回值:    
2787 *********************************************************************************/
2788 void LCD_Color_Fill(u16 sx,u16 sy,u16 ex,u16 ey,u16 *color)
2789 {  
2790     u16 height,width;
2791     u16 i,j;
2792     width=ex-sx+1;             //得到填充的宽度
2793     height=ey-sy+1;            //高度
2794      for(i=0;i<height;i++)
2795     {
2796          LCD_SetCursor(sx,sy+i);       //设置光标位置 
2797         LCD_WriteRAM_Prepare();     //开始写入GRAM
2798         for(j=0;j<width;j++)LCD_WR_DATA(color[i*width+j]);//写入数据 
2799     }      
2800 } 
2801 
2802 /*******************************************************************************
2803 1.函数名称:    画线
2804 2.包含变量:    x1,y1:起点坐标
2805             x2,y2:终点坐标
2806 3.修改日期:
2807 4.返回值:    
2808 *********************************************************************************/
2809 void LCD_DrawLine(u16 x1, u16 y1, u16 x2, u16 y2)
2810 {
2811     u16 t; 
2812     int xerr=0,yerr=0,delta_x,delta_y,distance; 
2813     int incx,incy,uRow,uCol; 
2814     delta_x=x2-x1; //计算坐标增量 
2815     delta_y=y2-y1; 
2816     uRow=x1; 
2817     uCol=y1; 
2818     if(delta_x>0)incx=1; //设置单步方向 
2819     else if(delta_x==0)incx=0;//垂直线 
2820     else {incx=-1;delta_x=-delta_x;} 
2821     if(delta_y>0)incy=1; 
2822     else if(delta_y==0)incy=0;//水平线 
2823     else{incy=-1;delta_y=-delta_y;} 
2824     if( delta_x>delta_y)distance=delta_x; //选取基本增量坐标轴 
2825     else distance=delta_y; 
2826     for(t=0;t<=distance+1;t++ )//画线输出 
2827     {  
2828         LCD_DrawPoint(uRow,uCol);//画点 
2829         xerr+=delta_x ; 
2830         yerr+=delta_y ; 
2831         if(xerr>distance) 
2832         { 
2833             xerr-=distance; 
2834             uRow+=incx; 
2835         } 
2836         if(yerr>distance) 
2837         { 
2838             yerr-=distance; 
2839             uCol+=incy; 
2840         } 
2841     }  
2842 }    
2843 
2844 /*******************************************************************************
2845 1.函数名称:    画矩形    
2846 2.包含变量:    x1,y1),(x2,y2):矩形的对角坐标
2847 3.修改日期:
2848 4.返回值:    
2849 *********************************************************************************/
2850 void LCD_DrawRectangle(u16 x1, u16 y1, u16 x2, u16 y2)
2851 {
2852     LCD_DrawLine(x1,y1,x2,y1);
2853     LCD_DrawLine(x1,y1,x1,y2);
2854     LCD_DrawLine(x1,y2,x2,y2);
2855     LCD_DrawLine(x2,y1,x2,y2);
2856 }
2857 
2858 /*******************************************************************************
2859 1.函数名称:    在指定位置画一个指定大小的圆    
2860 2.包含变量:    (x,y):中心点        r:半径
2861 3.修改日期:
2862 4.返回值:    
2863 *********************************************************************************/
2864 void LCD_Draw_Circle(u16 x0,u16 y0,u8 r)
2865 {
2866     int a,b;
2867     int di;
2868     a=0;b=r;      
2869     di=3-(r<<1);             //判断下个点位置的标志
2870     while(a<=b)
2871     {
2872         LCD_DrawPoint(x0+a,y0-b);             //5
2873          LCD_DrawPoint(x0+b,y0-a);             //0           
2874         LCD_DrawPoint(x0+b,y0+a);             //4               
2875         LCD_DrawPoint(x0+a,y0+b);             //6 
2876         LCD_DrawPoint(x0-a,y0+b);             //1       
2877          LCD_DrawPoint(x0-b,y0+a);             
2878         LCD_DrawPoint(x0-a,y0-b);             //2             
2879           LCD_DrawPoint(x0-b,y0-a);             //7                  
2880         a++;
2881         //使用Bresenham算法画圆     
2882         if(di<0)di +=4*a+6;      
2883         else
2884         {
2885             di+=10+4*(a-b);   
2886             b--;
2887         }                             
2888     }
2889 }                                       
2890 
2891 /*******************************************************************************
2892 1.函数名称:    在指定位置显示一个字符
2893 2.包含变量:    x,y:起始坐标        num:要显示的字符:" "--->"~"    size:字体大小 12/16/24
2894             mode:叠加方式(1)还是非叠加方式(0)
2895 3.修改日期:
2896 4.返回值:    
2897 *********************************************************************************/
2898 void LCD_ShowChar(u16 x,u16 y,u8 num,u8 size,u8 mode)
2899 {                                
2900     u8 temp,t1,t;
2901     u16 y0=y;
2902     u8 csize=(size/8+((size%8)?1:0))*(size/2);        //得到字体一个字符对应点阵集所占的字节数    
2903      num=num- ;//得到偏移后的值(ASCII字库是从空格开始取模,所以-‘ ‘就是对应字符的字库)
2904     for(t=0;t<csize;t++)
2905     {   
2906         if(size==12)temp=asc2_1206[num][t];          //调用1206字体
2907         else if(size==16)temp=asc2_1608[num][t];    //调用1608字体
2908         else if(size==24)temp=asc2_2412[num][t];    //调用2412字体
2909         else return;                                //没有的字库
2910         for(t1=0;t1<8;t1++)
2911         {                
2912             if(temp&0x80)LCD_Fast_DrawPoint(x,y,POINT_COLOR);
2913             else if(mode==0)LCD_Fast_DrawPoint(x,y,BACK_COLOR);
2914             temp<<=1;
2915             y++;
2916             if(y>=lcddev.height)return;        //超区域了
2917             if((y-y0)==size)
2918             {
2919                 y=y0;
2920                 x++;
2921                 if(x>=lcddev.width)return;    //超区域了
2922                 break;
2923             }
2924         }       
2925     }                            
2926 }   
2927 
2928 /*******************************************************************************
2929 1.函数名称:    m^n函数
2930 2.包含变量:    返回值:m^n次方.
2931 3.修改日期:
2932 4.返回值:    
2933 *********************************************************************************/
2934 u32 LCD_Pow(u8 m,u8 n)
2935 {
2936     u32 result=1;     
2937     while(n--)result*=m;    
2938     return result;
2939 }             
2940 
2941 /*******************************************************************************
2942 1.函数名称:    显示数字,高位为0,则不显示
2943 2.包含变量:    x,y :起点坐标     len :数字的位数        size:字体大小    color:颜色 
2944             num:数值(0~4294967295);
2945 3.修改日期:
2946 4.返回值:    
2947 *********************************************************************************/
2948 void LCD_ShowNum(u16 x,u16 y,u32 num,u8 len,u8 size)
2949 {             
2950     u8 t,temp;
2951     u8 enshow=0;                           
2952     for(t=0;t<len;t++)
2953     {
2954         temp=(num/LCD_Pow(10,len-t-1))%10;
2955         if(enshow==0&&t<(len-1))
2956         {
2957             if(temp==0)
2958             {
2959                 LCD_ShowChar(x+(size/2)*t,y, ,size,0);
2960                 continue;
2961             }else enshow=1; 
2962               
2963         }
2964          LCD_ShowChar(x+(size/2)*t,y,temp+0,size,0); 
2965     }
2966 } 
2967 
2968 /*******************************************************************************
2969 1.函数名称:显示数字
2970 2.包含变量:    x,y:起点坐标        num:数值(0~999999999);         len:长度(即要显示的位数)
2971             size:字体大小    mode:[7]:0,不填充;1,填充0.    [6:1]:保留
2972                             [0]:0,非叠加显示;1,叠加显示.
2973 3.修改日期:
2974 4.备注:    高位为0,还是显示
2975 *********************************************************************************/
2976 void LCD_ShowxNum(u16 x,u16 y,u32 num,u8 len,u8 size,u8 mode)
2977 {  
2978     u8 t,temp;
2979     u8 enshow=0;                           
2980     for(t=0;t<len;t++)
2981     {
2982         temp=(num/LCD_Pow(10,len-t-1))%10;
2983         if(enshow==0&&t<(len-1))
2984         {
2985             if(temp==0)
2986             {
2987                 if(mode&0X80)LCD_ShowChar(x+(size/2)*t,y,0,size,mode&0X01);  
2988                 else LCD_ShowChar(x+(size/2)*t,y, ,size,mode&0X01);  
2989                  continue;
2990             }else enshow=1; 
2991               
2992         }
2993          LCD_ShowChar(x+(size/2)*t,y,temp+0,size,mode&0X01); 
2994     }
2995 } 
2996 
2997 /*******************************************************************************
2998 1.函数名称:    显示字符串
2999 2.包含变量:    x,y:起点坐标        width,height:区域大小  size:字体大小        *p:字符串起始地址    
3000 3.修改日期:
3001 4.返回值:    
3002 *********************************************************************************/
3003 void LCD_ShowString(u16 x,u16 y,u16 width,u16 height,u8 size,u8 *p)
3004 {         
3005     u8 x0=x;
3006     width+=x;
3007     height+=y;
3008     while((*p<=~)&&(*p>= ))//判断是不是非法字符!
3009     {       
3010         if(x>=width){x=x0;y+=size;}
3011         if(y>=height)break;//退出
3012         LCD_ShowChar(x,y,*p,size,0);
3013         x+=size/2;
3014         p++;
3015     }  
3016 }
  1 #ifndef __LCD_H
  2 #define __LCD_H        
  3 #include "sys.h"     
  4 #include "stdlib.h"
  5  
  6 //LCD重要参数集
  7 typedef struct  
  8 {                                            
  9     u16 width;            //LCD 宽度
 10     u16 height;            //LCD 高度
 11     u16 id;                //LCD ID
 12     u8  dir;            //横屏还是竖屏控制:0,竖屏;1,横屏。    
 13     u16    wramcmd;        //开始写gram指令
 14     u16 setxcmd;        //设置x坐标指令
 15     u16  setycmd;        //设置y坐标指令     
 16 }_lcd_dev;       
 17 
 18 //LCD参数
 19 extern _lcd_dev lcddev;    //管理LCD重要参数
 20 //LCD的画笔颜色和背景色       
 21 extern u16  POINT_COLOR;//默认红色    
 22 extern u16  BACK_COLOR; //背景颜色.默认为白色
 23 
 24 ////////////////////////////////////////////////////////////////////
 25 //-----------------LCD端口定义---------------- 
 26 #define    LCD_LED PCout(10)                 //LCD背光        PC10 
 27  
 28 #define    LCD_CS_SET  GPIOC->BSRR=1<<9    //片选端口          PC9
 29 #define    LCD_RS_SET    GPIOC->BSRR=1<<8    //数据/命令         PC8       
 30 #define    LCD_WR_SET    GPIOC->BSRR=1<<7    //写数据            PC7
 31 #define    LCD_RD_SET    GPIOC->BSRR=1<<6    //读数据            PC6
 32                                     
 33 #define    LCD_CS_CLR  GPIOC->BRR=1<<9     //片选端口          PC9
 34 #define    LCD_RS_CLR    GPIOC->BRR=1<<8     //数据/命令        PC8       
 35 #define    LCD_WR_CLR    GPIOC->BRR=1<<7     //写数据            PC7
 36 #define    LCD_RD_CLR    GPIOC->BRR=1<<6     //读数据            PC6   
 37 
 38 
 39 //PB0~15,作为数据线
 40 #define DATAOUT(x) GPIOB->ODR=x; //数据输出
 41 #define DATAIN     GPIOB->IDR;   //数据输入    
 42 
 43  
 44 //////////////////////////////////////////////////////////////////////
 45 //扫描方向定义
 46 #define L2R_U2D  0 //从左到右,从上到下
 47 #define L2R_D2U  1 //从左到右,从下到上
 48 #define R2L_U2D  2 //从右到左,从上到下
 49 #define R2L_D2U  3 //从右到左,从下到上
 50 
 51 #define U2D_L2R  4 //从上到下,从左到右
 52 #define U2D_R2L  5 //从上到下,从右到左
 53 #define D2U_L2R  6 //从下到上,从左到右
 54 #define D2U_R2L  7 //从下到上,从右到左
 55 
 56 #define DFT_SCAN_DIR  L2R_U2D  //默认的扫描方向
 57      
 58 //扫描方向定义
 59 #define L2R_U2D  0 //从左到右,从上到下
 60 #define L2R_D2U  1 //从左到右,从下到上
 61 #define R2L_U2D  2 //从右到左,从上到下
 62 #define R2L_D2U  3 //从右到左,从下到上
 63 
 64 #define U2D_L2R  4 //从上到下,从左到右
 65 #define U2D_R2L  5 //从上到下,从右到左
 66 #define D2U_L2R  6 //从下到上,从左到右
 67 #define D2U_R2L  7 //从下到上,从右到左     
 68 
 69 #define DFT_SCAN_DIR  L2R_U2D  //默认的扫描方向
 70 
 71 //画笔颜色
 72 #define WHITE              0xFFFF
 73 #define BLACK              0x0000      
 74 #define BLUE              0x001F  
 75 #define BRED             0XF81F
 76 #define GRED              0XFFE0
 77 #define GBLUE             0X07FF
 78 #define RED                0xF800
 79 #define MAGENTA            0xF81F
 80 #define GREEN              0x07E0
 81 #define CYAN               0x7FFF
 82 #define YELLOW             0xFFE0
 83 #define BROWN              0XBC40 //棕色
 84 #define BRRED              0XFC07 //棕红色
 85 #define GRAY               0X8430 //灰色
 86 //GUI颜色
 87 
 88 #define DARKBLUE           0X01CF    //深蓝色
 89 #define LIGHTBLUE           0X7D7C    //浅蓝色  
 90 #define GRAYBLUE            0X5458 //灰蓝色
 91 //以上三色为PANEL的颜色 
 92  
 93 #define LIGHTGREEN          0X841F //浅绿色 
 94 #define LGRAY              0XC618 //浅灰色(PANNEL),窗体背景色
 95 
 96 #define LGRAYBLUE        0XA651 //浅灰蓝色(中间层颜色)
 97 #define LBBLUE           0X2B12 //浅棕蓝色(选择条目的反色)
 98                                                                       
 99 void LCD_Init(void);                                                           //初始化
100 void LCD_DisplayOn(void);                                                    //开显示
101 void LCD_DisplayOff(void);                                                    //关显示
102 void LCD_Clear(u16 Color);                                                     //清屏
103 void LCD_SetCursor(u16 Xpos, u16 Ypos);                                        //设置光标
104 void LCD_DrawPoint(u16 x,u16 y);                                            //画点
105 void LCD_Fast_DrawPoint(u16 x,u16 y,u16 color);                                //快速画点
106 u16  LCD_ReadPoint(u16 x,u16 y);                                             //读点 
107 void LCD_Draw_Circle(u16 x0,u16 y0,u8 r);                                    //画圆
108 void LCD_DrawLine(u16 x1, u16 y1, u16 x2, u16 y2);                            //画线
109 void LCD_DrawRectangle(u16 x1, u16 y1, u16 x2, u16 y2);                           //画矩形
110 void LCD_Fill(u16 sx,u16 sy,u16 ex,u16 ey,u16 color);                           //填充单色
111 void LCD_Color_Fill(u16 sx,u16 sy,u16 ex,u16 ey,u16 *color);                //填充指定颜色  *color?
112 void LCD_ShowChar(u16 x,u16 y,u8 num,u8 size,u8 mode);                        //显示一个字符
113 void LCD_ShowNum(u16 x,u16 y,u32 num,u8 len,u8 size);                          //显示一个数字
114 void LCD_ShowxNum(u16 x,u16 y,u32 num,u8 len,u8 size,u8 mode);                //显示 数字
115 void LCD_ShowString(u16 x,u16 y,u16 width,u16 height,u8 size,u8 *p);        //显示一个字符串,12/16字体
116 
117 void LCD_WriteReg(u16 LCD_Reg, u16 LCD_RegValue);
118 u16 LCD_ReadReg(u16 LCD_Reg);
119 void LCD_WriteRAM_Prepare(void);
120 void LCD_WriteRAM(u16 RGB_Code);          
121 void LCD_Scan_Dir(u8 dir);                                    //设置屏扫描方向
122 void LCD_Display_Dir(u8 dir);                                //设置屏幕显示方向
123 void LCD_Set_Window(u16 sx,u16 sy,u16 width,u16 height);    //设置窗口    
124 
125 //写数据函数
126 #define LCD_WR_DATA(data){127 LCD_RS_SET;128 LCD_CS_CLR;129 DATAOUT(data);130 LCD_WR_CLR;131 LCD_WR_SET;132 LCD_CS_SET;133 } 
134 
135 //LCD分辨率设置
136 #define SSD_HOR_RESOLUTION        800        //LCD水平分辨率
137 #define SSD_VER_RESOLUTION        480        //LCD垂直分辨率
138 //LCD驱动参数设置
139 #define SSD_HOR_PULSE_WIDTH        1        //水平脉宽
140 #define SSD_HOR_BACK_PORCH        46        //水平前廊
141 #define SSD_HOR_FRONT_PORCH        210        //水平后廊
142 
143 #define SSD_VER_PULSE_WIDTH        1        //垂直脉宽
144 #define SSD_VER_BACK_PORCH        23        //垂直前廊
145 #define SSD_VER_FRONT_PORCH        22        //垂直前廊
146 //如下几个参数,自动计算
147 #define SSD_HT    (SSD_HOR_RESOLUTION+SSD_HOR_BACK_PORCH+SSD_HOR_FRONT_PORCH)
148 #define SSD_HPS    (SSD_HOR_BACK_PORCH)
149 #define SSD_VT     (SSD_VER_RESOLUTION+SSD_VER_BACK_PORCH+SSD_VER_FRONT_PORCH)
150 #define SSD_VPS (SSD_VER_BACK_PORCH)
151                                    
152 #endif
  1 #ifndef __FONT_H
  2 #define __FONT_H        
  3 //常用ASCII表
  4 //偏移量32 
  5 //ASCII字符集: !"#$%&‘()*+,-./0123456789:;<=>[email protected][]^_`abcdefghijklmnopqrstuvwxyz{|}~
  6 //PC2LCD2002取模方式设置:阴码+逐列式+顺向+C51格式
  7 //总共:3个字符集(12*12、16*16和24*24),用户可以自行新增其他分辨率的字符集。
  8 //每个字符所占用的字节数为:(size/8+((size%8)?1:0))*(size/2),其中size:是字库生成时的点阵大小(12/16/24...)
  9  
 10 //12*12 ASCII字符集点阵
 11 const unsigned char asc2_1206[95][12]={
 12 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
 13 {0x00,0x00,0x00,0x00,0x3F,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
 14 {0x00,0x00,0x30,0x00,0x40,0x00,0x30,0x00,0x40,0x00,0x00,0x00},/*""",2*/
 15 {0x09,0x00,0x0B,0xC0,0x3D,0x00,0x0B,0xC0,0x3D,0x00,0x09,0x00},/*"#",3*/
 16 {0x18,0xC0,0x24,0x40,0x7F,0xE0,0x22,0x40,0x31,0x80,0x00,0x00},/*"$",4*/
 17 {0x18,0x00,0x24,0xC0,0x1B,0x00,0x0D,0x80,0x32,0x40,0x01,0x80},/*"%",5*/
 18 {0x03,0x80,0x1C,0x40,0x27,0x40,0x1C,0x80,0x07,0x40,0x00,0x40},/*"&",6*/
 19 {0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"‘",7*/
 20 {0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x20,0x40,0x40,0x20},/*"(",8*/
 21 {0x00,0x00,0x40,0x20,0x20,0x40,0x1F,0x80,0x00,0x00,0x00,0x00},/*")",9*/
 22 {0x09,0x00,0x06,0x00,0x1F,0x80,0x06,0x00,0x09,0x00,0x00,0x00},/*"*",10*/
 23 {0x04,0x00,0x04,0x00,0x3F,0x80,0x04,0x00,0x04,0x00,0x00,0x00},/*"+",11*/
 24 {0x00,0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
 25 {0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00},/*"-",13*/
 26 {0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
 27 {0x00,0x20,0x01,0xC0,0x06,0x00,0x38,0x00,0x40,0x00,0x00,0x00},/*"/",15*/
 28 {0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"0",16*/
 29 {0x00,0x00,0x10,0x40,0x3F,0xC0,0x00,0x40,0x00,0x00,0x00,0x00},/*"1",17*/
 30 {0x18,0xC0,0x21,0x40,0x22,0x40,0x24,0x40,0x18,0x40,0x00,0x00},/*"2",18*/
 31 {0x10,0x80,0x20,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"3",19*/
 32 {0x02,0x00,0x0D,0x00,0x11,0x00,0x3F,0xC0,0x01,0x40,0x00,0x00},/*"4",20*/
 33 {0x3C,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x23,0x80,0x00,0x00},/*"5",21*/
 34 {0x1F,0x80,0x24,0x40,0x24,0x40,0x34,0x40,0x03,0x80,0x00,0x00},/*"6",22*/
 35 {0x30,0x00,0x20,0x00,0x27,0xC0,0x38,0x00,0x20,0x00,0x00,0x00},/*"7",23*/
 36 {0x1B,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"8",24*/
 37 {0x1C,0x00,0x22,0xC0,0x22,0x40,0x22,0x40,0x1F,0x80,0x00,0x00},/*"9",25*/
 38 {0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
 39 {0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
 40 {0x00,0x00,0x04,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0x40,0x40},/*"<",28*/
 41 {0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x00,0x00},/*"=",29*/
 42 {0x00,0x00,0x40,0x40,0x20,0x80,0x11,0x00,0x0A,0x00,0x04,0x00},/*">",30*/
 43 {0x18,0x00,0x20,0x00,0x23,0x40,0x24,0x00,0x18,0x00,0x00,0x00},/*"?",31*/
 44 {0x1F,0x80,0x20,0x40,0x27,0x40,0x29,0x40,0x1F,0x40,0x00,0x00},/*"@",32*/
 45 {0x00,0x40,0x07,0xC0,0x39,0x00,0x0F,0x00,0x01,0xC0,0x00,0x40},/*"A",33*/
 46 {0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"B",34*/
 47 {0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x30,0x80,0x00,0x00},/*"C",35*/
 48 {0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"D",36*/
 49 {0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x40,0x30,0xC0,0x00,0x00},/*"E",37*/
 50 {0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x00,0x30,0x00,0x00,0x00},/*"F",38*/
 51 {0x0F,0x00,0x10,0x80,0x20,0x40,0x22,0x40,0x33,0x80,0x02,0x00},/*"G",39*/
 52 {0x20,0x40,0x3F,0xC0,0x04,0x00,0x04,0x00,0x3F,0xC0,0x20,0x40},/*"H",40*/
 53 {0x20,0x40,0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x00,0x00},/*"I",41*/
 54 {0x00,0x60,0x20,0x20,0x20,0x20,0x3F,0xC0,0x20,0x00,0x20,0x00},/*"J",42*/
 55 {0x20,0x40,0x3F,0xC0,0x24,0x40,0x0B,0x00,0x30,0xC0,0x20,0x40},/*"K",43*/
 56 {0x20,0x40,0x3F,0xC0,0x20,0x40,0x00,0x40,0x00,0x40,0x00,0xC0},/*"L",44*/
 57 {0x3F,0xC0,0x3C,0x00,0x03,0xC0,0x3C,0x00,0x3F,0xC0,0x00,0x00},/*"M",45*/
 58 {0x20,0x40,0x3F,0xC0,0x0C,0x40,0x23,0x00,0x3F,0xC0,0x20,0x00},/*"N",46*/
 59 {0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"O",47*/
 60 {0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x00,0x18,0x00,0x00,0x00},/*"P",48*/
 61 {0x1F,0x80,0x21,0x40,0x21,0x40,0x20,0xE0,0x1F,0xA0,0x00,0x00},/*"Q",49*/
 62 {0x20,0x40,0x3F,0xC0,0x24,0x40,0x26,0x00,0x19,0xC0,0x00,0x40},/*"R",50*/
 63 {0x18,0xC0,0x24,0x40,0x24,0x40,0x22,0x40,0x31,0x80,0x00,0x00},/*"S",51*/
 64 {0x30,0x00,0x20,0x40,0x3F,0xC0,0x20,0x40,0x30,0x00,0x00,0x00},/*"T",52*/
 65 {0x20,0x00,0x3F,0x80,0x00,0x40,0x00,0x40,0x3F,0x80,0x20,0x00},/*"U",53*/
 66 {0x20,0x00,0x3E,0x00,0x01,0xC0,0x07,0x00,0x38,0x00,0x20,0x00},/*"V",54*/
 67 {0x38,0x00,0x07,0xC0,0x3C,0x00,0x07,0xC0,0x38,0x00,0x00,0x00},/*"W",55*/
 68 {0x20,0x40,0x39,0xC0,0x06,0x00,0x39,0xC0,0x20,0x40,0x00,0x00},/*"X",56*/
 69 {0x20,0x00,0x38,0x40,0x07,0xC0,0x38,0x40,0x20,0x00,0x00,0x00},/*"Y",57*/
 70 {0x30,0x40,0x21,0xC0,0x26,0x40,0x38,0x40,0x20,0xC0,0x00,0x00},/*"Z",58*/
 71 {0x00,0x00,0x00,0x00,0x7F,0xE0,0x40,0x20,0x40,0x20,0x00,0x00},/*"[",59*/
 72 {0x00,0x00,0x70,0x00,0x0C,0x00,0x03,0x80,0x00,0x40,0x00,0x00},/*"",60*/
 73 {0x00,0x00,0x40,0x20,0x40,0x20,0x7F,0xE0,0x00,0x00,0x00,0x00},/*"]",61*/
 74 {0x00,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
 75 {0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10},/*"_",63*/
 76 {0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
 77 {0x00,0x00,0x02,0x80,0x05,0x40,0x05,0x40,0x03,0xC0,0x00,0x40},/*"a",65*/
 78 {0x20,0x00,0x3F,0xC0,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00},/*"b",66*/
 79 {0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x06,0x40,0x00,0x00},/*"c",67*/
 80 {0x00,0x00,0x03,0x80,0x04,0x40,0x24,0x40,0x3F,0xC0,0x00,0x40},/*"d",68*/
 81 {0x00,0x00,0x03,0x80,0x05,0x40,0x05,0x40,0x03,0x40,0x00,0x00},/*"e",69*/
 82 {0x00,0x00,0x04,0x40,0x1F,0xC0,0x24,0x40,0x24,0x40,0x20,0x00},/*"f",70*/
 83 {0x00,0x00,0x02,0xE0,0x05,0x50,0x05,0x50,0x06,0x50,0x04,0x20},/*"g",71*/
 84 {0x20,0x40,0x3F,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40},/*"h",72*/
 85 {0x00,0x00,0x04,0x40,0x27,0xC0,0x00,0x40,0x00,0x00,0x00,0x00},/*"i",73*/
 86 {0x00,0x10,0x00,0x10,0x04,0x10,0x27,0xE0,0x00,0x00,0x00,0x00},/*"j",74*/
 87 {0x20,0x40,0x3F,0xC0,0x01,0x40,0x07,0x00,0x04,0xC0,0x04,0x40},/*"k",75*/
 88 {0x20,0x40,0x20,0x40,0x3F,0xC0,0x00,0x40,0x00,0x40,0x00,0x00},/*"l",76*/
 89 {0x07,0xC0,0x04,0x00,0x07,0xC0,0x04,0x00,0x03,0xC0,0x00,0x00},/*"m",77*/
 90 {0x04,0x40,0x07,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40},/*"n",78*/
 91 {0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00},/*"o",79*/
 92 {0x04,0x10,0x07,0xF0,0x04,0x50,0x04,0x40,0x03,0x80,0x00,0x00},/*"p",80*/
 93 {0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x50,0x07,0xF0,0x00,0x10},/*"q",81*/
 94 {0x04,0x40,0x07,0xC0,0x02,0x40,0x04,0x00,0x04,0x00,0x00,0x00},/*"r",82*/
 95 {0x00,0x00,0x06,0x40,0x05,0x40,0x05,0x40,0x04,0xC0,0x00,0x00},/*"s",83*/
 96 {0x00,0x00,0x04,0x00,0x1F,0x80,0x04,0x40,0x00,0x40,0x00,0x00},/*"t",84*/
 97 {0x04,0x00,0x07,0x80,0x00,0x40,0x04,0x40,0x07,0xC0,0x00,0x40},/*"u",85*/
 98 {0x04,0x00,0x07,0x00,0x04,0xC0,0x01,0x80,0x06,0x00,0x04,0x00},/*"v",86*/
 99 {0x06,0x00,0x01,0xC0,0x07,0x00,0x01,0xC0,0x06,0x00,0x00,0x00},/*"w",87*/
100 {0x04,0x40,0x06,0xC0,0x01,0x00,0x06,0xC0,0x04,0x40,0x00,0x00},/*"x",88*/
101 {0x04,0x10,0x07,0x10,0x04,0xE0,0x01,0x80,0x06,0x00,0x04,0x00},/*"y",89*/
102 {0x00,0x00,0x04,0x40,0x05,0xC0,0x06,0x40,0x04,0x40,0x00,0x00},/*"z",90*/
103 {0x00,0x00,0x00,0x00,0x04,0x00,0x7B,0xE0,0x40,0x20,0x00,0x00},/*"{",91*/
104 {0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x00,0x00,0x00,0x00},/*"|",92*/
105 {0x00,0x00,0x40,0x20,0x7B,0xE0,0x04,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
106 {0x40,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x40,0x00},/*"~",94*/
107 };  
108 //16*16 ASCII字符集点阵
109 const unsigned char asc2_1608[95][16]={      
110 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
111 {0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCC,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
112 {0x00,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x00,0x00},/*""",2*/
113 {0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x00,0x00},/*"#",3*/
114 {0x00,0x00,0x0E,0x18,0x11,0x04,0x3F,0xFF,0x10,0x84,0x0C,0x78,0x00,0x00,0x00,0x00},/*"$",4*/
115 {0x0F,0x00,0x10,0x84,0x0F,0x38,0x00,0xC0,0x07,0x78,0x18,0x84,0x00,0x78,0x00,0x00},/*"%",5*/
116 {0x00,0x78,0x0F,0x84,0x10,0xC4,0x11,0x24,0x0E,0x98,0x00,0xE4,0x00,0x84,0x00,0x08},/*"&",6*/
117 {0x08,0x00,0x68,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"‘",7*/
118 {0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x18,0x18,0x20,0x04,0x40,0x02,0x00,0x00},/*"(",8*/
119 {0x00,0x00,0x40,0x02,0x20,0x04,0x18,0x18,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00},/*")",9*/
120 {0x02,0x40,0x02,0x40,0x01,0x80,0x0F,0xF0,0x01,0x80,0x02,0x40,0x02,0x40,0x00,0x00},/*"*",10*/
121 {0x00,0x80,0x00,0x80,0x00,0x80,0x0F,0xF8,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00},/*"+",11*/
122 {0x00,0x01,0x00,0x0D,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
123 {0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80},/*"-",13*/
124 {0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
125 {0x00,0x00,0x00,0x06,0x00,0x18,0x00,0x60,0x01,0x80,0x06,0x00,0x18,0x00,0x20,0x00},/*"/",15*/
126 {0x00,0x00,0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"0",16*/
127 {0x00,0x00,0x08,0x04,0x08,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"1",17*/
128 {0x00,0x00,0x0E,0x0C,0x10,0x14,0x10,0x24,0x10,0x44,0x11,0x84,0x0E,0x0C,0x00,0x00},/*"2",18*/
129 {0x00,0x00,0x0C,0x18,0x10,0x04,0x11,0x04,0x11,0x04,0x12,0x88,0x0C,0x70,0x00,0x00},/*"3",19*/
130 {0x00,0x00,0x00,0xE0,0x03,0x20,0x04,0x24,0x08,0x24,0x1F,0xFC,0x00,0x24,0x00,0x00},/*"4",20*/
131 {0x00,0x00,0x1F,0x98,0x10,0x84,0x11,0x04,0x11,0x04,0x10,0x88,0x10,0x70,0x00,0x00},/*"5",21*/
132 {0x00,0x00,0x07,0xF0,0x08,0x88,0x11,0x04,0x11,0x04,0x18,0x88,0x00,0x70,0x00,0x00},/*"6",22*/
133 {0x00,0x00,0x1C,0x00,0x10,0x00,0x10,0xFC,0x13,0x00,0x1C,0x00,0x10,0x00,0x00,0x00},/*"7",23*/
134 {0x00,0x00,0x0E,0x38,0x11,0x44,0x10,0x84,0x10,0x84,0x11,0x44,0x0E,0x38,0x00,0x00},/*"8",24*/
135 {0x00,0x00,0x07,0x00,0x08,0x8C,0x10,0x44,0x10,0x44,0x08,0x88,0x07,0xF0,0x00,0x00},/*"9",25*/
136 {0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
137 {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
138 {0x00,0x00,0x00,0x80,0x01,0x40,0x02,0x20,0x04,0x10,0x08,0x08,0x10,0x04,0x00,0x00},/*"<",28*/
139 {0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x00,0x00},/*"=",29*/
140 {0x00,0x00,0x10,0x04,0x08,0x08,0x04,0x10,0x02,0x20,0x01,0x40,0x00,0x80,0x00,0x00},/*">",30*/
141 {0x00,0x00,0x0E,0x00,0x12,0x00,0x10,0x0C,0x10,0x6C,0x10,0x80,0x0F,0x00,0x00,0x00},/*"?",31*/
142 {0x03,0xE0,0x0C,0x18,0x13,0xE4,0x14,0x24,0x17,0xC4,0x08,0x28,0x07,0xD0,0x00,0x00},/*"@",32*/
143 {0x00,0x04,0x00,0x3C,0x03,0xC4,0x1C,0x40,0x07,0x40,0x00,0xE4,0x00,0x1C,0x00,0x04},/*"A",33*/
144 {0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x11,0x04,0x0E,0x88,0x00,0x70,0x00,0x00},/*"B",34*/
145 {0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x08,0x1C,0x10,0x00,0x00},/*"C",35*/
146 {0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"D",36*/
147 {0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x17,0xC4,0x10,0x04,0x08,0x18,0x00,0x00},/*"E",37*/
148 {0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x17,0xC0,0x10,0x00,0x08,0x00,0x00,0x00},/*"F",38*/
149 {0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x44,0x1C,0x78,0x00,0x40,0x00,0x00},/*"G",39*/
150 {0x10,0x04,0x1F,0xFC,0x10,0x84,0x00,0x80,0x00,0x80,0x10,0x84,0x1F,0xFC,0x10,0x04},/*"H",40*/
151 {0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x00,0x00,0x00,0x00},/*"I",41*/
152 {0x00,0x03,0x00,0x01,0x10,0x01,0x10,0x01,0x1F,0xFE,0x10,0x00,0x10,0x00,0x00,0x00},/*"J",42*/
153 {0x10,0x04,0x1F,0xFC,0x11,0x04,0x03,0x80,0x14,0x64,0x18,0x1C,0x10,0x04,0x00,0x00},/*"K",43*/
154 {0x10,0x04,0x1F,0xFC,0x10,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x0C,0x00,0x00},/*"L",44*/
155 {0x10,0x04,0x1F,0xFC,0x1F,0x00,0x00,0xFC,0x1F,0x00,0x1F,0xFC,0x10,0x04,0x00,0x00},/*"M",45*/
156 {0x10,0x04,0x1F,0xFC,0x0C,0x04,0x03,0x00,0x00,0xE0,0x10,0x18,0x1F,0xFC,0x10,0x00},/*"N",46*/
157 {0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"O",47*/
158 {0x10,0x04,0x1F,0xFC,0x10,0x84,0x10,0x80,0x10,0x80,0x10,0x80,0x0F,0x00,0x00,0x00},/*"P",48*/
159 {0x07,0xF0,0x08,0x18,0x10,0x24,0x10,0x24,0x10,0x1C,0x08,0x0A,0x07,0xF2,0x00,0x00},/*"Q",49*/
160 {0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x11,0xC0,0x11,0x30,0x0E,0x0C,0x00,0x04},/*"R",50*/
161 {0x00,0x00,0x0E,0x1C,0x11,0x04,0x10,0x84,0x10,0x84,0x10,0x44,0x1C,0x38,0x00,0x00},/*"S",51*/
162 {0x18,0x00,0x10,0x00,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x00,0x18,0x00,0x00,0x00},/*"T",52*/
163 {0x10,0x00,0x1F,0xF8,0x10,0x04,0x00,0x04,0x00,0x04,0x10,0x04,0x1F,0xF8,0x10,0x00},/*"U",53*/
164 {0x10,0x00,0x1E,0x00,0x11,0xE0,0x00,0x1C,0x00,0x70,0x13,0x80,0x1C,0x00,0x10,0x00},/*"V",54*/
165 {0x1F,0xC0,0x10,0x3C,0x00,0xE0,0x1F,0x00,0x00,0xE0,0x10,0x3C,0x1F,0xC0,0x00,0x00},/*"W",55*/
166 {0x10,0x04,0x18,0x0C,0x16,0x34,0x01,0xC0,0x01,0xC0,0x16,0x34,0x18,0x0C,0x10,0x04},/*"X",56*/
167 {0x10,0x00,0x1C,0x00,0x13,0x04,0x00,0xFC,0x13,0x04,0x1C,0x00,0x10,0x00,0x00,0x00},/*"Y",57*/
168 {0x08,0x04,0x10,0x1C,0x10,0x64,0x10,0x84,0x13,0x04,0x1C,0x04,0x10,0x18,0x00,0x00},/*"Z",58*/
169 {0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFE,0x40,0x02,0x40,0x02,0x40,0x02,0x00,0x00},/*"[",59*/
170 {0x00,0x00,0x30,0x00,0x0C,0x00,0x03,0x80,0x00,0x60,0x00,0x1C,0x00,0x03,0x00,0x00},/*"",60*/
171 {0x00,0x00,0x40,0x02,0x40,0x02,0x40,0x02,0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00},/*"]",61*/
172 {0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00},/*"^",62*/
173 {0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01},/*"_",63*/
174 {0x00,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
175 {0x00,0x00,0x00,0x98,0x01,0x24,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xFC,0x00,0x04},/*"a",65*/
176 {0x10,0x00,0x1F,0xFC,0x00,0x88,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00},/*"b",66*/
177 {0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x00},/*"c",67*/
178 {0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x11,0x08,0x1F,0xFC,0x00,0x04},/*"d",68*/
179 {0x00,0x00,0x00,0xF8,0x01,0x44,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xC8,0x00,0x00},/*"e",69*/
180 {0x00,0x00,0x01,0x04,0x01,0x04,0x0F,0xFC,0x11,0x04,0x11,0x04,0x11,0x00,0x18,0x00},/*"f",70*/
181 {0x00,0x00,0x00,0xD6,0x01,0x29,0x01,0x29,0x01,0x29,0x01,0xC9,0x01,0x06,0x00,0x00},/*"g",71*/
182 {0x10,0x04,0x1F,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04},/*"h",72*/
183 {0x00,0x00,0x01,0x04,0x19,0x04,0x19,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"i",73*/
184 {0x00,0x00,0x00,0x03,0x00,0x01,0x01,0x01,0x19,0x01,0x19,0xFE,0x00,0x00,0x00,0x00},/*"j",74*/
185 {0x10,0x04,0x1F,0xFC,0x00,0x24,0x00,0x40,0x01,0xB4,0x01,0x0C,0x01,0x04,0x00,0x00},/*"k",75*/
186 {0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"l",76*/
187 {0x01,0x04,0x01,0xFC,0x01,0x04,0x01,0x00,0x01,0xFC,0x01,0x04,0x01,0x00,0x00,0xFC},/*"m",77*/
188 {0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04},/*"n",78*/
189 {0x00,0x00,0x00,0xF8,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0xF8,0x00,0x00},/*"o",79*/
190 {0x01,0x01,0x01,0xFF,0x00,0x85,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00},/*"p",80*/
191 {0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0xFF,0x00,0x01},/*"q",81*/
192 {0x01,0x04,0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x04,0x01,0x00,0x01,0x80,0x00,0x00},/*"r",82*/
193 {0x00,0x00,0x00,0xCC,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x98,0x00,0x00},/*"s",83*/
194 {0x00,0x00,0x01,0x00,0x01,0x00,0x07,0xF8,0x01,0x04,0x01,0x04,0x00,0x00,0x00,0x00},/*"t",84*/
195 {0x01,0x00,0x01,0xF8,0x00,0x04,0x00,0x04,0x00,0x04,0x01,0x08,0x01,0xFC,0x00,0x04},/*"u",85*/
196 {0x01,0x00,0x01,0x80,0x01,0x70,0x00,0x0C,0x00,0x10,0x01,0x60,0x01,0x80,0x01,0x00},/*"v",86*/
197 {0x01,0xF0,0x01,0x0C,0x00,0x30,0x01,0xC0,0x00,0x30,0x01,0x0C,0x01,0xF0,0x01,0x00},/*"w",87*/
198 {0x00,0x00,0x01,0x04,0x01,0x8C,0x00,0x74,0x01,0x70,0x01,0x8C,0x01,0x04,0x00,0x00},/*"x",88*/
199 {0x01,0x01,0x01,0x81,0x01,0x71,0x00,0x0E,0x00,0x18,0x01,0x60,0x01,0x80,0x01,0x00},/*"y",89*/
200 {0x00,0x00,0x01,0x84,0x01,0x0C,0x01,0x34,0x01,0x44,0x01,0x84,0x01,0x0C,0x00,0x00},/*"z",90*/
201 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3E,0xFC,0x40,0x02,0x40,0x02},/*"{",91*/
202 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00},/*"|",92*/
203 {0x00,0x00,0x40,0x02,0x40,0x02,0x3E,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
204 {0x00,0x00,0x60,0x00,0x80,0x00,0x80,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x20,0x00},/*"~",94*/
205 };  
206 //24*24 ASICII字符集点阵
207 const unsigned char asc2_2412[95][36]={      
208 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
209 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x38,0x0F,0xFE,0x38,0x0F,0x80,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
210 {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x06,0x00,0x00,0x0C,0x00,0x00,0x38,0x00,0x00,0x31,0x00,0x00,0x06,0x00,0x00,0x0C,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00},/*""",2*/
211 {0x00,0x00,0x00,0x00,0x61,0x80,0x00,0x67,0xF8,0x07,0xF9,0x80,0x00,0x61,0x80,0x00,0x61,0x80,0x00,0x61,0x80,0x00,0x61,0x80,0x00,0x67,0xF8,0x07,0xF9,0x80,0x00,0x61,0x80,0x00,0x00,0x00},/*"#",3*/
212 {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0xE0,0x03,0xE0,0xF0,0x06,0x30,0x08,0x04,0x18,0x08,0x1F,0xFF,0xFE,0x04,0x0E,0x08,0x07,0x87,0xF0,0x03,0x81,0xE0,0x00,0x00,0x00,0x00,0x00,0x00},/*"$",4*/
213 {0x01,0xF0,0x00,0x06,0x0C,0x00,0x04,0x04,0x08,0x06,0x0C,0x70,0x01,0xF9,0xC0,0x00,0x0E,0x00,0x00,0x3B,0xE0,0x00,0xEC,0x18,0x07,0x08,0x08,0x04,0x0C,0x18,0x00,0x03,0xE0,0x00,0x00,0x00},/*"%",5*/
214 {0x00,0x01,0xE0,0x00,0x07,0xF0,0x03,0xF8,0x18,0x04,0x1C,0x08,0x04,0x17,0x08,0x07,0xE1,0xD0,0x03,0xC0,0xE0,0x00,0x23,0xB0,0x00,0x3C,0x08,0x00,0x20,0x08,0x00,0x00,0x10,0x00,0x00,0x00},/*"&",6*/
215 {0x00,0x00,0x00,0x01,0x00,0x00,0x31,0x00,0x00,0x32,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"‘",7*/
216 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x01,0xFF,0xC0,0x07,0x80,0xF0,0x0C,0x00,0x18,0x10,0x00,0x04,0x20,0x00,0x02,0x00,0x00,0x00},/*"(",8*/
217 {0x00,0x00,0x00,0x20,0x00,0x02,0x10,0x00,0x04,0x0C,0x00,0x18,0x07,0x80,0xF0,0x01,0xFF,0xC0,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*")",9*/
218 {0x00,0x00,0x00,0x00,0x42,0x00,0x00,0x66,0x00,0x00,0x66,0x00,0x00,0x3C,0x00,0x00,0x18,0x00,0x03,0xFF,0xC0,0x00,0x18,0x00,0x00,0x3C,0x00,0x00,0x66,0x00,0x00,0x66,0x00,0x00,0x42,0x00},/*"*",10*/
219 {0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x01,0xFF,0xC0,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00},/*"+",11*/
220 {0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x31,0x00,0x00,0x32,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
221 {0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00},/*"-",13*/
222 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
223 {0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x1C,0x00,0x00,0x70,0x00,0x01,0x80,0x00,0x0E,0x00,0x00,0x38,0x00,0x00,0xC0,0x00,0x07,0x00,0x00,0x1C,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00},/*"/",15*/
224 {0x00,0x00,0x00,0x00,0x7F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x06,0x00,0x18,0x04,0x00,0x08,0x04,0x00,0x08,0x06,0x00,0x18,0x03,0x80,0x70,0x01,0xFF,0xE0,0x00,0x7F,0x80,0x00,0x00,0x00},/*"0",16*/
225 {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x08,0x01,0x00,0x08,0x01,0x00,0x08,0x03,0xFF,0xF8,0x07,0xFF,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},/*"1",17*/
226 {0x00,0x00,0x00,0x01,0xC0,0x38,0x02,0xC0,0x58,0x04,0x00,0x98,0x04,0x01,0x18,0x04,0x02,0x18,0x04,0x04,0x18,0x06,0x1C,0x18,0x03,0xF8,0x18,0x01,0xE0,0xF8,0x00,0x00,0x00,0x00,0x00,0x00},/*"2",18*/
227 {0x00,0x00,0x00,0x01,0xC0,0xE0,0x03,0xC0,0xF0,0x04,0x00,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x06,0x18,0x08,0x03,0xF4,0x18,0x01,0xE7,0xF0,0x00,0x01,0xE0,0x00,0x00,0x00,0x00,0x00,0x00},/*"3",19*/
228 {0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x0D,0x00,0x00,0x11,0x00,0x00,0x61,0x00,0x00,0x81,0x08,0x03,0x01,0x08,0x07,0xFF,0xF8,0x0F,0xFF,0xF8,0x00,0x01,0x08,0x00,0x01,0x08,0x00,0x00,0x00},/*"4",20*/
229 {0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xFC,0xD0,0x06,0x08,0x08,0x06,0x10,0x08,0x06,0x10,0x08,0x06,0x10,0x08,0x06,0x18,0x38,0x06,0x0F,0xF0,0x06,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00},/*"5",21*/
230 {0x00,0x00,0x00,0x00,0x3F,0x80,0x01,0xFF,0xE0,0x03,0x84,0x30,0x02,0x08,0x18,0x04,0x10,0x08,0x04,0x10,0x08,0x04,0x10,0x08,0x07,0x18,0x10,0x03,0x0F,0xF0,0x00,0x07,0xC0,0x00,0x00,0x00},/*"6",22*/
231 {0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x00,0x07,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0xF8,0x06,0x07,0xF8,0x06,0x18,0x00,0x06,0xE0,0x00,0x07,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00},/*"7",23*/
232 {0x00,0x00,0x00,0x01,0xE1,0xE0,0x03,0xF7,0xF0,0x06,0x34,0x10,0x04,0x18,0x08,0x04,0x18,0x08,0x04,0x0C,0x08,0x04,0x0C,0x08,0x06,0x16,0x18,0x03,0xF3,0xF0,0x01,0xC1,0xE0,0x00,0x00,0x00},/*"8",24*/
233 {0x00,0x00,0x00,0x00,0xF8,0x00,0x03,0xFC,0x30,0x03,0x06,0x38,0x04,0x02,0x08,0x04,0x02,0x08,0x04,0x02,0x08,0x04,0x04,0x10,0x03,0x08,0xF0,0x01,0xFF,0xC0,0x00,0x7F,0x00,0x00,0x00,0x00},/*"9",25*/
234 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x38,0x00,0x70,0x38,0x00,0x70,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
235 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x1A,0x00,0x30,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
236 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x14,0x00,0x00,0x22,0x00,0x00,0x41,0x00,0x00,0x80,0x80,0x01,0x00,0x40,0x02,0x00,0x20,0x04,0x00,0x10,0x08,0x00,0x08,0x00,0x00,0x00},/*"<",28*/
237 {0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x00,0x00},/*"=",29*/
238 {0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x04,0x00,0x10,0x02,0x00,0x20,0x01,0x00,0x40,0x00,0x80,0x80,0x00,0x41,0x00,0x00,0x22,0x00,0x00,0x14,0x00,0x00,0x08,0x00,0x00,0x00,0x00},/*">",30*/
239 {0x00,0x00,0x00,0x03,0xC0,0x00,0x04,0xC0,0x00,0x04,0x00,0x00,0x08,0x00,0x38,0x08,0x0F,0x38,0x08,0x08,0x38,0x08,0x10,0x00,0x0C,0x30,0x00,0x07,0xE0,0x00,0x03,0xC0,0x00,0x00,0x00,0x00},/*"?",31*/
240 {0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0xFF,0xE0,0x03,0x80,0x70,0x02,0x0F,0x10,0x06,0x70,0x88,0x04,0xC0,0x88,0x04,0x83,0x08,0x04,0x7F,0x88,0x02,0xC0,0x90,0x03,0x01,0x20,0x00,0xFE,0x40},/*"@",32*/
241 {0x00,0x00,0x08,0x00,0x00,0x18,0x00,0x01,0xF8,0x00,0x3E,0x08,0x01,0xC2,0x00,0x07,0x02,0x00,0x07,0xE2,0x00,0x00,0xFE,0x00,0x00,0x1F,0xC8,0x00,0x01,0xF8,0x00,0x00,0x38,0x00,0x00,0x08},/*"A",33*/
242 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x06,0x18,0x08,0x03,0xF4,0x18,0x01,0xE7,0xF0,0x00,0x01,0xE0,0x00,0x00,0x00},/*"B",34*/
243 {0x00,0x00,0x00,0x00,0x3F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x02,0x00,0x18,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x10,0x06,0x00,0x20,0x07,0x80,0xC0,0x00,0x00,0x00},/*"C",35*/
244 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x18,0x02,0x00,0x10,0x03,0x80,0x70,0x01,0xFF,0xE0,0x00,0x7F,0x80,0x00,0x00,0x00},/*"D",36*/
245 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x3E,0x08,0x04,0x00,0x08,0x06,0x00,0x18,0x01,0x00,0x60,0x00,0x00,0x00},/*"E",37*/
246 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x04,0x08,0x00,0x04,0x08,0x00,0x04,0x08,0x00,0x04,0x3E,0x00,0x06,0x00,0x00,0x06,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00},/*"F",38*/
247 {0x00,0x00,0x00,0x00,0x3F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x06,0x00,0x18,0x04,0x00,0x08,0x04,0x02,0x08,0x04,0x02,0x08,0x02,0x03,0xF0,0x07,0x83,0xF0,0x00,0x02,0x00,0x00,0x02,0x00},/*"G",39*/
248 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x04,0x08,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08},/*"H",40*/
249 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},/*"I",41*/
250 {0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x07,0x00,0x00,0x01,0x04,0x00,0x01,0x04,0x00,0x01,0x04,0x00,0x03,0x07,0xFF,0xFE,0x07,0xFF,0xFC,0x04,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00},/*"J",42*/
251 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x0C,0x08,0x00,0x18,0x00,0x00,0x3E,0x00,0x04,0xC7,0x80,0x05,0x03,0xC8,0x06,0x00,0xF8,0x04,0x00,0x38,0x04,0x00,0x18,0x00,0x00,0x08},/*"K",43*/
252 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x18,0x00,0x00,0x60,0x00,0x00,0x00},/*"L",44*/
253 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0x80,0x08,0x07,0xFC,0x00,0x00,0x7F,0xC0,0x00,0x03,0xF8,0x00,0x07,0xC0,0x00,0x78,0x00,0x07,0x80,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08},/*"M",45*/
254 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0x00,0x08,0x03,0xC0,0x00,0x00,0xE0,0x00,0x00,0x38,0x00,0x00,0x1E,0x00,0x00,0x07,0x00,0x00,0x01,0xC0,0x04,0x00,0xF0,0x07,0xFF,0xF8,0x04,0x00,0x00},/*"N",46*/
255 {0x00,0x00,0x00,0x00,0x7F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x06,0x00,0x18,0x04,0x00,0x08,0x04,0x00,0x08,0x06,0x00,0x18,0x03,0x00,0x30,0x01,0xFF,0xE0,0x00,0x7F,0x80,0x00,0x00,0x00},/*"O",47*/
256 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x04,0x08,0x04,0x04,0x00,0x04,0x04,0x00,0x04,0x04,0x00,0x04,0x04,0x00,0x06,0x0C,0x00,0x03,0xF8,0x00,0x01,0xF0,0x00,0x00,0x00,0x00},/*"P",48*/
257 {0x00,0x00,0x00,0x00,0x7F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x06,0x00,0x88,0x04,0x00,0x88,0x04,0x00,0xC8,0x06,0x00,0x3C,0x03,0x00,0x3E,0x01,0xFF,0xE6,0x00,0x7F,0x84,0x00,0x00,0x00},/*"Q",49*/
258 {0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x04,0x08,0x00,0x04,0x0C,0x00,0x04,0x0F,0x00,0x04,0x0B,0xC0,0x06,0x10,0xF0,0x03,0xF0,0x38,0x01,0xE0,0x08,0x00,0x00,0x08},/*"R",50*/
259 {0x00,0x00,0x00,0x01,0xE0,0xF8,0x03,0xF0,0x30,0x06,0x30,0x10,0x04,0x18,0x08,0x04,0x18,0x08,0x04,0x0C,0x08,0x04,0x0C,0x08,0x02,0x06,0x18,0x02,0x07,0xF0,0x07,0x81,0xE0,0x00,0x00,0x00},/*"S",51*/
260 {0x01,0x80,0x00,0x06,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08,0x04,0x00,0x00,0x04,0x00,0x00,0x06,0x00,0x00,0x01,0x80,0x00},/*"T",52*/
261 {0x04,0x00,0x00,0x07,0xFF,0xE0,0x07,0xFF,0xF0,0x04,0x00,0x18,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x04,0x00,0x10,0x07,0xFF,0xE0,0x04,0x00,0x00},/*"U",53*/
262 {0x04,0x00,0x00,0x06,0x00,0x00,0x07,0xE0,0x00,0x07,0xFE,0x00,0x04,0x1F,0xE0,0x00,0x01,0xF8,0x00,0x00,0x38,0x00,0x01,0xE0,0x04,0x3E,0x00,0x07,0xC0,0x00,0x06,0x00,0x00,0x04,0x00,0x00},/*"V",54*/
263 {0x04,0x00,0x00,0x07,0xE0,0x00,0x07,0xFF,0xC0,0x04,0x1F,0xF8,0x00,0x07,0xC0,0x07,0xF8,0x00,0x07,0xFF,0x80,0x04,0x3F,0xF8,0x00,0x07,0xC0,0x04,0xF8,0x00,0x07,0x00,0x00,0x04,0x00,0x00},/*"W",55*/
264 {0x00,0x00,0x00,0x04,0x00,0x08,0x06,0x00,0x18,0x07,0xC0,0x78,0x05,0xF1,0xC8,0x00,0x3E,0x00,0x00,0x1F,0x80,0x04,0x63,0xE8,0x07,0x80,0xF8,0x06,0x00,0x18,0x04,0x00,0x08,0x00,0x00,0x00},/*"X",56*/
265 {0x04,0x00,0x00,0x06,0x00,0x00,0x07,0x80,0x00,0x07,0xE0,0x08,0x04,0x7C,0x08,0x00,0x1F,0xF8,0x00,0x07,0xF8,0x00,0x18,0x08,0x04,0xE0,0x08,0x07,0x00,0x00,0x06,0x00,0x00,0x04,0x00,0x00},/*"Y",57*/
266 {0x00,0x00,0x00,0x01,0x00,0x08,0x06,0x00,0x38,0x04,0x00,0xF8,0x04,0x03,0xE8,0x04,0x0F,0x08,0x04,0x7C,0x08,0x05,0xF0,0x08,0x07,0xC0,0x08,0x07,0x00,0x18,0x04,0x00,0x60,0x00,0x00,0x00},/*"Z",58*/
267 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFE,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x00,0x00,0x00},/*"[",59*/
268 {0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x07,0x00,0x00,0x00,0xC0,0x00,0x00,0x38,0x00,0x00,0x06,0x00,0x00,0x01,0xC0,0x00,0x00,0x30,0x00,0x00,0x0E,0x00,0x00,0x01,0x00,0x00,0x00},/*"",60*/
269 {0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x3F,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"]",61*/
270 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x10,0x00,0x00,0x30,0x00,0x00,0x20,0x00,0x00,0x30,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
271 {0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01},/*"_",63*/
272 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
273 {0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x19,0xF8,0x00,0x1B,0x18,0x00,0x22,0x08,0x00,0x26,0x08,0x00,0x24,0x08,0x00,0x24,0x10,0x00,0x3F,0xF8,0x00,0x1F,0xF8,0x00,0x00,0x08,0x00,0x00,0x18},/*"a",65*/
274 {0x00,0x00,0x00,0x04,0x00,0x00,0x07,0xFF,0xF8,0x0F,0xFF,0xF0,0x00,0x18,0x18,0x00,0x10,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x30,0x18,0x00,0x1F,0xF0,0x00,0x0F,0xC0,0x00,0x00,0x00},/*"b",66*/
275 {0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x1F,0xF0,0x00,0x18,0x30,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x3C,0x08,0x00,0x1C,0x10,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00},/*"c",67*/
276 {0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x1F,0xF0,0x00,0x38,0x18,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x04,0x10,0x10,0x07,0xFF,0xF8,0x0F,0xFF,0xF0,0x00,0x00,0x10,0x00,0x00,0x00},/*"d",68*/
277 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x1F,0xF0,0x00,0x12,0x30,0x00,0x22,0x18,0x00,0x22,0x08,0x00,0x22,0x08,0x00,0x32,0x08,0x00,0x1E,0x10,0x00,0x0E,0x20,0x00,0x00,0x00},/*"e",69*/
278 {0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x08,0x00,0x20,0x08,0x01,0xFF,0xF8,0x03,0xFF,0xF8,0x06,0x20,0x08,0x04,0x20,0x08,0x04,0x20,0x08,0x07,0x20,0x00,0x03,0x00,0x00,0x00,0x00,0x00},/*"f",70*/
279 {0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x0E,0x6E,0x00,0x1F,0xF3,0x00,0x31,0xB1,0x00,0x20,0xB1,0x00,0x20,0xB1,0x00,0x31,0x91,0x00,0x1F,0x13,0x00,0x2E,0x1E,0x00,0x20,0x0E,0x00,0x30,0x00},/*"g",71*/
280 {0x00,0x00,0x00,0x04,0x00,0x08,0x07,0xFF,0xF8,0x0F,0xFF,0xF8,0x00,0x10,0x08,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x1F,0xF8,0x00,0x00,0x08,0x00,0x00,0x00},/*"h",72*/
281 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x06,0x3F,0xF8,0x06,0x3F,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},/*"i",73*/
282 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x20,0x01,0x00,0x20,0x01,0x00,0x20,0x03,0x06,0x3F,0xFE,0x06,0x3F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"j",74*/
283 {0x00,0x00,0x00,0x04,0x00,0x08,0x07,0xFF,0xF8,0x0F,0xFF,0xF8,0x00,0x01,0x88,0x00,0x03,0x00,0x00,0x2F,0xC0,0x00,0x38,0xF8,0x00,0x20,0x38,0x00,0x20,0x08,0x00,0x00,0x08,0x00,0x00,0x00},/*"k",75*/
284 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x07,0xFF,0xF8,0x0F,0xFF,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},/*"l",76*/
285 {0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x10,0x08,0x00,0x20,0x00,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x10,0x08,0x00,0x20,0x00,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x00,0x08},/*"m",77*/
286 {0x00,0x00,0x00,0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x10,0x08,0x00,0x10,0x00,0x00,0x20,0x00,0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x1F,0xF8,0x00,0x00,0x08,0x00,0x00,0x00},/*"n",78*/
287 {0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x0F,0xF0,0x00,0x18,0x30,0x00,0x30,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x30,0x08,0x00,0x18,0x30,0x00,0x0F,0xF0,0x00,0x07,0xC0,0x00,0x00,0x00},/*"o",79*/
288 {0x00,0x00,0x00,0x00,0x20,0x01,0x00,0x3F,0xFF,0x00,0x3F,0xFF,0x00,0x10,0x11,0x00,0x20,0x09,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x30,0x38,0x00,0x1F,0xF0,0x00,0x0F,0xC0,0x00,0x00,0x00},/*"p",80*/
289 {0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x1F,0xF0,0x00,0x38,0x18,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x09,0x00,0x10,0x11,0x00,0x1F,0xFF,0x00,0x3F,0xFF,0x00,0x00,0x01,0x00,0x00,0x00},/*"q",81*/
290 {0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x08,0x08,0x00,0x10,0x08,0x00,0x20,0x08,0x00,0x20,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x00,0x00},/*"r",82*/
291 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x78,0x00,0x1E,0x18,0x00,0x33,0x08,0x00,0x23,0x08,0x00,0x21,0x08,0x00,0x21,0x88,0x00,0x21,0x98,0x00,0x30,0xF0,0x00,0x38,0x60,0x00,0x00,0x00},/*"s",83*/
292 {0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0xFF,0xF0,0x03,0xFF,0xF8,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00},/*"t",84*/
293 {0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x3F,0xF0,0x00,0x7F,0xF8,0x00,0x00,0x18,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x20,0x10,0x00,0x3F,0xF8,0x00,0x7F,0xF0,0x00,0x00,0x10,0x00,0x00,0x00},/*"u",85*/
294 {0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x30,0x00,0x00,0x3C,0x00,0x00,0x3F,0x80,0x00,0x23,0xF0,0x00,0x00,0x78,0x00,0x00,0x70,0x00,0x23,0x80,0x00,0x3C,0x00,0x00,0x30,0x00,0x00,0x20,0x00},/*"v",86*/
295 {0x00,0x20,0x00,0x00,0x3C,0x00,0x00,0x3F,0xE0,0x00,0x23,0xF8,0x00,0x00,0xE0,0x00,0x27,0x00,0x00,0x3E,0x00,0x00,0x3F,0xE0,0x00,0x21,0xF8,0x00,0x01,0xE0,0x00,0x3E,0x00,0x00,0x20,0x00},/*"w",87*/
296 {0x00,0x00,0x00,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x38,0x38,0x00,0x3E,0x68,0x00,0x27,0x80,0x00,0x03,0xC8,0x00,0x2C,0xF8,0x00,0x38,0x38,0x00,0x20,0x18,0x00,0x20,0x08,0x00,0x00,0x00},/*"x",88*/
297 {0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x30,0x03,0x00,0x3C,0x01,0x00,0x3F,0x83,0x00,0x23,0xEC,0x00,0x00,0x70,0x00,0x23,0x80,0x00,0x3C,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x00,0x00},/*"y",89*/
298 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x08,0x00,0x20,0x38,0x00,0x20,0xF8,0x00,0x23,0xE8,0x00,0x2F,0x88,0x00,0x3E,0x08,0x00,0x38,0x08,0x00,0x20,0x18,0x00,0x00,0x70,0x00,0x00,0x00},/*"z",90*/
299 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x14,0x00,0x1F,0xF7,0xFC,0x30,0x00,0x06,0x20,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00},/*"{",91*/
300 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"|",92*/
301 {0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x02,0x30,0x00,0x06,0x1F,0xF7,0xFC,0x00,0x14,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
302 {0x00,0x00,0x00,0x18,0x00,0x00,0x60,0x00,0x00,0x40,0x00,0x00,0x40,0x00,0x00,0x20,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00,0x0C,0x00,0x00,0x10,0x00,0x00},/*"~",94*/
303 };      
304 #endif

 

以上是关于STM32-TFTLCD的主要内容,如果未能解决你的问题,请参考以下文章

STM32单片机算法指令?

STM32F10x 串口使用DMA

如何利用stm32cubeide的原有工程改写代码

stm32控制机械臂抓取的代码

STM32-关于Proteus 仿真无法运行STM32CubeMX自动生成的代码

如何快速读懂stm32代码