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

📄 ks0108.lst

📁 LCD12864的嵌入式C程序 很有参考价值!
💻 LST
📖 第 1 页 / 共 3 页
字号:
 418   3                              OutSD(bmp[i]);
 419   3                      }
 420   2      
 421   2                      else                                                            /*The First ks0108*/
 422   2                      {
 423   3                              OutFI(x|0x40);
 424   3                              OutFI(layer|0xb8);
 425   3                              OutFD(bmp[i]);
 426   3      
 427   3                              OutFI(x|0x40);
C51 COMPILER V7.50   KS0108                                                                11/23/2005 17:17:07 PAGE 8   

 428   3                              OutFI((layer|0xb8)+1);  
 429   3                              i++;                                                    
 430   3                              OutFD(bmp[i]);
 431   3      
 432   3                      }
 433   2              i++;
 434   2              }
 435   1      
 436   1      }
 437          /*------------------------------------------------------------------------------
 438          --
 439          Display Chinese ideograph;x_add is the x address;It has 4 layers,0,1,2,3;
 440          Width is the Chinese ideograph width;bmp is the table's name. 
 441          --------------------------------------------------------------------------------
 442          -*/
 443          void DrawBmp_f(uchar x_add,uchar layer,uchar width,uchar *bmp)
 444          { 
 445   1              unsigned char x;
 446   1              unsigned int i=0;
 447   1              for(x=x_add;x<x_add+width;x++)
 448   1          {
 449   2              if (x>127)
 450   2              {
 451   3                              OutTI((x-128)|0x40);
 452   3                              OutTI(layer|0xb8);
 453   3                              OutTD(~bmp[i]);
 454   3      
 455   3                              OutTI((x-128)|0x40);
 456   3                              OutTI((layer|0xb8)+1);  
 457   3                              i++;
 458   3                              OutTD(~bmp[i]);
 459   3                      }
 460   2              else if (x>63)                                   
 461   2              {
 462   3                              OutSI((x-64)|0x40);
 463   3                              OutSI(layer|0xb8);
 464   3                              OutSD(~bmp[i]);
 465   3                      
 466   3                              OutSI((x-64)|0x40);
 467   3                              OutSI((layer|0xb8)+1);  
 468   3                              i++;
 469   3                              OutSD(~bmp[i]);
 470   3                      }
 471   2      
 472   2                      else 
 473   2                      {
 474   3                              OutFI(x|0x40);
 475   3                              OutFI(layer|0xb8);
 476   3                              OutFD(~bmp[i]);
 477   3      
 478   3                              OutFI(x|0x40);
 479   3                              OutFI((layer|0xb8)+1);  
 480   3                              i++;
 481   3                              OutFD(~bmp[i]);
 482   3                      }
 483   2              i++;
 484   2      
 485   2              }
 486   1      }
 487          
 488          /*------------------------------------------------------------------------------
 489          --
C51 COMPILER V7.50   KS0108                                                                11/23/2005 17:17:07 PAGE 9   

 490          Display indention; x_add is the x address;It has 4 layers,0,1,2,3;
 491          Width is the Chinese ideograph width
 492          --------------------------------------------------------------------------------
 493          -*/
 494          void _DrawBmp_black(uchar x_add,uchar layer,uchar width)
 495          { 
 496   1              unsigned char x;
 497   1          for(x=x_add;x<x_add+width;x++)
 498   1          {
 499   2              if (x>127)
 500   2              {
 501   3                              OutTI((x-128)|0x40);
 502   3                              OutTI(layer|0xb8);
 503   3                              OutTD(0xff);
 504   3      
 505   3                              OutTI((x-128)|0x40);
 506   3                              OutTI((layer|0xb8)+1);  
 507   3                              OutTD(0xff);
 508   3      
 509   3                      }
 510   2              else if (x>63)                                   
 511   2              {
 512   3                              OutSI((x-64)|0x40);
 513   3                              OutSI(layer|0xb8);
 514   3                              OutSD(0xff);
 515   3                      
 516   3                              OutSI((x-64)|0x40);
 517   3                              OutSI((layer|0xb8)+1);
 518   3                              OutSD(0xff);
 519   3                      }
 520   2      
 521   2                      else 
 522   2                      {
 523   3                              OutFI(x|0x40);
 524   3                              OutFI(layer|0xb8);
 525   3                              OutFD(0xff);
 526   3      
 527   3                              OutFI(x|0x40);
 528   3                              OutFI((layer|0xb8)+1);  
 529   3                              OutFD(0xff);
 530   3                      }
 531   2              }
 532   1      }
 533          /*------------------------------------------------------------------------------
 534          --
 535          Display the line
 536          display_data_graph is the display graph data
 537          --------------------------------------------------------------------------------
 538          -*/
 539          void _DrawBmp_line(uchar x_add,uchar layer,uchar width,uchar display_data_graph)
 540          { 
 541   1              unsigned char x;
 542   1              unsigned int i=0;
 543   1              
 544   1          for(x=x_add;x<x_add+width;x++)
 545   1          {
 546   2              if (x>127)
 547   2              {
 548   3                              OutTI((x-128)|0x40);
 549   3                              OutTI(layer|0xb8);      
 550   3                              OutTD(display_data_graph);
 551   3                      }
C51 COMPILER V7.50   KS0108                                                                11/23/2005 17:17:07 PAGE 10  

 552   2              else if (x>63)                                   
 553   2              {
 554   3                              OutSI((x-64)|0x40);
 555   3                              OutSI(layer|0xb8);      
 556   3                              OutSD(display_data_graph);
 557   3                      }
 558   2      
 559   2                      else 
 560   2                      {
 561   3                              OutFI(x|0x40);
 562   3                              OutFI(layer|0xb8);      
 563   3                              OutFD(display_data_graph);
 564   3                      }
 565   2              i++;
 566   2      
 567   2              }
 568   1      }
 569          
 570          /*------------------------------------------------------------------------------
 571          --
 572          Display the column
 573          display_data_graph is the display graph data
 574          --------------------------------------------------------------------------------
 575          -*/
 576          void _DrawBmp_column(uchar x,uchar width)
 577          { 
 578   1              unsigned int i=0;
 579   1      
 580   1              if (x>127)
 581   1              {
 582   2                      for(i=0;i<width;i++)
 583   2                      {
 584   3                              OutTI((x-128)|0x40);
 585   3                              OutTI(i|0xb8);  
 586   3                              OutTD(0xff);
 587   3                      }
 588   2              }
 589   1      
 590   1              else if (x>63)                                   
 591   1          {
 592   2                      for(i=0;i<width;i++)
 593   2                      {
 594   3                              OutSI((x-64)|0x40);
 595   3                              OutSI(i|0xb8);  
 596   3                              OutSD(0xff);
 597   3                      }
 598   2              }
 599   1      
 600   1              else 
 601   1              {
 602   2                      for(i=0;i<width;i++)
 603   2                      {
 604   3                              OutFI(x|0x40);
 605   3                              OutFI(i|0xb8);  
 606   3                              OutFD(0xff);
 607   3                      }
 608   2              }
 609   1      }
 610          
 611          
 612          

C51 COMPILER V7.50   KS0108                                                                11/23/2005 17:17:07 PAGE 11  


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   2181    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----      33
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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