單片機(jī)課程設(shè)計(jì)點(diǎn)陣LCD液晶顯示屏實(shí)驗(yàn)原理及分析報(bào)告_第1頁(yè)
單片機(jī)課程設(shè)計(jì)點(diǎn)陣LCD液晶顯示屏實(shí)驗(yàn)原理及分析報(bào)告_第2頁(yè)
單片機(jī)課程設(shè)計(jì)點(diǎn)陣LCD液晶顯示屏實(shí)驗(yàn)原理及分析報(bào)告_第3頁(yè)
單片機(jī)課程設(shè)計(jì)點(diǎn)陣LCD液晶顯示屏實(shí)驗(yàn)原理及分析報(bào)告_第4頁(yè)
單片機(jī)課程設(shè)計(jì)點(diǎn)陣LCD液晶顯示屏實(shí)驗(yàn)原理及分析報(bào)告_第5頁(yè)
已閱讀5頁(yè),還剩10頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、jingchu university of technology點(diǎn)陣lcd液晶顯示屏實(shí)驗(yàn)原理及分析報(bào)告學(xué) 院 計(jì)算機(jī)工程學(xué)院專(zhuān) 業(yè) 計(jì)算機(jī)科學(xué)與技術(shù)年級(jí)班別 09計(jì)算機(jī)科學(xué)與技術(shù)1班學(xué) 號(hào) 2009404010125學(xué)生姓名 指導(dǎo)教師 日期:2011 年12月25日目 錄一、軟硬件環(huán)境分析.3二、設(shè)計(jì)目的.3三、工作原理.3四、接線方案.4五、實(shí)驗(yàn)步驟.4六、程序框圖.8七、實(shí)驗(yàn)程序.9八、實(shí)驗(yàn)現(xiàn)象的分析15九、經(jīng)驗(yàn)總結(jié)15點(diǎn)陣lcd液晶顯示屏實(shí)驗(yàn)一、軟硬件環(huán)境分析:本設(shè)計(jì)是設(shè)計(jì)一個(gè)單片機(jī)控制的點(diǎn)陣lcd液晶顯示屏上在lcd上顯示“荊楚理工學(xué)院校訓(xùn) 崇學(xué)尚德求實(shí)創(chuàng)新”字樣的設(shè)計(jì)。近年來(lái)隨著科技

2、的飛速發(fā)展,單片機(jī)的應(yīng)用正在不斷的走向深入,同時(shí)帶動(dòng)著傳統(tǒng)控制檢測(cè)日新月異更新。本lcd液晶顯示屏采用sed1520為中心器件,選用的122x32a點(diǎn)陣式液晶lcd。將軟、硬件有機(jī)地結(jié)合起來(lái),其軟件系統(tǒng)采用匯編語(yǔ)言編寫(xiě)程序,并在keil下調(diào)試通過(guò),與軟件相結(jié)合,調(diào)試修改,使達(dá)到預(yù)期的目的。二、設(shè)計(jì)目的:1熟練掌握c51系統(tǒng)仿真開(kāi)發(fā)系統(tǒng)的應(yīng)用。2加強(qiáng)單片機(jī)的綜合運(yùn)用能力、提高單片機(jī)的軟件編程和調(diào)試能力,為以后的學(xué)習(xí)和開(kāi)發(fā)工作打下良好基礎(chǔ)。3掌握的液晶的工作原理以及應(yīng)用設(shè)計(jì)。4掌握小系統(tǒng)開(kāi)發(fā)設(shè)計(jì)的流程以及設(shè)計(jì)思路。5學(xué)習(xí)獲取字模的方法;學(xué)習(xí)122x32a液晶lcd的原理及編程方法。三、工作原理:

3、1、我們選用的122x32a點(diǎn)陣式液晶lcd,是內(nèi)置sed1520液晶顯示控制器的屏,它集行、列驅(qū)動(dòng)器和控制器于一體,被廣泛應(yīng)用于小規(guī)模液晶顯示模塊中。sed1520內(nèi)置2560位顯示ram區(qū),ram中的1位數(shù)據(jù)控制液晶屏上一個(gè)象素的亮、暗,“1”為亮,“0”為暗。它具有16個(gè)行驅(qū)動(dòng)輸出和61個(gè)列驅(qū)動(dòng)輸出,可以直接與80系列或68系列的cpu相連,驅(qū)動(dòng)占空比為1/32,顯示內(nèi)容:122x32點(diǎn)。2、122x32a點(diǎn)陣式液晶lcd電路圖:122x16 dots122x16 dots121516 lcd panel122x32sed1520seg1-61sed1520seg62-122com1-1

