在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,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>

            新聞中心

            C51_LCD1602顯示

            作者: 時間:2016-11-21 來源:網(wǎng)絡(luò) 收藏
            #include
            #include
            #define uchar unsigned char
            #define uint unsigned int
            sbit rs=P2^6;
            sbit rw=P2^5;
            sbit en=P2^7;
            uchar shuma[10]={0x03,0x9f,0x25,0x0d,0x99,0x49,0x41,0x1f,0x01,0x09};
            // 0 1 2 3 4 5 6 7 8
            void delay(uchar a)
            {
            uint i,j;
            for(i=0;i<=110;i++)
            for(j=0;j<=a;j++);
            }
            void write_com(uchar com)
            {
            rs=0;
            rw=0;
            en=0;
            P0=com;
            en=1;
            delay(10);
            en=0;
            }
            void write_dat(uchar dat)
            {
            rs=1;
            rw=0;
            en=0;
            P0=dat;
            en=1;
            delay(10);
            en=0;
            }
            void init_1602()
            {
            write_com(0x38);
            write_com(0x0c);
            write_com(0x06);
            write_com(0x01);
            }
            void main()
            {
            init_1602();
            write_com(0x80+2);
            write_dat(I);
            write_com(0x80+4);
            write_dat(a);
            write_com(0x80+5);
            write_dat(m);
            write_com(0x80+7);
            write_dat(i);
            write_com(0x80+8);
            write_dat(r);
            write_com(0x80+9);
            write_dat(o);
            write_com(0x80+10);
            write_dat(n);
            write_com(0x80+12);
            write_dat(m);
            write_com(0x80+13);
            write_dat(a);
            write_com(0x80+14);
            write_dat(n);
            }



            關(guān)鍵詞: C51LCD1602顯

            評論


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

            關(guān)閉