在12864顯示任意圖片及參考程序_第1頁
在12864顯示任意圖片及參考程序_第2頁
在12864顯示任意圖片及參考程序_第3頁
在12864顯示任意圖片及參考程序_第4頁
在12864顯示任意圖片及參考程序_第5頁
已閱讀5頁,還剩6頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、用12864顯示單色圖片首先介紹本12864液晶顯示器:型號:QC12864B為了讓這個位置有一個參考點,我們有必要定義一個坐標系 在這里,我定義的坐標系如下0,0127,00.63-127,630,0代表屏苒的左上角,127.63代表屏幕的右下甬。對于屏幕上面任意f 點,如果我們想要點亮它,必須先讀出此點的狀態(tài), 然后再修改該點.最后送出去即讀-一修改-導 按照這個步募 然后再運 咫C語言中的位操作運算符可以很方便的完成畫點的函數(shù)申因為單片機讀取的是數(shù)據(jù),而不是直接的圖片。得將圖片進行取模, 圖片應該是單色圖片,像素128*64。下面我為大家介紹個實例。、在電腦附件畫圖,首先設置屬性開始畫圖

2、邛未命名-畫國瀛輯(國直看M 圖像田藪色(口 耨助(由保存文件,注意格式:、然后進行取模。編程:#include<>#define uchar unsigned char/宏定義#define uint unsigned int uchar code ai= 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x

3、00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x00,0x00,0x00, 0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

4、,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC0,0x00,0x00,0x00, 0x00,0x00,0x00,0x01,0xCE,0x00,0x00,0x00,0x00,0x00,0x01,0xC1,0xE0,0x00,0x00,0x00,#define led P2/數(shù)據(jù)端口sbit rs=P1A2;/指令/數(shù)據(jù)選擇信號sbit rw=P1Ai;/讀寫選擇信號sbit e=P1A0;/使能端sbit psb=P1A3; /串并選擇端,高電平為并行,低電平為串行0x00,

5、0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x00,0x00,0x03,0x31,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0xC0,0x00,0x00,0x00,0x00,0x00,0x03,0x9B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x82,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFC,

6、0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xEF,0x00,0x00,0x00,0x00,0x00,0x1B,0xFC,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xFE,0x00,0x00,0x00,0x00,0x00,0x1E,0x60,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,0x38,0x70,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x63,0x00,0x00,0x00,0x00,

7、0x00,0x30,0x7F,0xE0,0x00,0x00,0x00,0x00,0x00,0x03,0xF8,0x73,0x00,0x00,0x00,0x00,0x00,0x33,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x37,0x00,0x00,0x00,0x00,0x00,0x06,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,

8、0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x1C,0x00,0x00,0x00,0x00,0x00,0x01,0x83,0x80,0x00,0x00,0x00,0x00,0x00,0x0F,0xD8,0x7C,0x00,0x00,0x00,0x00,0x00,0x03,0xC7,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x18,0xE6,0x00,0x00,0x00,0x00,0x00,0x06,0x7E,0x00,0x00,0x00,0x00,0x00,

9、0x00,0x00,0x19,0x87,0x10,0x00,0x00,0x00,0x00,0x0E,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x03,0x90,0x00,0x00,0x00,0x00,0x18,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x01,0xF8,0x00,0x00,0x00,0x00,0x30,0xE3,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0xF8,0x00,0x00,0x00,0x00,0x67,0x01,0xF0,

10、0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

11、0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x0F,

12、0x00,0x00,0x07,0xD0,0x00,0x01,0xF1,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x0E,0x00,0x00,0x0C,0x38,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1E,0x00,0x00,0x1C,0x38,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x1E,0x00,0x00,0x38,0x18,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,

13、0x00,0x00,0x1E,0x1E,0x00,0x00,0x38,0x18,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x1E,0x00,0x00,0x30,0x18,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x3E,0x00,0x00,0x70,0x00,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x3E,0x00,0x00,0x70,0x00,0x00,0x00,0xE0,0xC0,

14、0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x3E,0x00,0x00,0x70,0x00,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x2E,0x00,0x00,0x70,0x00,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1B,0xEE,0x00,0x00,0x70,0x00,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x1B,0xEE,0x00,0x00,0x70,0x00,

15、0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0xEE,0x00,0x00,0x38,0x00,0x00,0x00,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0xCE,0x00,0x00,0x38,0x00,0x00,0x00,0x60,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0xCE,0x00,0x00,0x38,0x18,0x00,0x00,0x60,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xCE,

16、0x00,0x00,0x1C,0x10,0x00,0x00,0x71,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x8E,0x00,0x00,0x0E,0x70,0x00,0x00,0x71,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x1F,0x00,0x00,0x07,0xE0,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

17、0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

18、0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

19、0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,;/ 圖片數(shù)據(jù)void delay(uint z)/ 延時函數(shù)uint x,y;for(x=z;x>0;x-)for(y=110;y>0;y-);void xiezhiling(uchar a)/ 寫指令函數(shù)rs=0;rw=0;lcd=a;delay(5);e=1;delay(5);e=0;void xieshuju(uchar a)/ 寫數(shù)據(jù)函數(shù)rs=1;rw=0;lcd=a;delay(5);e=

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論