4、6com17-32e1r/wdb0-db7/rese2a03、指令功能:sed1520有13條指令,從作用上可分為兩大類(lèi):一類(lèi)為顯示方式的設(shè)置指令,前6條指令為這一類(lèi)指令,它們只需在初始化程序中寫(xiě)入一次即可。另一類(lèi)為顯示數(shù)據(jù)讀/寫(xiě)操作的指令,從第7條往下(包括讀狀態(tài)字)都是這類(lèi)指令。四、接線方案:五、實(shí)驗(yàn)步驟:準(zhǔn)備實(shí)驗(yàn)相關(guān)器材:1、超想-3000tc綜合實(shí)驗(yàn)儀1臺(tái) 2、keil仿真器1臺(tái)3、pctolcd完美版軟件 4、計(jì)算機(jī)1臺(tái)啟動(dòng)pctolcd完美版軟件,生成“荊楚理工學(xué)院校訓(xùn) 崇學(xué)尚德求實(shí)創(chuàng)新”字模:db 04h,24h,24h,0efh,24h,24h,0efh,24h,24h,04h

5、,0f8h,00h,00h,0ffh,00h,00h;db 82h,42h,32h,0fh,02h,02h,0ffh,02h,02h,02h,0fh,40h,80h,7fh,00h,00h;荊,0db 40h,44h,24h,14h,7fh,14h,24h,00h,24h,14h,7fh,14h,24h,44h,00h,00h;db 80h,41h,21h,1dh,21h,41h,41h,7fh,49h,49h,49h,49h,49h,43h,40h,00h;楚,1db 04h,84h,84h,fch,84h,84h,00h,feh,92h,92h,feh,92h,92h,feh,00h,00

6、h;db 20h,60h,20h,1fh,10h,10h,40h,44h,44h,44h,7fh,44h,44h,44h,40h,00h;理,2db 00h,04h,04h,04h,04h,04h,04h,fch,04h,04h,04h,04h,04h,04h,00h,00h;db 20h,20h,20h,20h,20h,20h,20h,3fh,20h,20h,20h,20h,20h,20h,20h,00h;工,3db 40h,30h,11h,96h,90h,90h,91h,96h,90h,90h,98h,14h,13h,50h,30h,00h;db 04h,04h,04h,04h,04h,4

7、4h,84h,7eh,06h,05h,04h,04h,04h,04h,04h,00h;學(xué),4db 00h,feh,22h,5ah,86h,10h,0ch,24h,24h,25h,26h,24h,24h,14h,0ch,00h;db 00h,ffh,04h,08h,07h,80h,41h,31h,0fh,01h,01h,3fh,41h,41h,71h,00h;院,5db efh,efh,2fh,00h,6fh,efh,7fh,b7h,d7h,f6h,f1h,f7h,d7h,b7h,77h,ffh;db fbh,fch,ffh,00h,ffh,feh,7fh,7fh,bch,d3h,efh,d3h

8、,bch,7fh,7fh,ffh;校,6db bfh,bfh,bdh,33h,ffh,ffh,ffh,00h,ffh,ffh,01h,ffh,ffh,00h,ffh,ffh;db ffh,ffh,ffh,c0h,efh,77h,9fh,e0h,ffh,ffh,c0h,ffh,ffh,00h,ffh,ffh;訓(xùn),7db 00h,c0h,4eh,48h,48h,48h,58h,6fh,48h,48h,48h,48h,4eh,40h,c0h,00h;db 01h,44h,24h,15h,05h,45h,85h,7dh,05h,05h,05h,15h,24h,45h,00h,00h;崇,8db 40h

9、,30h,11h,96h,90h,90h,91h,96h,90h,90h,98h,14h,13h,50h,30h,00h;db 04h,04h,04h,04h,04h,44h,84h,7eh,06h,05h,04h,04h,04h,04h,04h,00h;學(xué),9db 00h,00h,e2h,24h,28h,20h,20h,3fh,20h,20h,28h,24h,e2h,00h,00h,00h;db 00h,00h,ffh,00h,00h,1fh,11h,11h,11h,1fh,40h,80h,7fh,00h,00h,00h;尚,10db 10h,88h,c4h,33h,04h,f4h,94h,

