在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 128*64液晶簡單單片機代碼

            128*64液晶簡單單片機代碼

            作者: 時間:2016-11-30 來源:網(wǎng)絡(luò) 收藏
            控制芯片是常用的HD61202列驅(qū)動,HD61203行驅(qū)動

            本文引用地址:http://www.biyoush.com/article/201611/323907.htm


            一個漢字由16*16個像素點構(gòu)成。

            掃描順序上下,然后到第2列再上下,一次類推。

            顯示結(jié)果:

            參考文獻:<<手把手教你學(xué)單片機c程序設(shè)計>> 下載地址:http://www.51hei.com/bbs/dpj-22812-1.html

            主函數(shù)代碼:

            #include

            #define uchar unsigned char
            #define uint unsigned int

            #define dataport P0 //數(shù)據(jù)口
            sbit CS1=P2^4; //左顯引腳
            sbit CS2=P2^3; //右顯引腳
            sbit RST=P2^2; //復(fù)位引腳
            sbit rs=P2^7; //數(shù)據(jù)或指令寄存器引腳
            sbit rw=P2^6; //讀或?qū)懖僮饕_
            sbit en=P2^5; //讀寫時能引腳
            void delay(unsigned long v); //延時
            void wcode(uchar c,uchar csl,uchar csr); //寫指令
            void wdata(uchar c,uchar csl,uchar csr); //寫數(shù)據(jù)
            void set_startline(uchar i); //設(shè)置起始行
            void set_xy(uchar x,uchar y); //設(shè)置X,Y方向
            void dison_off(uchar k); //顯示器開或關(guān)
            void reset();//復(fù)位
            void lcd_init(); //顯示器初始化
            void lw(uchar x,uchar y,uchar dd); //將數(shù)據(jù)寫入左右半屏
            void display_hz(uchar xx,uchar yy,uchar n,uchar fb); //顯示漢字函數(shù)
            uchar code hz[]; //漢字字摸
            #include "12864hh.h" //調(diào)用文件(函數(shù)庫)

            void main(void)
            {
            lcd_init();
            delay(1000);
            while(1)
            {

            display_hz(2,0,0,0); //display_hz(顯示列位置,顯示頁位置,顯示第幾個漢字,是否反顯);
            display_hz(4,0,1,0);
            display_hz(6,0,2,0);
            display_hz(8,0,3,0);
            display_hz(10,0,4,0);
            display_hz(2,4,5,0);
            display_hz(4,4,6,0);
            display_hz(6,4,7,0);
            display_hz(8,4,8,0);
            display_hz(10,4,9,0);


            }
            delay(60000);

            }

            //---------------------------------------------字形碼------------------------------------------------------

            uchar code hz[]={
            0x20,0x04,0x20,0x04,0x22,0x42,0x22,0x82,0xFE,0x7F,0x21,0x01,0x21,0x01,0x20,0x10,
            0x20,0x10,0xFF,0x08,0x20,0x07,0x22,0x1A,0xAC,0x21,0x20,0x40,0x20,0xF0,0x00,0x00,/*"我",0*/

            0x00,0x40,0x40,0x20,0xB2,0xA0,0x96,0x90,0x9A,0x4C,0x92,0x47,0xF6,0x2A,0x9A,0x2A,
            0x93,0x12,0x91,0x1A,0x99,0x26,0x97,0x22,0x91,0x40,0x90,0xC0,0x30,0x40,0x00,0x00,/*"愛",1*/

            0x00,0x08,0x00,0x08,0xF8,0x0B,0x28,0x09,0x29,0x09,0x2E,0x09,0x2A,0x09,0xF8,0xFF,
            0x28,0x09,0x2C,0x09,0x2B,0x09,0x2A,0x09,0xF8,0x0B,0x00,0x08,0x00,0x08,0x00,0x00,/*"單",2*/

            0x00,0x80,0x00,0x40,0x00,0x30,0xFE,0x0F,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x01,
            0x10,0x01,0x1F,0x01,0x10,0x01,0x10,0xFF,0x10,0x00,0x18,0x00,0x10,0x00,0x00,0x00,/*"片",3*/

            0x08,0x04,0x08,0x03,0xC8,0x00,0xFF,0xFF,0x48,0x00,0x88,0x41,0x08,0x30,0x00,0x0C,
            0xFE,0x03,0x02,0x00,0x02,0x00,0x02,0x00,0xFE,0x3F,0x00,0x40,0x00,0x78,0x00,0x00, /*機",4*/


            上一頁 1 2 下一頁

            關(guān)鍵詞: 128*64液晶單片

            評論


            相關(guān)推薦

            技術(shù)專區(qū)

            關(guān)閉