久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開(kāi)始

搜索
查看: 4498|回復(fù): 0
打印 上一主題 下一主題
收起左側(cè)

基于LPC2131的OCMJ4X8C 液晶驅(qū)動(dòng)程序

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:71407 發(fā)表于 2015-1-1 17:32 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
延時(shí)大就非常穩(wěn)定,但是執(zhí)行速度卻下來(lái)了,延時(shí)小卻不大穩(wěn)定。最后終于把延時(shí)時(shí)間給調(diào)的合適而使其達(dá)到執(zhí)行速度快而且穩(wěn)定的效果。注意由于LPC2131是3.3V的電壓,而OCMJ4X8C是5V供電,因此兩者最好共地,在條件允許的情況下,可以給LPC2131和OCMJ4X8C的接口加一個(gè)3.3V轉(zhuǎn)5V的電平轉(zhuǎn)換電路,使其更加穩(wěn)定,不加亦可。
  1. //=====================================================================
  2. //                    OCMJ4X8C 液晶驅(qū)動(dòng)程序(串行)
  3. //硬件連接: CS --P0^4;  
  4. //          STD --P0^5;   
  5. //          SCLK--P0^6;   
  6. //          PSB --VSS;   
  7. //          RST --VDD;
  8. //          VDD--邏輯電源(+5V)
  9. //          VSS--GND(0V)
  10. //ocm4x8c(串).c
  11. //writer:谷雨 2008年8月2日于EDA實(shí)驗(yàn)室
  12. //說(shuō)明:   修改端口的時(shí)候只需修改定義口以及函數(shù)void Lcd_IO_Inti (void)即可
  13. //=====================================================================
  14. #include "config.h"
  15. #define comm 0
  16. #define dat   1
  17. #define x1    0x80
  18. #define x2    0x88
  19. #define y     0x80
  20. //**************************修改硬件時(shí)要修改的部分********************************
  21. /*定義CS控制*/
  22. #define Lcd_CS        4            //串行口使能,高電平有效(作RS時(shí),1為數(shù)據(jù),0為指令)
  23. #define Set_CS()      IO0SET =1<<Lcd_CS
  24. #define Clr_CS()      IO0CLR =1<<Lcd_CS
  25. /*定義STD控制*/
  26. #define Lcd_STD       5            //串口數(shù)據(jù)(作R/W時(shí),1為讀,0為寫(xiě))        
  27. #define Set_STD()     IO0SET =1<<Lcd_STD
  28. #define Clr_STD()     IO0CLR =1<<Lcd_STD
  29. /*定義SCLK控制*/
  30. #define Lcd_SCLK      6           //串口時(shí)鐘,高電平有效
  31. #define Set_SCLK()    IO0SET =1<<Lcd_SCLK
  32. #define Clr_SCLK()    IO0CLR =1<<Lcd_SCLK
  33. //**************************函數(shù)定義********************************
  34. static void Delay_1(uint32 time);
  35. static void wr_lcd (uint8 dat_comm,uint8 content);
  36. extern void Lcd_IO_Inti(void);
  37. extern void Lcd_Inti(void);
  38. extern void set_position(uint8 xx,uint8 yy);
  39. extern void send_str(uint8 const *cc);
  40. extern void send_disp (uint8 const *img);
  41. extern void send_img1(uint8 const *img);
  42. extern void lat_disp (uint8 data1,uint8 data2);
  43. extern void con_disp (uint8 data1,uint8 data2,uint8 x0,uint8 y0,uint8 xl,uint8 yl);
  44. extern void con_disp_line (uint8 line);
  45. extern void clear (void);
  46. extern void clear_line(uint8 line);
  47. extern void clear_point(uint8 line,uint8 row);
  48. //======================================================
  49. // 函數(shù)名稱 : Delay_1()
  50. // 函數(shù)功能 : 1微秒延時(shí)
  51. // 入口參數(shù) : time   延時(shí)的毫秒數(shù)
  52. // 出口參數(shù) : 無(wú)
  53. //======================================================
  54. void Delay_1(uint32 time)  
  55. {
  56. while(time--);
  57. }
  58. //=================================================================
  59. // 函數(shù)名稱 :void Lcd_IO_Inti (void)
  60. // 函數(shù)功能 :實(shí)現(xiàn)lcd IO 口初始化
  61. // 入口參數(shù) :無(wú)
  62. // 出口參數(shù) :無(wú)
  63. //=================================================================
  64. void Lcd_IO_Inti(void)
  65. {
  66. PINSEL0&=(~0x3f00);
  67. IO0DIR|= (1<<Lcd_CS) | (1<<Lcd_STD) | (1<<Lcd_SCLK);    //設(shè)置Lcd_CS,Lcd_STD,Lcd_SCLK為輸出
  68. IO0CLR = (1<<Lcd_CS) | (1<<Lcd_STD) | (1<<Lcd_SCLK);    //Lcd_CS,Lcd_STD,Lcd_SCLK置低消除影響
  69. }
  70. //=================================================================
  71. // 函數(shù)名稱 :void Lcd_Inti(void)
  72. // 函數(shù)功能 :實(shí)現(xiàn)lcd初始化
  73. // 入口參數(shù) :無(wú)
  74. // 出口參數(shù) :無(wú)
  75. //=================================================================
  76. void Lcd_Inti(void)
  77. {
  78. wr_lcd (comm,0x30); //30---基本指令動(dòng)作
  79. wr_lcd (comm,0x01); //清屏,地址指針指向00H
  80. Delay_1 (0xffff); //清屏需較長(zhǎng)時(shí)間
  81. wr_lcd (comm,0x06); //光標(biāo)的移動(dòng)方向
  82.     wr_lcd (comm,0x0c); //顯示打開(kāi),光標(biāo)關(guān),反白關(guān)
  83. }
  84. //=================================================================
  85. //函數(shù)名:void set_position(uint8 xx,uint8 yy)
  86. //函數(shù)功能: 設(shè)定顯示坐標(biāo)
  87. //入口參數(shù):xx yy   
  88. //         xx:0~3   yy:0~7
  89. //出口參數(shù):無(wú)
  90. //=================================================================
  91. void set_position(uint8 xx,uint8 yy) //坐標(biāo)   
  92. {
  93.    uint8 line;
  94.    wr_lcd (comm,0x30); //30---基本指令動(dòng)作
  95.    switch(xx)
  96.    {
  97.      case 0:line=0x00;break;
  98.      case 1:line=0x10;break;
  99.      case 2:line=0x08;break;
  100.      case 3:line=0x18;break;
  101.      default:break;
  102.    }
  103.    wr_lcd(comm,0x80+line+yy);    //設(shè)定地址
  104. }
  105. //=================================================================
  106. //函數(shù)名:void send_str(uint8 *cc)
  107. //函數(shù)功能: 顯示漢字或是字符
  108. //入口參數(shù):*cc
  109. //出口參數(shù):無(wú)  
  110. //注意:注意為全角字符,即每個(gè)字符占十六個(gè)字節(jié)
  111. //     顯示漢字或者字符時(shí)先設(shè)定顯示坐標(biāo),最多顯示8個(gè)漢字         
  112. //=================================================================
  113. void send_str(uint8 const *cc)
  114. {
  115.    uint8 i;
  116.    wr_lcd (comm,0x30);
  117.    for(i=0;(i<16)&&*(cc+i);i++)
  118.      wr_lcd(dat,*(cc+i));
  119. }
  120. //=================================================================
  121. //函數(shù)名:void send_disp (uint8 const *img)
  122. //函數(shù)功能: 顯示圖形
  123. //入口參數(shù):uchar code *img   
  124. //出口參數(shù):無(wú)
  125. //注意:顯示圖形時(shí)先寫(xiě)第一行數(shù)據(jù),依次向后
  126. //=================================================================
  127. void send_disp (uint8 const *img)
  128. {
  129. uint8 i,j;
  130. for(j=0;j<32;j++)      //上半屏寫(xiě)入圖形數(shù)據(jù)
  131. {
  132.     for(i=0;i<8;i++)
  133.     {
  134.       wr_lcd (comm,0x34); //8位控制端口,選擇擴(kuò)充指令集
  135.       wr_lcd (comm,y+j); //選擇圖形區(qū)Y軸坐標(biāo)
  136.       wr_lcd (comm,x1+i); //選擇圖形區(qū)X軸坐標(biāo)
  137.       wr_lcd (comm,0x30); //選擇基本指令集
  138.       wr_lcd (dat,img[j*16+i*2]); //寫(xiě)圖形數(shù)據(jù)
  139.       wr_lcd (dat,img[j*16+i*2+1]);
  140.     }
  141. }
  142. for(j=32;j<64;j++)    //下半屏寫(xiě)入圖形數(shù)據(jù)
  143. {
  144.     for(i=0;i<8;i++)
  145.     {
  146.       wr_lcd (comm,0x34);
  147.       wr_lcd (comm,y+j-32);
  148.       wr_lcd (comm,x2+i);
  149.       wr_lcd (comm,0x30);
  150.       wr_lcd (dat,img[j*16+i*2]);
  151.       wr_lcd (dat,img[j*16+i*2+1]);
  152.     }
  153. }
  154. wr_lcd (comm,0x36);   //寫(xiě)入數(shù)據(jù)后選擇圖形顯示
  155. }
  156. //=================================================================
  157. //函數(shù)名:void send_img1(uint8 const *img)
  158. //函數(shù)功能: 下半屏顯示圖形
  159. //入口參數(shù):uchar code *img
  160. //出口參數(shù):無(wú)   
  161. //=================================================================
  162. void send_img1(uint8 const *img)
  163. {
  164. uint8 i,j;
  165. for(j=0;j<32;j++)
  166. {
  167.     for(i=0;i<8;i++)
  168.     {
  169.       wr_lcd (comm,0x34);  
  170.       wr_lcd (comm,y+j);  
  171.       wr_lcd (comm,x2+i);  
  172.       wr_lcd (comm,0x30);  
  173.       wr_lcd (dat,img[j*16+i*2]);  
  174.       wr_lcd (dat,img[j*16+i*2+1]);
  175.     }
  176. }
  177. wr_lcd (comm,0x36);
  178. }
  179. //=================================================================
  180. //函數(shù)名:void lat_disp (uint8 data1,uint8 data2)
  181. //函數(shù)功能:顯示點(diǎn)陣
  182. //入口參數(shù):uchar data1 奇數(shù)行顯示的點(diǎn)陣
  183. //         uchar data2 偶數(shù)行顯示的點(diǎn)陣
  184. //出口參數(shù):無(wú)
  185. //=================================================================
  186. void lat_disp (uint8 data1,uint8 data2)
  187. {
  188. uint8 i,j,k,x;
  189. x=x1;
  190. for(k=0;k<2;k++)
  191. {
  192.     for(j=0;j<16;j++)
  193.     {
  194.       for(i=0;i<8;i++)
  195.       {
  196.         wr_lcd (comm,0x34);    //8位控制端口,選擇擴(kuò)充指令集
  197.         wr_lcd (comm,y+j*2);   //Y軸
  198.         wr_lcd (comm,x+i);    //X軸
  199.         wr_lcd (comm,0x30);    //選擇基本指令集
  200.         wr_lcd (dat,data1);    //寫(xiě)入數(shù)據(jù)
  201.         wr_lcd (dat,data1);
  202.       }
  203.       for(i=0;i<8;i++)
  204.       {
  205.         wr_lcd (comm,0x34);
  206.         wr_lcd (comm,y+j*2+1);
  207.         wr_lcd (comm,x+i);
  208.         wr_lcd (comm,0x30);
  209.         wr_lcd (dat,data2);
  210.         wr_lcd (dat,data2);
  211.       }
  212.     }
  213.     x=x2;
  214. }
  215. wr_lcd (comm,0x36);   //寫(xiě)入數(shù)據(jù)后選擇顯示
  216. }
  217. //=================================================================
  218. //函數(shù)名:void con_disp (uchar data1,uchar data2,uchar x0,uchar y0,uchar xl,uchar yl)
  219. //函數(shù)功能:反白顯示
  220. //入口參數(shù):data1,data2,x0,y0,x1,y1
  221. //     當(dāng)data1=0xff,data2=0xff時(shí),在x0,y0處開(kāi)始反白顯示區(qū)域?yàn)?6*xl*yl.
  222. //出口參數(shù):無(wú)
  223. //=================================================================
  224. void con_disp (uint8 data1,uint8 data2,uint8 x0,uint8 y0,uint8 xl,uint8 yl)
  225. {
  226. uint8 i,j;
  227. for(j=0;j<yl;j++)
  228. {
  229.     for(i=0;i<xl;i++)
  230.     {
  231.       wr_lcd (comm,0x34);
  232.       wr_lcd (comm,y0+j);
  233.       wr_lcd (comm,x0+i);
  234.       wr_lcd (comm,0x30);
  235.       wr_lcd (dat,data1);
  236.       wr_lcd (dat,data2);
  237.     }
  238. }
  239. wr_lcd (comm,0x36);
  240. }

  241. //=================================================================
  242. //函數(shù)名:void con_disp_line (uint8 line)
  243. //函數(shù)功能:選擇某行反白顯示
  244. //入口參數(shù):line
  245. //         line為1或者2,1選擇1、3行反白顯示,2選擇2、4行反白顯示
  246. //出口參數(shù):無(wú)
  247. //=================================================================
  248. void con_disp_line (uint8 line)
  249. {
  250.      uint8 a;
  251.      wr_lcd (comm,0x34); //8位控制端口,選擇擴(kuò)充指令集
  252. switch(line)
  253. {
  254.        case 1:a=0x04;break;
  255.        case 2:a=0x05;break;
  256.        default:break;
  257.      }
  258. wr_lcd (comm,a);     //反白選擇
  259. Delay_1(0xffff);
  260. wr_lcd (comm,0x36);   //顯示
  261. }
  262. //=================================================================
  263. //函數(shù)名:void clear()
  264. //函數(shù)功能:清屏
  265. //入口參數(shù):無(wú)
  266. //出口參數(shù):無(wú)
  267. //=================================================================
  268. void clear (void)
  269. {
  270. wr_lcd (comm,0x30);   //選擇基本指令集
  271. wr_lcd (comm,0x01);   //清屏
  272. Delay_1(0xffff);     //延時(shí)
  273. }
  274. //=================================================================
  275. //函數(shù)名:void clear_line(uint8 line)
  276. //函數(shù)功能:清除一行
  277. //入口參數(shù): line 0~3
  278. //出口參數(shù):無(wú)
  279. //=================================================================
  280. void clear_line(uint8 line) //清除一行(0~3行)
  281. {
  282. uint8 i;
  283. set_position(line,0);
  284. for(i=0;i<16;i++)
  285.     wr_lcd (dat,0x20);//填充空格
  286. }
  287. //=================================================================
  288. //函數(shù)名:void clear_point(uint8 line,uint8 row)
  289. //函數(shù)功能:清除一點(diǎn)
  290. //入口參數(shù): line 選擇的行
  291. //          row 選擇的列
  292. //出口參數(shù):無(wú)
  293. //=================================================================
  294. void clear_point(uint8 line,uint8 row)
  295. {
  296. set_position(line,row);
  297. wr_lcd (dat,0x20);//填充空格
  298. wr_lcd (dat,0x20);
  299. }
  300. //=================================================================
  301. // 函數(shù)名稱 :void wr_lcd (uint8 dat_comm,uint8 content)
  302. // 函數(shù)功能 :向lcd中寫(xiě)數(shù)據(jù)或者指令
  303. // 入口參數(shù) :dat_comm 選擇是寫(xiě)數(shù)據(jù)或者寫(xiě)指令位
  304. //            content    dat_comm為1時(shí)寫(xiě)數(shù)據(jù),否則寫(xiě)指令
  305. // 出口參數(shù) :無(wú)
  306. //=================================================================
  307. void wr_lcd (uint8 dat_comm,uint8 content)
  308. {
  309. uint8 i,j;
  310. Clr_SCLK();
  311. Set_CS();
  312. Delay_1(1);
  313. Set_STD();
  314. for(i=0;i<5;i++)    //寫(xiě)入5個(gè)1,作為啟動(dòng)位
  315. {
  316.    Set_SCLK();
  317.    Delay_1(1);
  318.    Clr_SCLK();
  319.    Delay_1(1);
  320. }
  321. Clr_STD();
  322. Set_SCLK();
  323. Delay_1(1);
  324. Clr_SCLK();
  325. Delay_1(1);
  326. if(dat_comm)    //判斷寫(xiě)數(shù)據(jù)還是指令
  327. {
  328.    Set_STD();   //data
  329. }
  330. else
  331. {
  332.    Clr_STD();    //command
  333. }
  334. Set_SCLK();
  335. Delay_1(1);
  336. Clr_SCLK();
  337. Delay_1(1);
  338. Clr_STD();       //寫(xiě)入1個(gè)0
  339. Set_SCLK();
  340. Delay_1(1);
  341. Clr_SCLK();
  342. Delay_1(1);
  343. for(j=0;j<2;j++)
  344. {
  345.    for(i=0;i<4;i++)     //分別寫(xiě)入高四位和低四位
  346.    {
  347.     if(content&0x80)   
  348.     {
  349.      Set_STD();
  350.     }
  351.     else
  352.     {
  353.      Clr_STD();
  354.     }
  355.     Set_SCLK();
  356.     Delay_1(1);
  357.     Clr_SCLK();
  358.     Delay_1(1);
  359.     content<<=1;
  360.    }
  361.    Clr_STD();
  362.    for(i=0;i<4;i++)        //寫(xiě)入4個(gè)0
  363.    {
  364.     Set_SCLK();
  365.     Delay_1(1);
  366.     Clr_SCLK();
  367.     Delay_1(1);
  368.    }
  369. }
  370. Clr_CS();
  371. Delay_1(1);
  372. }
  373. uint8 const tab5[]={
  374. /*-- 寬度x高度=128x64 --*/
  375. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  376. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  377. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  378. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  379. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  380. 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x80,0x00,0x0F,0xFF,0x00,0x00,0x00,0x00,0x00,
  381. 0x00,0x00,0x00,0x00,0x0C,0x43,0x01,0x80,0x00,0x7F,0xFF,0xF0,0x00,0x00,0x00,0x00,
  382. 0x00,0x00,0x00,0x00,0x19,0xFF,0x07,0x00,0x07,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,
  383. 0x00,0x00,0x00,0x01,0x3F,0xFC,0x1E,0x00,0x1F,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,
  384. 0x00,0x00,0x00,0x01,0xBF,0xFF,0xFC,0x00,0x7F,0xFC,0x00,0x7F,0xC0,0x00,0x00,0x00,
  385. 0x00,0x00,0x00,0x01,0xFF,0xFF,0xF0,0x00,0xFF,0xC0,0x00,0x0F,0xE0,0x00,0x00,0x00,
  386. 0x00,0x00,0x00,0x01,0xFF,0xFF,0xE0,0x03,0xFF,0xFF,0xFC,0x01,0xF0,0x00,0x00,0x00,
  387. 0x00,0x00,0x00,0x01,0xDF,0xFF,0xC0,0x07,0xFF,0xFF,0xFF,0x80,0xF0,0x00,0x00,0x00,
  388. 0x00,0x00,0x00,0x03,0xFF,0xFF,0x00,0x0F,0xFF,0xFF,0xFF,0xE0,0x38,0x00,0x00,0x00,
  389. 0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x1F,0xFF,0xF0,0x03,0xF8,0x38,0x00,0x00,0x00,
  390. 0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x3F,0xFF,0xFF,0xC0,0x7C,0x18,0x00,0x00,0x00,
  391. 0x00,0x00,0x00,0x04,0x7F,0xF0,0x00,0x3F,0xFF,0xFF,0xF8,0x1E,0x08,0x00,0x00,0x00,
  392. 0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,0x7F,0xFF,0xFF,0xFE,0x0F,0x08,0x00,0x00,0x00,
  393. 0x00,0x00,0x00,0x0F,0xFF,0xFC,0x00,0xFF,0xFF,0xFF,0xFF,0x87,0x08,0x00,0x00,0x00,
  394. 0x00,0x00,0x00,0x1F,0xFF,0xFE,0x00,0xFF,0xFF,0xFF,0xFF,0x83,0x88,0x00,0x00,0x00,
  395. 0x00,0x00,0x00,0x3F,0xFF,0xFE,0x01,0xFF,0xFF,0xFF,0xFF,0xC3,0x88,0x00,0x00,0x00,
  396. 0x00,0x00,0x00,0x7F,0xFF,0xFE,0x01,0xFF,0xFF,0xFF,0xFF,0xE1,0x88,0x00,0x00,0x00,
  397. 0x00,0x00,0x00,0xFF,0xFF,0xFE,0x03,0xFF,0xFF,0xFF,0xFF,0xE1,0x88,0x00,0x00,0x00,
  398. 0x00,0x00,0x01,0xFF,0xFF,0xFE,0x03,0xFF,0xFF,0xFF,0xFF,0xF1,0x88,0x00,0x00,0x00,
  399. 0x00,0x00,0x01,0xFF,0xFF,0xFE,0x03,0xFF,0xFF,0xFF,0xFF,0xF3,0x08,0x00,0x00,0x00,
  400. 0x00,0x00,0x01,0xFF,0xFF,0xFF,0x07,0xFF,0xFF,0xFF,0xFF,0xF2,0x10,0x00,0x00,0x00,
  401. 0x00,0x00,0x01,0xFF,0xFF,0xFF,0x8F,0xFF,0xFF,0xFF,0xFF,0xF0,0x20,0x00,0x00,0x00,
  402. 0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,
  403. 0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x70,0x00,0x00,0x00,0x00,
  404. 0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x70,0x00,0x00,0x00,0x00,
  405. 0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x70,0x00,0x00,0x00,0x00,
  406. 0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0x7F,0x20,0x00,0x00,0x00,0x00,
  407. 0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0x7F,0x20,0x00,0x00,0x00,0x00,
  408. 0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0x7E,0x20,0x00,0x00,0x00,0x00,
  409. 0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0x3E,0x40,0x00,0x00,0x00,0x00,
  410. 0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xCF,0xFF,0x3C,0x40,0x00,0x00,0x00,0x00,
  411. 0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xCF,0xFE,0x38,0x40,0x00,0x00,0x00,0x00,
  412. 0x00,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0x8F,0xFE,0x38,0x40,0x00,0x00,0x00,0x00,
  413. 0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0x8F,0xFE,0x30,0x40,0x00,0x00,0x00,0x00,
  414. 0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x1F,0x7C,0x20,0x40,0x00,0x00,0x00,0x00,
  415. 0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFE,0x1E,0x78,0x00,0x40,0x00,0x00,0x00,0x00,
  416. 0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFE,0x1E,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,
  417. 0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xDA,0x3C,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,
  418. 0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xF2,0x30,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
  419. 0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xF1,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  420. 0x00,0x00,0x00,0x00,0x00,0xFE,0x7F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  421. 0x00,0x00,0x00,0x00,0x00,0x7C,0x3F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  422. 0x00,0x00,0x00,0x00,0x00,0x78,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  423. 0x00,0x00,0x00,0x00,0x00,0x72,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  424. 0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  425. 0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  426. 0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  427. 0x00,0x00,0x00,0x00,0x00,0xC0,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  428. 0x00,0x00,0x00,0x00,0x01,0x40,0x04,0xD8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  429. 0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  430. 0x00,0x00,0x00,0x00,0x02,0x0C,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  431. 0x00,0x00,0x00,0x00,0x02,0x40,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  432. 0x00,0x00,0x00,0x00,0x0C,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  433. 0x00,0x00,0x00,0x00,0x38,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  434. 0x00,0x00,0x00,0x0F,0xE2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  435. 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  436. 0x00,0x00,0x00,0x00,0x00,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,0x00,0x00,0x00,
  438. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  439. };
  440. //=================================================================
  441. //函數(shù)名:   int main (void)
  442. //函數(shù)功能: 主函數(shù),用于測(cè)試,無(wú)實(shí)際意義
  443. //入口參數(shù): 無(wú)
  444. //出口參數(shù):無(wú)
  445. //=================================================================
  446. int main (void)
  447. {
  448. uint8 const tab[]={"中華人名共和國(guó)"};
  449. Delay_1(0x1fffff);
  450. Lcd_IO_Inti();       //初始化
  451. Lcd_Inti();
  452. while(1)
  453. {
  454.    clear();
  455.    lat_disp (0x00,0x00);
  456.    Delay_1(0x1fffff);
  457.    set_position(0,0);    //顯示漢字
  458.    send_str(tab);
  459.    set_position(1,0);
  460.    send_str(tab);
  461.    set_position(2,0);
  462.    send_str(tab);
  463.    Delay_1(0x1fffff);
  464.    clear_point(0,1);     //清除一點(diǎn)  
  465.    Delay_1(0x1fffff);
  466.    con_disp (0xff,0xff,0x8c,0x80,2,16);   //區(qū)域反白顯示
  467.    Delay_1(0x6fffff);
  468.    con_disp_line(2);        //行反白顯示
  469.    Delay_1(0x6fffff);
  470.    clear_line(1);            //清除一行
  471.    Delay_1(0x6fffff);
  472.    clear();
  473.    Delay_1(0x1fffff);
  474.    lat_disp (0xcc,0xcc);     //顯示點(diǎn)陣
  475.    Delay_1(0x1fffff);
  476.    clear();
  477.    lat_disp (0x00,0x00);
  478.    Delay_1(0x1fffff);
  479.    clear();
  480.    lat_disp (0xff,0x00);    //顯示點(diǎn)陣
  481.    Delay_1(0x1fffff);
  482.    clear();
  483.    send_disp(tab5);         //顯示圖像
  484.    Delay_1(0x6fffff);
  485. }
  486.     return 0;
  487. }
