版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年發(fā)布:版權授權合同范例
- 2024年太原客運資格證應用能力試題
- 2024年信陽道路旅客運輸從業(yè)資格證模擬考試
- 2023屆新高考化學選考一輪總復習訓練-熱點16 官能團的性質與有機反應類型
- 2024年烏魯木齊客運從業(yè)資格證考試答題技巧與方法
- 2024年朔州客運從業(yè)資格證的考題
- 2024年加油站計量與質量檢測設備采購承包合同
- 教師資格考試小學教育教學知識與能力試題與參考答案
- 《第二節(jié) 區(qū)域工業(yè)化與城市化-以我國珠江三角洲地區(qū)為例》(同步訓練)高中地理必修3
- 基于流固耦合的加筋膨脹土邊坡穩(wěn)定性分析
- 統(tǒng)編版語文六年級上冊第八單元大單元整體教學設計
- 教師個人業(yè)務學習筆記(41篇)
- 2025年高考語文復習備考復習策略講座
- 數(shù)學史上的三次數(shù)學危機
- 2024年水電暖安裝承包合同
- 缺乳(乳汁淤積)產(chǎn)婦的中醫(yī)護理
- 2024北師大版新教材初中數(shù)學七年級上冊內容解讀課件(深度)
- 2024年公共營養(yǎng)師三級考試試卷及答案
- 2024年上半年軟考信息系統(tǒng)項目管理師真題
- 北京市西城區(qū)2023-2024學年高一下學期期末英語試題(解析版)
- 三位數(shù)乘兩位數(shù)乘法豎式計算練習100道及答案
評論
0/150
提交評論