10、94h,f4h,9fh,f4h,94h,94h,f4h,04h,00h;db 01h,00h,ffh,00h,42h,32h,02h,72h,82h,86h,9ah,82h,e2h,0ah,32h,00h;德,11db 00h,08h,28h,48h,88h,08h,08h,ffh,88h,08h,89h,4ah,28h,08h,00h,00h;db 00h,10h,10h,08h,04h,42h,81h,7fh,00h,01h,02h,04h,08h,10h,10h,00h;求,12db 10h,0ch,04h,84h,14h,64h,05h,06h,f4h,04h,04h,04h,04h,

11、14h,0ch,00h;db 04h,84h,84h,44h,47h,24h,14h,0ch,07h,0ch,14h,24h,44h,84h,04h,00h;實(shí),13db 40h,20h,d0h,4ch,43h,44h,c8h,10h,20h,00h,f8h,00h,00h,ffh,00h,00h;db 00h,00h,3fh,40h,44h,48h,47h,40h,70h,00h,0fh,40h,80h,7fh,00h,00h;創(chuàng),14db 40h,44h,54h,65h,c6h,64h,54h,44h,00h,fch,44h,44h,c4h,42h,40h,00h;db 20h,12h,4

12、ah,82h,7fh,02h,0ah,92h,60h,1fh,00h,00h,ffh,00h,00h,00h;新,15進(jìn)入keil軟件界面,點(diǎn)擊項(xiàng)目/打開(kāi)項(xiàng)目 在c:keiluv23000tc51配套實(shí)驗(yàn)例程中選擇實(shí)驗(yàn)一,內(nèi)有asm和c51兩種程序,進(jìn)入asm文件夾打開(kāi)實(shí)驗(yàn)十五點(diǎn)陣lcd液晶顯示屏實(shí)驗(yàn)項(xiàng)目文件進(jìn)入如圖所示界面右鍵點(diǎn)擊項(xiàng)目工作區(qū)的目標(biāo)1,再?gòu)棾龅牟藛沃羞x擇“為目標(biāo)目標(biāo)1選項(xiàng)”如圖所示:為項(xiàng)目文件選擇一個(gè)目標(biāo)器件(atmel89c51),如圖所示:在“為目標(biāo)目標(biāo)1設(shè)置選項(xiàng)”中,點(diǎn)擊“調(diào)試”菜單,在此菜單中可選擇是使用硬件仿真,還是軟件仿真,連接實(shí)驗(yàn)箱做實(shí)驗(yàn)時(shí)選擇硬件仿真,點(diǎn)擊硬件仿

13、真選項(xiàng)后面的設(shè)置選項(xiàng),在此對(duì)對(duì)話框中選擇串口和波特率,串口根據(jù)所連電腦來(lái)決定。波特率為9600。如圖所示:點(diǎn)擊“編譯連接”圖標(biāo),對(duì)項(xiàng)目文件進(jìn)行編譯。如圖:若編譯無(wú)誤,則點(diǎn)擊“調(diào)試” “啟動(dòng)/停止調(diào)試”進(jìn)入調(diào)試界面。如圖:在調(diào)試界面中的可以對(duì)程序進(jìn)行單步或全速運(yùn)行的調(diào)試。如圖:點(diǎn)擊“調(diào)試/啟動(dòng)/停止調(diào)試”,進(jìn)入調(diào)試界面,點(diǎn)擊“調(diào)試/運(yùn)行”可看到lcd液晶屏上顯示“荊楚理工學(xué)院校訓(xùn) 崇學(xué)尚德求實(shí)創(chuàng)新”。六、程序框圖:lcd液晶顯示主程: lcd液晶顯示初始化子程序:調(diào)用lcd初始化子程序調(diào)用lcd清屏子程序設(shè)置頁(yè)地址=02h,列地址=0h,字符代碼寄存器00h調(diào)用顯示“湖”字子程序設(shè)置頁(yè)地址=02

