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

📄 yjsy.lst

📁 LCD1602.rar
💻 LST
📖 第 1 页 / 共 4 页
字号:
 384          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 385          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 386          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 387          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 388          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 389          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 390          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 391          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
 392          };
 393          
 394          unsigned char code pic4[]={
 395          /*--  调入了一幅图像:F:\我的文档\My Pictures\`1.bmp  --*/
 396          /*--  宽度x高度=128x64  --*/
 397          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x07,
 398          0xFC,0xC0,0x80,0x00,0x00,0x00,0x00,0x07,0x06,0x00,0x07,0x03,0x02,0x01,0x00,0x00,
 399          0x00,0x00,0x3F,0x3F,0x5F,0xBF,0xBF,0xF7,0xFB,0xFB,0xDD,0x4E,0x09,0x08,0x00,0x00,
 400          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 401          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 402          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 403          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xC0,0x80,
 404          0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 405          0x00,0x00,0x00,0x18,0x20,0x80,0x00,0x38,0xE0,0x80,0x80,0xFC,0xFF,0x7E,0x00,0x00,
 406          0x01,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 407          0x00,0xC0,0x64,0x76,0x2F,0x3F,0x7F,0xCB,0x09,0x01,0x01,0x01,0x39,0x78,0x3A,0x38,
 408          0x78,0xF0,0xF0,0xE4,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x60,0xF0,0xD0,0x90,0x18,
 409          0x10,0x88,0x18,0x08,0x0C,0xCC,0x8C,0xCC,0x04,0x06,0x06,0x06,0x0C,0x5C,0x38,0xF8,
 410          0xD8,0x1C,0x5C,0xA4,0xCC,0x58,0x38,0x38,0xF8,0x98,0xB0,0x30,0xF0,0xE0,0xE0,0xE0,
 411          0xE0,0xE0,0xE8,0xE8,0x90,0x60,0xE0,0xF0,0x1C,0x06,0x23,0x21,0x70,0x00,0x7F,0xFF,
 412          0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 413          0x00,0x18,0x60,0xC0,0x80,0x00,0x03,0x06,0x1F,0x7F,0x7F,0x1F,0x00,0x00,0x00,0x00,
 414          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
 415          0x03,0x05,0x04,0x14,0x9E,0x9F,0xDF,0xCF,0xEF,0xEF,0x7F,0x7D,0x1D,0x1D,0x0D,0x0D,
 416          0x0D,0x05,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x7D,0x3F,
 417          0x3E,0x33,0x20,0x00,0x3C,0xC0,0xC1,0x1B,0x0C,0x0C,0x2C,0x28,0x18,0x18,0x38,0x77,
 418          0xFF,0xDE,0x40,0x40,0x41,0x42,0x44,0x04,0x07,0x01,0x81,0x03,0x02,0x07,0x7F,0xFF,
 419          0xFF,0xFF,0xFF,0xFF,0xFF,0xF2,0xE3,0xF7,0xFE,0xFC,0xFC,0xF8,0xF8,0xF0,0xF0,0xFF,
 420          0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 421          0x00,0x00,0x00,0x01,0x07,0x0A,0x34,0x4D,0x9C,0x30,0x20,0x00,0x00,0x00,0x00,0x00,
 422          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0x24,
 423          0x12,0x02,0x03,0x07,0x03,0xFB,0xFD,0x01,0x00,0x00,0x00,0xFC,0xF8,0xF8,0xF8,0xF8,
 424          0xF8,0xF8,0xF0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x00,0x62,0x30,0x30,
 425          0x38,0xE0,0x04,0x00,0x04,0x01,0x01,0x42,0xC4,0x88,0x88,0x48,0x30,0x00,0x03,0x03,
 426          0x00,0xC3,0xFF,0xFE,0x42,0x12,0x02,0x02,0x00,0x80,0xC0,0x24,0x04,0x30,0x09,0xFF,
 427          0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
C51 COMPILER V8.02   YJSY                                                                  05/23/2006 16:10:09 PAGE 8   

 428          0xFF,0xFF,0x9F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 429          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x06,0x0C,0x78,0x80,0x00,0x00,
 430          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x1D,0x31,
 431          0x31,0x21,0x61,0x42,0x42,0xC7,0xCF,0x9F,0x18,0x00,0x00,0x01,0x03,0x01,0x01,0x01,
 432          0x07,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0xC0,0xE0,0xF8,0x1F,0x22,0x42,0x46,0x2C,
 433          0x19,0x07,0x3E,0xF8,0x10,0x22,0x26,0x1C,0x00,0x0C,0x05,0x43,0x80,0xC0,0xE0,0x78,
 434          0x1E,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0xC1,0xFC,0xFF,
 435          0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xDF,0xF7,0xDF,0xFF,0xFF,0xFF,
 436          0xFF,0xFF,0xFF,0xFE,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 437          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xC0,
 438          0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,
 439          0xF0,0xF0,0xF0,0xF6,0xFE,0xFE,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0x3F,0x3C,0x3C,0x3C,
 440          0x3C,0x0C,0x04,0x04,0x04,0x00,0x03,0x6F,0x0F,0x07,0x06,0x0C,0x18,0x10,0x20,0x22,
 441          0xA0,0x60,0x40,0xC0,0xC1,0xC3,0x60,0x20,0x30,0x18,0x0C,0x0E,0x0F,0x0B,0x08,0x18,
 442          0x18,0x10,0x30,0x20,0x60,0x40,0x80,0x80,0x00,0x80,0xE0,0xF8,0xFE,0xFF,0xFF,0xFF,
 443          0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x03,0x00,0x3F,0x05,0x0F,0x27,0xFD,0xFF,0xFF,
 444          0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 445          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x7C,0x1F,
 446          0x00,0x0F,0x0F,0x0C,0x30,0xE0,0xC1,0x02,0x3C,0xB8,0x30,0x60,0xC0,0x80,0x66,0xEC,
 447          0x38,0x7B,0x17,0x2F,0x7F,0xE3,0x83,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 448          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 449          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 450          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x01,0x00,0x00,0x00,0x01,0x03,0x01,
 451          0x01,0x03,0x03,0x0F,0x1F,0x1F,0x1F,0x3C,0x60,0xC0,0x80,0x80,0x80,0xFF,0xFF,0xFF,
 452          0xFF,0xFF,0xFF,0xFF,0x7F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 453          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,0x00,
 454          0x00,0x00,0x00,0x06,0x08,0x10,0x01,0x00,0x00,0x01,0x06,0x08,0x10,0x00,0x01,0x03,
 455          0x03,0x04,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 456          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 457          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 458          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 459          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x03,0x03,
 460          0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
 461          
 462          };
 463          
 464          unsigned char code pic5[]={
 465          /*--  调入了一幅图像:F:\我的文档\e-橙红.bmp  --*/
 466          /*--  宽度x高度=64x64  --*/
 467          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xE0,
 468          0xE0,0x70,0x38,0x38,0x18,0x1C,0x1C,0x0C,0x0E,0x0E,0x0E,0x07,0x07,0x07,0x07,0xC7,
 469          0xC7,0xC7,0x07,0x07,0x07,0x0E,0x0E,0x0E,0x0C,0x1C,0x1C,0x38,0x38,0x70,0x70,0xE0,
 470          0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 471          0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xF0,0x78,0x3C,0x1E,0x0F,0x07,0x03,0x01,0x00,
 472          0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
 473          0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,
 474          0x01,0x01,0x03,0x07,0x0F,0x1E,0x3C,0xF0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,
 475          0x00,0x00,0xE0,0xFC,0x7E,0x0F,0x03,0x01,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
 476          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 477          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 478          0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x01,0x07,0x1F,0xFC,0xF8,0xE0,0x00,0x00,
 479          0xF8,0xFE,0xFF,0x07,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 480          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
 481          0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 482          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x0F,0xFF,0xFF,0xF8,
 483          0x1F,0x7F,0xFF,0xE0,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 484          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
 485          0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 486          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0xE0,0xFF,0xFF,0x3F,
 487          0x00,0x00,0x03,0x1F,0x7E,0xF8,0xE0,0x80,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x00,
 488          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 489          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
C51 COMPILER V8.02   YJSY                                                                  05/23/2006 16:10:09 PAGE 9   

 490          0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0xC0,0xF0,0xFC,0x3F,0x0F,0x03,0x00,0x00,
 491          0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x1F,0x3C,0x78,0xF0,0xE0,0xC0,0x80,0x80,
 492          0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,
 493          0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,
 494          0x80,0xC0,0xE0,0xE0,0x70,0x3C,0x1E,0x0F,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
 495          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,
 496          0x07,0x0E,0x0E,0x1C,0x1C,0x18,0x38,0x38,0x38,0x30,0x70,0x70,0x70,0x70,0x70,0x71,
 497          0x71,0x71,0x70,0x70,0x70,0x70,0x30,0x38,0x38,0x18,0x1C,0x1C,0x0E,0x0E,0x07,0x07,
 498          0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
 499          };
 500          /*------------------延时子程序-----------------------------*/
 501          void delay(unsigned int t)
 502          {
 503   1      unsigned int i,j;
 504   1      for(i=0;i<t;i++)
 505   1      for(j=0;j<10;j++)
 506   1      ;
 507   1      }
 508          
 509          /*------------------写命令到LCD------------------------------*/
 510          void write_com(unsigned char cmdcode)
 511          {
 512   1      
 513   1      Di=0;
 514   1      RW=0;
 515   1      
 516   1      Lcd_Bus=cmdcode;
 517   1      delay(0);
 518   1      Enable=1;
 519   1      delay(0);
 520   1      Enable=0;
 521   1      }
 522          
 523          /*-------------------写数据到LCD----------------------------*/
 524          void write_data(unsigned char Dispdata)
 525          {
 526   1      
 527   1      Di=1;
 528   1      RW=0;
 529   1      
 530   1      Lcd_Bus=Dispdata;
 531   1      delay(0);
 532   1      Enable=1;
 533   1      delay(0);
 534   1      Enable=0;
 535   1      }
 536          
 537          /*------------------------读LCD数据----------------------------*/
 538          unsigned char read_data()
 539          {
 540   1      unsigned char tmpin;
 541   1      
 542   1      Di=1;
 543   1      RW=1;
 544   1      delay(0);
 545   1      Enable=1;
 546   1      delay(0);
 547   1      Enable=0;
 548   1      
 549   1      tmpin=Lcd_Bus;
 550   1      
 551   1      return tmpin;
C51 COMPILER V8.02   YJSY                                                                  05/23/2006 16:10:09 PAGE 10  

 552   1      }
 553          
 554          /*------------------------显示边框-------------------------------*/
 555          void frame()
 556          {
 557   1      unsigned char i;
 558   1      Mcs=1;
 559   1      Scs=1;
 560   1      write_com(Page_Add+0);
 561   1      write_com(Col_Add+0);
 562   1      for(i=0;i<64;i++) write_data(0x01);
 563   1      write_com(Page_Add+7);
 564   1      write_com(Col_Add+0);
 565   1      for(i=0;i<64;i++) write_data(0x80);
 566   1      
 567   1      for(i=0;i<8;i++)
 568   1      
 569   1      {
 570   2      Mcs=0;
 571   2      Scs=1;
 572   2      write_com(Page_Add+i);
 573   2      write_com(Col_Add+63);
 574   2      write_data(0xff);
 575   2      Mcs=1;
 576   2      Scs=0;
 577   2      write_com(Page_Add+i);
 578   2      write_com(Col_Add+0);
 579   2      write_data(0xff);

⌨️ 快捷键说明

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