在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,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首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 玩轉(zhuǎn)LED點(diǎn)陣之一:16X64單紅點(diǎn)陣靜態(tài)顯示

            玩轉(zhuǎn)LED點(diǎn)陣之一:16X64單紅點(diǎn)陣靜態(tài)顯示

            作者: 時(shí)間:2016-11-30 來(lái)源:網(wǎng)絡(luò) 收藏
            //單片機(jī)STC89C52

            //晶振:22.1184M
            //顯示屏:HUB08接口16X64單紅點(diǎn)陣
            //顯示方式:靜態(tài)16X16漢字
            //作者:huqin
            //QQ: 1766135164
            //網(wǎng)址:http://www.51hei.com
            //時(shí)間:2013-05-13
            #include
            #include"zimo.h"
            sbit SDAR1=P0^4; //紅色數(shù)據(jù)1
            sbit SDAR2=P3^3; //紅色數(shù)據(jù)2
            sbit SDAG1=P3^4; //綠色數(shù)據(jù)1
            sbit SDAG2=P3^5; //綠色數(shù)據(jù)2
            sbit CLK=P0^7;//74HC595的時(shí)鐘
            sbit STB=P0^6;//輸出鎖存
            sbit OE=P0^5;//74HC138的使能

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

            //74HC595串行數(shù)據(jù)輸入
            void SendDate(unsigned char DataR1,unsigned char DataG1,unsigned char DataR2,unsigned char DataG2)
            {
            unsigned char i;
            for(i = 0; i < 8; i++)
            {
            SDAR1=DataR1 & 0x01;
            SDAG1=DataG1 & 0x01;
            SDAR2=DataR2 & 0x01;
            SDAG2=DataG2 & 0x01;
            CLK = 0;
            CLK = 1;
            DataR1 >>= 1;
            DataG1 >>= 1;
            DataR2 >>= 1;
            DataG2 >>= 1;
            }
            }

            //主函數(shù)入口
            void main()
            {
            unsigned int num;
            SDAR1=0;
            SDAR2=0;
            SDAG1=0;
            SDAG2=0;

            while(1)
            {
            for(num=0;num<16;num++)
            {
            SendDate(~Table[num*2+0],~0X00,~0x00,~0X00);
            SendDate(~Table[num*2+1],~0X00,~0x00,~0X00);
            SendDate(~Table[num*2+0+32],~0X00,~0x00,~0X00);
            SendDate(~Table[num*2+1+32],~0X00,~0x00,~0X00);

            SendDate(~Table[num*2+0+64],~0X00,~0x00,~0X00);
            SendDate(~Table[num*2+1+64],~0X00,~0x00,~0X00);
            SendDate(~Table[num*2+0+96],~0X00,~0x00,~0X00);
            SendDate(~Table[num*2+1+96],~0X00,~0x00,~0X00);
            OE=1;
            STB=1;//輸出鎖存
            STB=0;
            P0=num;//16位行選
            OE=0;
            }
            }
            }

            zimo.h

            unsigned char code Table[]={ //取模宋體
            0x08,0x00,
            0xC8,0x7F,
            0x48,0x00,
            0x7F,0x00,
            0x48,0x3F,
            0x68,0x00,
            0xD8,0x7F,
            0x48,0x03,
            0x4C,0x25,
            0x4B,0x65,
            0x48,0x19,
            0x48,0x11,
            0x28,0x11,
            0x28,0x65,
            0x1A,0x23,
            0x04,0x01,

            0xFC,0x1F,
            0x00,0x0C,
            0x60,0x03,
            0x80,0x00,
            0xFC,0x1F,
            0x84,0x10,
            0x84,0x10,
            0xFC,0x1F,
            0x84,0x10,
            0x84,0x10,
            0xFC,0x1F,
            0x84,0x10,
            0x84,0x10,
            0x84,0x10,
            0x84,0x14,
            0x04,0x08,

            0x80,0x00,
            0x80,0x00,
            0x80,0x00,
            0xFC,0x1F,
            0x84,0x10,
            0x84,0x10,
            0xFC,0x1F,
            0x84,0x10,
            0x84,0x10,
            0x84,0x10,
            0xFC,0x1F,
            0x84,0x10,
            0x80,0x40,
            0x80,0x40,
            0x00,0x7F,
            0x00,0x00,

            0x00,0x00,
            0xFC,0x0F,
            0x00,0x04,
            0x00,0x02,
            0x00,0x01,
            0x80,0x00,
            0x80,0x00,
            0x80,0x20,
            0xFF,0x7F,
            0x80,0x00,
            0x80,0x00,
            0x80,0x00,
            0x80,0x00,
            0x80,0x00,
            0xA0,0x00,
            0x40,0x00,
            };

            實(shí)際效果:



            評(píng)論


            技術(shù)專(zhuān)區(qū)

            關(guān)閉