14、h,列地址=0fh,字符代碼寄存器01h調(diào)用顯示“創(chuàng)”字子程序設(shè)置頁(yè)地址=00h,列地址=5bh,字符代碼寄存器0eh調(diào)用顯示“產(chǎn)”字子程序設(shè)置頁(yè)地址=00h,列地址=6ah,字符代碼寄存器0fh調(diào)用顯示“品”字子程序開(kāi) 始分別置com=0e2h,復(fù)位com=0a4h,關(guān)閉休閑狀態(tài)com=0a9h,設(shè)置占空比com=0a0h,正向排序com=0c0h,設(shè)置顯示起始行com=0afh,開(kāi)顯示設(shè)置調(diào)用e1寫(xiě)指令代碼子程序調(diào)用e2寫(xiě)指令代碼子程序 lcd液晶顯示清屏子程序 lcd顯示子程序頁(yè)面地址加1yy開(kāi) 始頁(yè)面地址置0,列地址置0顯示數(shù)據(jù)為“0”一頁(yè)清滿80個(gè)字節(jié)嗎?滿4頁(yè)嗎?結(jié)束nn開(kāi) 始確定

15、字符字模塊首地址取代碼計(jì)算字符字模塊首地址取間址寄存器值取漢字字模數(shù)據(jù)寫(xiě)數(shù)據(jù)七、實(shí)驗(yàn)程序: ;中文lcd,參閱書(shū).顯示荊楚理工學(xué)院校訓(xùn) 崇學(xué)尚德求實(shí)創(chuàng)新 pd1 equ 60 ; ;模塊參數(shù) column equ 30h page1 equ 31h;;頁(yè)地址寄存器 code1 equ 32h;;字符代碼寄存器 count equ 33h;;計(jì)數(shù)器 com equ 20h;;指令寄存器 dat equ 21h;;數(shù)據(jù)寄存器 cwadd1 equ 0fa00h;;寫(xiě)指令代碼地址(e1)cradd1 equ 0fa80h;;讀狀態(tài)字地址(e1)dwadd1 equ 0fa40h;;寫(xiě)顯示數(shù)據(jù)地址(e

16、1)dradd1 equ 0fac0h;;讀顯示數(shù)據(jù)地址(e1)cwadd2 equ 0f800h;;寫(xiě)指令代碼地址(e2)cradd2 equ 0f880h;;讀狀態(tài)字地址(e2)dwadd2 equ 0f840h;;寫(xiě)顯示數(shù)據(jù)地址(e2)dradd2 equ 0f8c0h;;讀顯示數(shù)據(jù)地址(e2) org 0000h movsp,#60h lcall int;;調(diào)用初始化子程序 lcall clear;;調(diào)用清屏子程序 mov pd1,#3dh;; mov page1,#02h;;頁(yè)地址寄存器置初值 mov column,#0h;;列地址寄存器置初值 mov code1,#00h;;字符代

17、碼寄存器置初值 lcall ccw_pr mov page1,#02h mov column,#0fh mov code1,#01h lcall ccw_pr mov page1,#02h mov column,#1eh mov code1,#02h lcall ccw_pr mov page1,#2h mov column,#2dh mov code1,#03h lcall ccw_pr mov page1,#2h mov column,#61 mov code1,#04h lcall ccw_pr mov page1,#2h mov column,#76 mov code1,#05h lc

18、all ccw_pr mov page1,#2h mov column,#91 mov code1,#06h lcall ccw_pr mov page1,#2h mov column,#106 mov code1,#07h lcall ccw_pr mov pd1,#3dh;; mov page1,#00h ;;頁(yè)地址寄存器置初值 mov column,#0h;;列地址寄存器置初值 mov code1,#08h ;;字符代碼寄存器置初值 lcall ccw_pr mov page1,#00h mov column,#0fh mov code1,#09h lcall ccw_pr mov pa

19、ge1,#0h mov column,#1eh mov code1,#0ah lcall ccw_pr mov page1,#0h mov column,#2dh mov code1,#0bh lcall ccw_pr mov page1,#0h mov column,#61 mov code1,#0ch lcall ccw_pr mov page1,#0h mov column,#76 mov code1,#0dh lcall ccw_pr mov page1,#0h mov column,#91 mov code1,#0eh lcall ccw_pr mov page1,#0h mov c

20、olumn,#106 mov code1,#0fh lcall ccw_pr sjmp $ccw_pr: mov dptr,#ccatb;;確定字符字模塊首地址 mov a,code1;;取代碼 mov b,#20h;;字模塊寬度為32個(gè)字節(jié) mul ab;;代碼x32 add a,dpl;;字符字模塊首地址=字模庫(kù)首地址+代碼x32 mov dpl,a mov a,b addc a,dph mov dph,a push column;;列地址入棧 push column;;列地址入棧 mov code1,#00h;;代碼寄存器借用為間址寄存器ccw_1: mov count,#10h;;計(jì)數(shù)

