在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,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) > 設計應用 > 51單片機總線驅動

            51單片機總線驅動

            作者: 時間:2016-11-29 來源:網絡 收藏

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

            全部源代碼下載:http://www.51hei.com/f/128yhj.rar

            #include"reg51.h"sbit cd = P2^0;unsigned char pdata *addr;#define uchar unsigned  char#define uint unsigned shortvoid lcd_writecom_two(uchar onedat,uchar twodat,uchar com);void lcd_writedat_onebyte(uchar onedat,uchar com);uchar lcd_readdat_onebyte(uchar com);void lcd_writedat_nbyte(uchar *dat,uchar len);void lcd_readdat_nbyte(uchar *dat ,uchar len);void clear_point(uchar x,uchar y);void sel_point(uchar x,uchar y);void sel_rmiddling(uchar x,uchar y);void clr_rmiddling(uchar x,uchar y);void sel_rbig(uchar x,uchar y);void clr_rbig(uchar x,uchar y);void graph_mode_writeword(uchar x,uchar y,uchar *dat);void graph_mode_write_letter(uchar x,uchar y,uchar *dat);void rhorizontal(uchar x0,uchar x1,uchar y);void erect(uchar y0,uchar y1,uchar x);void Draw_line(uchar x0,uchar y0,uchar x1,uchar y1);void draw_circle(int x, int y, int r);void lcd_init();/**********************************讀取lcd狀態(tài)**********************************/uchar lcd_readcom(){uchar temp;cd=1;addr = 0xff;temp = *addr;return temp;}/*********************************判斷指令/數(shù)據(jù)讀寫忙碌狀態(tài)*********************************/void check_busy(){uchar temp;do{temp=lcd_readcom();}while((temp&0x03)!=0x03);}/*********************************判斷數(shù)據(jù)自動寫忙碌狀態(tài)*********************************/void check_auto_write_busy(){uchar temp;do{temp=lcd_readcom();}while((temp&0x08)!=0x08);}/*********************************判斷數(shù)據(jù)自動讀忙碌狀態(tài)*********************************/void check_auto_read_busy(){uchar temp;do{temp=lcd_readcom();}while((temp&0x04)!=0x04);}/*********************************向lcd寫命令*********************************/void lcd_writecom(uchar dat){check_busy();cd=1;*addr = dat;}/************************************向lcd寫數(shù)據(jù)************************************/void lcd_writedat(uchar dat){check_busy();cd=0;*addr = dat;}/********************************從lcd讀數(shù)據(jù)*********************************/uchar lcd_readdat(){uchar temp;cd=0;addr = 0xff;temp = *addr;return temp;}				   
            				
                        
                            
            			
            							
            上一頁 1 2 3 4 下一頁

            關鍵詞: 51單片機總線驅

            評論


            技術專區(qū)

            關閉