復(fù)制代碼



分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表
主站蜘蛛池模板: 黄色毛片在线看 | 99小视频 | 色999日韩 | 中文字幕乱码亚洲精品一区 | 日韩精品在线免费观看视频 | 国产精品久久久久免费 | 欧美毛片免费观看 | 在线观看亚 | 天天天天操 | 欧美精品在线免费观看 | 91精品国产欧美一区二区成人 | 97超碰人人 | 亚洲国产精品久久久久 | 欧美jizzhd精品欧美巨大免费 | 91精品国产乱码久久久久久久 | 午夜小影院 | 亚洲国产高清高潮精品美女 | 中文天堂在线观看 | 亚洲伊人精品酒店 | 91精品国产一区二区在线观看 | 亚洲高清视频在线观看 | 久久大陆| 国产精品自拍视频网站 | av资源中文在线天堂 | 久久久久九九九女人毛片 | 操人视频在线观看 | 日韩在线精品 | 欧美一区二区三区大片 | 日韩精品一区二区不卡 | 久久久久久国产精品免费免费狐狸 | 午夜精品久久久 | 久久久久久av | 久久久久无码国产精品一区 | 亚洲高清在线视频 | 一级免费毛片 | 黄色国产大片 | 国产天堂 | 亚洲二区视频 | 日韩毛片 | 日韩不卡在线 | 91精品免费 |