21、器設(shè)定為16 mov a,page1;;讀頁(yè)地址寄存器 anl a,#03h orl a,#0b8h;;“或” 頁(yè)地址設(shè)置代碼 mov com,a;;寫(xiě)頁(yè)地址設(shè)置指令 lcall pr0 lcall pr3 pop column;;取列地址值 mov a,column;;讀列地址寄存器 clr c subb a,#pd1;;列地址-模塊參數(shù) jc ccw_2;;0為左半屏顯示區(qū)域(e1) mov column,a;;0為右半屏顯示區(qū)域(e2) mov a,page1 setb acc.3;;設(shè)置區(qū)域標(biāo)志位 mov page1,a;;“0”為e1,“1”為e2ccw_2: mov com,col

22、umn;;設(shè)置列地址值 mov a,page1;;判區(qū)域標(biāo)志以確定設(shè)置哪個(gè)控制器 jnb acc.3,ccw_3 lcall pr3;;區(qū)域e2 ljmp ccw_4ccw_3: lcall pr0;;區(qū)域e1ccw_4: mov a,code1;;取間址寄存器值 movc a,a+dptr;;取漢字字模數(shù)據(jù) mov dat,a;;寫(xiě)數(shù)據(jù) mov a,page1 jnb acc.3,ccw_5 lcall pr4;;區(qū)域e2 ljmp ccw_6ccw_5: lcall pr1;;區(qū)域e1ccw_6: inc code1;;間址寄存器加1 inc column;;列地址寄存器加1 mov a,

23、column;;判列地址是否超出區(qū)域范圍 cjne a,#pd1,ccw_7ccw_7: jc ccw_8;;未超出則繼續(xù) mov a,page1;;超出則判是否在區(qū)域e2 jb acc.3,ccw_8;;在區(qū)域e2則退出 setb acc.3;;在區(qū)域e1則修改成區(qū)域e2 mov page1,a mov com,#00h;;設(shè)置區(qū)域e2列地址為“0” lcall pr3ccw_8: djnz count,ccw_4;;當(dāng)頁(yè)循環(huán) mov a,page1;;讀頁(yè)地址寄存器 jb acc.7,ccw_9;;判完成標(biāo)志d7位,“1”則完成退出 inc a;;否則頁(yè)地址加“1” setb acc.7

24、clr acc.3 mov page1,a mov code1,#10h;;間接寄存器設(shè)置為16 ljmp ccw_1;;大循環(huán)ccw_9: retccatb:db 04h,24h,24h,0efh,24h,24h,0efh,24h,24h,04h,0f8h,00h,00h,0ffh,00h,00h;db 82h,42h,32h,0fh,02h,02h,0ffh,02h,02h,02h,0fh,40h,80h,7fh,00h,00h;荊,0db 40h,44h,24h,14h,7fh,14h,24h,00h,24h,14h,7fh,14h,24h,44h,00h,00h;db 80h,41h,

25、21h,1dh,21h,41h,41h,7fh,49h,49h,49h,49h,49h,43h,40h,00h;楚,1db 04h,84h,84h,fch,84h,84h,00h,feh,92h,92h,feh,92h,92h,feh,00h,00h;db 20h,60h,20h,1fh,10h,10h,40h,44h,44h,44h,7fh,44h,44h,44h,40h,00h;理,2db 00h,04h,04h,04h,04h,04h,04h,fch,04h,04h,04h,04h,04h,04h,00h,00h;db 20h,20h,20h,20h,20h,20h,20h,3fh,20

26、h,20h,20h,20h,20h,20h,20h,00h;工,3db 40h,30h,11h,96h,90h,90h,91h,96h,90h,90h,98h,14h,13h,50h,30h,00h;db 04h,04h,04h,04h,04h,44h,84h,7eh,06h,05h,04h,04h,04h,04h,04h,00h;學(xué),4db 00h,feh,22h,5ah,86h,10h,0ch,24h,24h,25h,26h,24h,24h,14h,0ch,00h;db 00h,ffh,04h,08h,07h,80h,41h,31h,0fh,01h,01h,3fh,41h,41h,71h,

27、00h;院,5db efh,efh,2fh,00h,6fh,efh,7fh,b7h,d7h,f6h,f1h,f7h,d7h,b7h,77h,ffh;db fbh,fch,ffh,00h,ffh,feh,7fh,7fh,bch,d3h,efh,d3h,bch,7fh,7fh,ffh;校,6db bfh,bfh,bdh,33h,ffh,ffh,ffh,00h,ffh,ffh,01h,ffh,ffh,00h,ffh,ffh;db ffh,ffh,ffh,c0h,efh,77h,9fh,e0h,ffh,ffh,c0h,ffh,ffh,00h,ffh,ffh;訓(xùn),7db 00h,c0h,4eh,48h,

