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

📄 demo.lst

📁 RA8806源码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 229   4                                      case 0x31:
 230   4                                              LCD_Clear();
 231   4                                              LCD_Rotate90_Disable();
 232   4                                              SEG_DIR_0_319();
 233   4                                              COM_DIR_0_239();
 234   4                                              LCD_Text();
 235   4                                              LCD_GotoXY(0,0);
 236   4                                              LCD_CmdWrite(0xb0);
 237   4                                              for(i=0;i<159;i++)
 238   4                                              {
 239   5                                                      LCD_DataWrite(sRAiO1[i]);
 240   5                                                      Delay1ms(15);
 241   5                                              }
C51 COMPILER V7.50   DEMO                                                                  03/13/2008 14:26:40 PAGE 5   

 242   4                                              break;
 243   4      
 244   4                                      case 0x02:
 245   4                                              LCD_CmdWrite(WCCR);
 246   4                                              temp = LCD_DataRead();
 247   4                                              temp ^= cSetb4;
 248   4                                              LCD_CmdWrite(WCCR);
 249   4                                              LCD_DataWrite(temp);
 250   4      
 251   4                                              LCD_Clear();
 252   4                                              LCD_Text();
 253   4                                              LCD_GotoXY(0,0);
 254   4                                              LCD_CmdWrite(0xb0);
 255   4                                              for(i=0;i<159;i++)
 256   4                                              {
 257   5                                                      LCD_DataWrite(sRAiO1[i]);
 258   5                                                      Delay2us(50);
 259   5                                              }
 260   4                                              break;
 261   4      
 262   4                                      case 0x22:
 263   4                                              LCD_CmdWrite(CHWI);
 264   4                                              temp = LCD_DataRead();
 265   4                                              if(temp < 15)
 266   4                                                      temp = temp + 1;
 267   4                                              else
 268   4                                                      temp = 15;
 269   4      
 270   4                                              LCD_CmdWrite(CHWI);
 271   4                                              LCD_DataWrite(temp);
 272   4                                              break;
 273   4      
 274   4                                      case 0x32:
 275   4                                              LCD_CmdWrite(CHWI);
 276   4                                              temp = LCD_DataRead();
 277   4                                              if(temp > 0)
 278   4                                                      temp = temp - 1;
 279   4                                              else
 280   4                                                      temp = 0;
 281   4      
 282   4                                              LCD_CmdWrite(CHWI);
 283   4                                              LCD_DataWrite(temp);
 284   4                                              break;
 285   4      
 286   4                                      case 0x80:
 287   4                                              LCD_Rotate90_Disable();
 288   4                                              SEG_DIR_0_319();
 289   4                                              COM_DIR_0_239();
 290   4                                              LCD_LineDist_Adjust(0);
 291   4                                              LCD_NoBold();
 292   4                                              Main_Function();
 293   4                                              break;
 294   4                              }
 295   3                              
 296   3                      }
 297   2      #ifdef  Auto_Run
 298   2                      Delay1ms(1);
 299   2                      Count++;
 300   2                      if(Count == 25000)
 301   2                      {
 302   3                              Count = 0;
 303   3                              AutoRun_Function();
C51 COMPILER V7.50   DEMO                                                                  03/13/2008 14:26:40 PAGE 6   

 304   3                      }
 305   2      #endif
 306   2              }
 307   1      }
 308          
 309          void Font_Size_Function(void)
 310          {
 311   1              uchar i,temp, FontSize;
 312   1              int Count = 0;
 313   1              LCD_Clear();
 314   1      
 315   1              LCD_Text();
 316   1              LCD_FontSize(0);
 317   1              LCD_GotoXY(0,0);
 318   1              LCD_CmdWrite(0xb0);
 319   1              for(i=0;i<8;i++)
 320   1              {
 321   2                      LCD_DataWrite(sRAiO1[i]);
 322   2                      Delay2us(50);
 323   2              }
 324   1      
 325   1              while(1)
 326   1              {
 327   2                      if(Get_Key())
 328   2                      {
 329   3                              Clr_KeyScan_INT_Flag();
 330   3                              Count = 0;
 331   3                              LCD_CmdWrite(KSDR0);
 332   3                              Key_Code1 = LCD_DataRead();
 333   3                              Delay2us(50);
 334   3                      
 335   3                              switch(Key_Code1)
 336   3                              {
 337   4                                      case 0x01:
 338   4                                              LCD_Clear();
 339   4                                              
 340   4                                              LCD_CmdWrite(FVHT);
 341   4                                              FontSize = LCD_DataRead();
 342   4                                              temp = FontSize >> 6;
 343   4                                              if(temp < 3)
 344   4                                                      temp++;
 345   4                                              else
 346   4                                                      temp = 3;
 347   4                                              temp = temp << 6;
 348   4                                              FontSize = ((FontSize & 0x3f) | (temp & 0xc0));
 349   4                                              LCD_CmdWrite(FVHT);
 350   4                                              LCD_DataWrite(FontSize);
 351   4      
 352   4                                              LCD_Text();
 353   4                                              LCD_GotoXY(0,0);
 354   4                                              LCD_CmdWrite(0xb0);
 355   4                                              for(i=0;i<8;i++)
 356   4                                              {
 357   5                                                      LCD_DataWrite(sRAiO1[i]);
 358   5                                                      Delay1ms(1);
 359   5                                              }
 360   4                                              break;
 361   4      
 362   4                                      case 0x11:
 363   4                                              LCD_Clear();
 364   4      
 365   4                                              LCD_CmdWrite(FVHT);
C51 COMPILER V7.50   DEMO                                                                  03/13/2008 14:26:40 PAGE 7   

 366   4                                              FontSize = LCD_DataRead();
 367   4                                              temp = FontSize >> 6;
 368   4                                              if(temp > 0)
 369   4                                                      temp--;
 370   4                                              else
 371   4                                                      temp = 0;
 372   4                                              temp = temp << 6;
 373   4                                              FontSize = ((FontSize & 0x3f) | (temp & 0xc0));
 374   4                                              LCD_CmdWrite(FVHT);
 375   4                                              LCD_DataWrite(FontSize);
 376   4      
 377   4                                              LCD_Text();
 378   4                                              LCD_GotoXY(0,0);
 379   4                                              LCD_CmdWrite(0xb0);
 380   4                                              for(i=0;i<8;i++)
 381   4                                              {
 382   5                                                      LCD_DataWrite(sRAiO1[i]);
 383   5                                                      Delay1ms(1);
 384   5                                              }
 385   4                                              break;
 386   4      
 387   4                                      case 0x21:
 388   4                                              LCD_Clear();
 389   4      
 390   4                                              LCD_CmdWrite(FVHT);
 391   4                                              FontSize = LCD_DataRead();
 392   4                                              temp = (FontSize >> 4) & 0x03;
 393   4                                              if(temp < 3)
 394   4                                                      temp++;
 395   4                                              else
 396   4                                                      temp = 3;
 397   4                                              temp = temp << 4;
 398   4                                              FontSize = ((FontSize & 0xcf) | (temp & 0x30));
 399   4                                              LCD_CmdWrite(FVHT);
 400   4                                              LCD_DataWrite(FontSize);
 401   4      
 402   4                                              LCD_Text();
 403   4                                              LCD_GotoXY(0,0);
 404   4                                              LCD_CmdWrite(0xb0);
 405   4                                              for(i=0;i<8;i++)
 406   4                                              {
 407   5                                                      LCD_DataWrite(sRAiO1[i]);
 408   5                                                      Delay1ms(1);
 409   5                                              }
 410   4                                              break;
 411   4      
 412   4                                      case 0x31:
 413   4                                              LCD_Clear();
 414   4      
 415   4                                              LCD_CmdWrite(FVHT);
 416   4                                              FontSize = LCD_DataRead();
 417   4                                              temp = (FontSize >> 4) & 0x03;
 418   4                                              if(temp > 0)
 419   4                                                      temp--;
 420   4                                              else
 421   4                                                      temp = 0;
 422   4                                              temp = temp << 4;
 423   4                                              FontSize = ((FontSize & 0xcf) | (temp & 0x30));
 424   4                                              LCD_CmdWrite(FVHT);
 425   4                                              LCD_DataWrite(FontSize);
 426   4      
 427   4                                              LCD_Text();
C51 COMPILER V7.50   DEMO                                                                  03/13/2008 14:26:40 PAGE 8   

 428   4                                              LCD_GotoXY(0,0);
 429   4                                              LCD_CmdWrite(0xb0);
 430   4                                              for(i=0;i<8;i++)
 431   4                                              {
 432   5                                                      LCD_DataWrite(sRAiO1[i]);
 433   5                                                      Delay1ms(1);
 434   5                                              }
 435   4                                              break;
 436   4      
 437   4                                      case 0x02:
 438   4                                              LCD_CmdWrite(WCCR);
 439   4                                              temp = LCD_DataRead();
 440   4                                              temp ^= cSetb4;
 441   4                                              LCD_CmdWrite(WCCR);
 442   4                                              LCD_DataWrite(temp);
 443   4      
 444   4                                              LCD_Text();
 445   4                                              LCD_GotoXY(0,0);
 446   4                                              LCD_CmdWrite(0xb0);
 447   4                                              for(i=0;i<8;i++)
 448   4                                              {
 449   5                                                      LCD_DataWrite(sRAiO1[i]);
 450   5                                                      Delay1ms(1);
 451   5                                              }
 452   4                                              break;
 453   4      
 454   4                                      case 0x12:
 455   4                                              LCD_CmdWrite(WLCR);
 456   4                                              temp = LCD_DataRead();
 457   4                                              temp ^= cSetb0;
 458   4                                              LCD_CmdWrite(WLCR);
 459   4                                              LCD_DataWrite(temp);
 460   4                                              break;
 461   4      
 462   4                                      case 0x22:
 463   4                                              LCD_CmdWrite(WLCR);

⌨️ 快捷键说明

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