亚洲春色中文字幕久久久-三上亚,一吻二脱三床四吻胸,国产真实伦对白视频全集,在线毛片观看,精品成品入口黄网,国产毛aⅴ片久久久,亚洲AV色香蕉一区二区三区老师,萧皇后A级艳片,色情日本视频更新,99久久亚洲精品日本无码

標題: LCD+PIC單片機12864串行顯示程序 [打印本頁]

作者: qwe5747965    時間: 2015-11-30 08:34
標題: LCD+PIC單片機12864串行顯示程序
程序代碼:
  1. #include<pic.h>
  2. #define uchar unsigned char
  3. #define uint  unsigned int
  4. __CONFIG(HS&WDTDIS);
  5. #include "Drive_Serial.h"
  6. uchar   line1_data[] = {"頂頂電子歡迎您!"};
  7. uchar   line2_data[] = {"  www*ddmcu*com   "};
  8. uchar   line3_data[] = {"DD-900實驗開發板"};
  9. uchar   line4_data[] = {"TEL: 15853209853  "};
  10. /********端口設置函數********/
  11. void port_init(void)
  12. {
  13.     TRISC = 0x00;
  14.     TRISD = 0x00;      
  15. }
  16. /********以下是閃爍三次函數********/
  17. void lcd_flash()
  18. {
  19.     Delay_ms(1000);         //控制停留時間
  20.   lcd_wcmd(0x08);           //關閉顯示  
  21.   Delay_ms(500);            //延時0.5s  
  22.   lcd_wcmd(0x0c);           //開顯示   
  23.   Delay_ms(500);            //延時0.5s
  24.   lcd_wcmd(0x08);           //關閉顯示  
  25.   Delay_ms(500);            //延時0.5s
  26.   lcd_wcmd(0x0c);           //開顯示   
  27.   Delay_ms(500);            //延時0.5s
  28.     lcd_wcmd(0x08);         //關閉顯示  
  29.   Delay_ms(500);            //延時0.5s
  30.   lcd_wcmd(0x0c);           //開顯示   
  31.   Delay_ms(500);            //延時0.5s
  32. }  
  33. /********以下是主函數********/
  34. void  main()
  35. {
  36.     uchar i;
  37.   port_init();
  38.   Delay_ms(100);                //上電,等待穩定  
  39.   lcd_init();                   //初始化LCD
  40.     while(1)
  41.   {
  42.         LocateXY(0,0);              //設置顯示位置為第0行,0列
  43.     for(i=0;i<16;i++)
  44.     {
  45.         lcd_wdat(line1_data[i]);
  46.             Delay_ms(100);      //每個字符停留的時間為100ms
  47.         }
  48.         LocateXY(0,1);              //設置顯示位置為第1行第0列
  49.         for(i=0;i<16;i++)
  50.         {
  51.             lcd_wdat(line2_data[i]);
  52.             Delay_ms(100);
  53.         }
  54.         LocateXY(0,2);              //設置顯示位置為第2行第0列
  55.         for(i=0;i<16;i++)
  56.         {
  57.             lcd_wdat(line3_data[i]);
  58.             Delay_ms(100);
  59.         }
  60.     LocateXY(0,3);              //設置顯示位置為第3行第0列
  61.     for(i=0;i<16;i++)
  62.     {
  63.         lcd_wdat(line4_data[i]);
  64.             Delay_ms(100);
  65.         }
  66.         Delay_ms(1000);         //停留1s
  67.         lcd_flash();                //閃爍三次
  68.         lcd_clr();                  //清屏
  69.         Delay_ms(2000);
  70.     }
  71. }

復制代碼



作者: cck314    時間: 2017-6-4 21:29
來晚了 支持
作者: neilperry    時間: 2017-8-23 17:37
硬件引腳怎么連接

作者: qq3417    時間: 2018-3-13 14:27
Drive_Serial.h  
文件能分享下么?
作者: huchunhb    時間: 2018-6-29 18:15
樓主好,你發的這個程序好像是并行驅動12864的,串行驅動12864的程序比這麻煩得多。
作者: 13893203697    時間: 2018-7-10 10:42
支持大兄弟,在此領域多多磨礪。必將成材。




歡迎光臨 (http://www.denmoz.com/bbs/) Powered by Discuz! X3.1