28、48h,48h,58h,6fh,48h,48h,48h,48h,4eh,40h,c0h,00h;db 01h,44h,24h,15h,05h,45h,85h,7dh,05h,05h,05h,15h,24h,45h,00h,00h;崇,8db 40h,30h,11h,96h,90h,90h,91h,96h,90h,90h,98h,14h,13h,50h,30h,00h;db 04h,04h,04h,04h,04h,44h,84h,7eh,06h,05h,04h,04h,04h,04h,04h,00h;學(xué),9db 00h,00h,e2h,24h,28h,20h,20h,3fh,20h,20h,28

29、h,24h,e2h,00h,00h,00h;db 00h,00h,ffh,00h,00h,1fh,11h,11h,11h,1fh,40h,80h,7fh,00h,00h,00h;尚,10db 10h,88h,c4h,33h,04h,f4h,94h,94h,f4h,9fh,f4h,94h,94h,f4h,04h,00h;db 01h,00h,ffh,00h,42h,32h,02h,72h,82h,86h,9ah,82h,e2h,0ah,32h,00h;德,11db 00h,08h,28h,48h,88h,08h,08h,ffh,88h,08h,89h,4ah,28h,08h,00h,00h;db

30、 00h,10h,10h,08h,04h,42h,81h,7fh,00h,01h,02h,04h,08h,10h,10h,00h;求,12db 10h,0ch,04h,84h,14h,64h,05h,06h,f4h,04h,04h,04h,04h,14h,0ch,00h;db 04h,84h,84h,44h,47h,24h,14h,0ch,07h,0ch,14h,24h,44h,84h,04h,00h;實(shí),13db 40h,20h,d0h,4ch,43h,44h,c8h,10h,20h,00h,f8h,00h,00h,ffh,00h,00h;db 00h,00h,3fh,40h,44h,48h

31、,47h,40h,70h,00h,0fh,40h,80h,7fh,00h,00h;創(chuàng),14db 40h,44h,54h,65h,c6h,64h,54h,44h,00h,fch,44h,44h,c4h,42h,40h,00h;db 20h,12h,4ah,82h,7fh,02h,0ah,92h,60h,1fh,00h,00h,ffh,00h,00h,00h;新,15int: mov com,#0e2h;;初始化子程序,復(fù)位 lcall pr0 lcall pr3 mov com,#0a4h;;關(guān)閉休閑狀態(tài) lcall pr0 lcall pr3 mov com,#0a9h;;設(shè)置1/32占空比

32、lcall pr0 lcall pr3 mov com,#0a0h;;正向排序設(shè)置 lcall pr0 lcall pr3 mov com,#0c0h;;設(shè)置顯示起始行為第一行 lcall pr0 lcall pr3 mov com,#0afh;;開(kāi)顯示設(shè)置 lcall pr0 lcall pr3 retclear: mov r4,#00h;;清屏子程序,頁(yè)面地址暫存器設(shè)置clear1: mov a,r4;;取頁(yè)地址值 orl a,#0b8h;;“或” 頁(yè)面地址設(shè)置代碼 mov com,a;;頁(yè)面地址設(shè)置 lcall pr0 lcall pr3 mov com,#00h;;列地址設(shè)置為“0”

33、lcall pr0 lcall pr3 mov r3,#50h;;一頁(yè)清80個(gè)字節(jié)clead2: mov dat,#00h;;顯示數(shù)據(jù)為“0” lcall pr1 lcall pr4 djnz r3,clead2;;頁(yè)內(nèi)字節(jié)清零循環(huán) inc r4;;頁(yè)地址暫存器加1 cjne r4,#04h,clear1;;ram區(qū)清零循環(huán) retpr0: push dpl;;寫(xiě)指令代碼子程序(e1) push dph mov dptr,#cradd1pr01: movx a,dptr jb acc.7,pr01 mov dptr,#cwadd1 mov a,com movx dptr,a pop dph pop dpl retpr1: push dpl;;寫(xiě)顯示數(shù)據(jù)子程

溫馨提示

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

最新文檔

評(píng)論

0/150

提交評(píng)論