微機課程設(shè)報告——點陣廣告牌_第1頁
微機課程設(shè)報告——點陣廣告牌_第2頁
微機課程設(shè)報告——點陣廣告牌_第3頁
微機課程設(shè)報告——點陣廣告牌_第4頁
微機課程設(shè)報告——點陣廣告牌_第5頁
已閱讀5頁,還剩3頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、一、設(shè)計題目點陣滾動廣告牌二、設(shè)計內(nèi)容 1利用單片機I/O口或以擴展鎖存器的方式控制點陣顯示。 2掌握單片機與16×16點陣塊之間接口電路設(shè)計及編程。 3利用實驗系統(tǒng)16×16點陣實驗單元,要求編制程序?qū)崿F(xiàn)漢字點陣從下倒上滾動循環(huán)顯示。三、設(shè)計原理及方案1、硬件設(shè)計原理圖實驗線路連接:1對于后綴名含有“H2用一8芯扁平電纜把點陣單元總線接口與系統(tǒng)單元總線D0D7任一接口相連。3用一根雙頭實驗線把點陣單元的片選信號CS插孔與譯碼輸出插孔Y0相連。4用一根雙頭實驗線把點陣單元的寫信號WR插孔與系統(tǒng)控制信號插孔WR相連。硬件電路圖: 2、軟件設(shè)計流程圖四、設(shè)計方案源程序 CODE

2、 SEGMENT ASSUME CS:CODE,DS:CODE,ES:CODE ORG 3AD2H;=HE14: JMP STARTLED0 equ 0ffe3h ;列代碼高段(字形)高八位接口地址LED1 equ 0ffe0h ;列代碼低段(字形)低位接口地址JED0 equ 0ffe2h ;行掃描高段(字位)高八位接口地址JED1 equ 0ffe1h ;行掃描低段(字位)低八位接口地址;=START: JMP XB13;=x01a: mov BUF+2,00h ;清列值x023: mov bx,OFFSET BUF ;取列值 mov al,02h xlat cmp al,10h ;減16

3、(十進制數(shù)) jc x0d2 ;末滿16列繼續(xù)掃描下一列 ret ;本次掃描完畢返回主程序x0d2: MOV dx,0002H MOV ah,00h MUL dx ;當前列乘02 mov cx,ax call xb1f ;= 送掃描代碼 = mov dx,led0 ;列代碼送高八位鎖存器 OUT DX,AL MOV DX,led1 ;列代碼送低八位鎖存器 mov al,ah OUT DX,Al ;= 取行代碼 = mov bx,offset buf mov al,02h xlat inc al mov BUF+2,al ;列指針加1 mov ah,00h mov cx,ax mov al,01

4、h jmp x083x07e: SAL ax,1x083: loop x07e mov dx,jed0 ;行代碼送高八位鎖存器 OUT DX,AL MOV DX,jed1 ;行代碼送低八位鎖存器 mov al,ah OUT DX,Al mov cx,0040h ;當前行鎖定顯示250u秒 loop $ mov al,00h ;關(guān)閉顯示 mov dx,jed0 out dx,al mov dx,jed1 OUT dx,al jmp x023 ;繼續(xù)下1行;=x097: mov al,00h ;關(guān)閉顯示 mov dx,jed0 out dx,al mov dx,jed1 OUT dx,al ;=x

5、0a0: mov al,00h ;清掃描個數(shù)存放器 mov BUF+3,al ;從第一個開始x0a2: mov bx,OFFSET buf ;取當前掃描個數(shù) mov al,03h xlat cmp al,16h ;減16(十進制數(shù)) jnc x0a0 ;滿16個返回從第一個開始 ;= MOV ah,00H mov dx,0020h mul dx mov bx,OFFSET stls add ax,bX mov BUF,aL MOV BUF+1,AH ;= mov al,00h ;清掃描次數(shù)存放器 mov BUF+4,alx0bd: mov bx,OFFSET buf ;取當前掃描個數(shù) mov

6、al,04h xlat cmp al,64h ;減64(十進制數(shù)) jnc x0cf ;= call x01a ;掃描顯示當前字體 ;= mov bx,OFFSET buf ;掃描次數(shù)加1 mov al,04h xlat inc al mov BUF+4,al jmp x0bd ;=x0cf: mov bx,OFFSET BUF ;掃描個數(shù)加1 mov al,03h xlat inc al mov BUF+3,al jmp x0a2;=STLS:;歡 DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00

7、H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,80H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00HDB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,80H,00H,80H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00HDB 00H,00H,00H,00H,00H,00H,00H,00H,00H,

8、00H,00H,80H,00H,80H,0FCH,80H DB DB00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,00H,00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,0

9、4H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H DB 00H,00H,00H,00H,00H,00

10、H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H,28H,40H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,80H DB 00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H,28H,40H,10H,40H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00

11、H,80H,00H,80H DB 0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H,28H,40H,10H,40H,28H,40H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H DB 04H,0FCH,45H,04H,46H,48H,28H,40H,28H,40H,10H,40H,28H,40H,24H,0A0H DB 00H,00H,00H,00H,00H,00H,00H,00H, 00H,80H,00H,80H,0FCH,80H,04H,0FCH DB 45H,04H

12、,46H,48H,28H,40H,28H,40H,10H,40H,28H,40H,24H,0A0H,44H,0A0H DB 00H,00H,00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H DB 46H,48H,28H,40H,28H,40H,10H,40H,28H,40H,24H,0A0H,44H,0A0H,81H,10H DB 00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H DB 28H,40H,28H,40H,10H,40H,28H,40H

13、,24H,0A0H,44H,0A0H,81H,10H,01H,08H DB 00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H DB 28H,40H,10H,40H,28H,40H,24H,0A0H,44H,0A0H,81H,10H,01H,08H,02H,0EH ;迎 DB 00H,00H,41H,84H,26H,7EH,14H,44H,04H,44H,04H,44H,0F4H,44H,14H,0C4H DB 15H,44H,16H,54H,14H,48H,10H,40H,10H,40H,28H,46H,47H,

14、0FCH,00H,00H;光 DB 01H,00H,21H,08H,11H,0CH,09H,10H,09H,20H,01H,04H,0FFH,0FEH,04H,40H DB 04H,40H,04H,40H,04H,40H,08H,40H,08H,42H,10H,42H,20H,3EH,40H,00H;臨 DB 10H,80H,10H,80H,51H,04H,51H,0FEH,52H,00H,54H,80H,58H,60H,50H,24H DB 57H,0FEH,54H,44H,54H,44H,54H,44H,54H,44H,14H,44H,17H,0FCH,14H,04H ;嘉 DB 01H,

15、08H,7FH,0FCH,01H,00H,3FH,0F8H,00H,00H,1FH,0F0H,10H,10H,1FH,0F0H DB 04H,44H,0FFH,0FEH,10H,08H,7EH,0FCH,12H,88H,12H,88H,2AH,0F8H,44H,88H;興 DB 02H,00H,02H,08H,21H,08H,11H,10H,19H,10H,09H,20H,00H,20H,00H,44H DB 0FFH,0FEH,00H,00H,00H,00H,04H,40H,0CH,20H,10H,18H,20H,0CH,40H,04H;學 DB 22H,08H,11H,08H,11H,10

16、H,00H,20H,7FH,0FEH,40H,02H,80H,04H,1FH,0E0H DB 00H,40H,01H,84H,0FFH,0FEH,01H,00H,01H,00H,01H,00H,05H,00H,02H,00H;院 DB 00H,80H,78H,40H,4FH,0FEH,54H,02H,58H,14H,63H,0F8H,50H,00H,48H,08H DB 4FH,0FCH,48H,0A0H,68H,0A0H,50H,0A0H,41H,22H,41H,22H,42H,1EH,4CH,00H;! DB 00H,00H,00H,00H,00H,00H,00H,00H,10H,00H,

17、10H,00H,10H,00H,10H,00H DB 10H,00H,10H,00H,10H,00H,10H,00H,10H,00H,00H,00H,10H,00H,00H,00H;=xb13: MOV CX,0000H MOV AX,0000H MOV BX,OFFSET STLS ;取漢字表首址 MOV AX,BX MOV BUF,AL MOV BUF+1,AH ;存漢字表指針單元 JMP X097;=取與當前列對應(yīng)的漢字代碼=XB1F: MOV BX,OFFSET BUF ;取當前漢字首址 MOV AX,BX ADD AX,CX ;當前漢字首址加列值 MOV BX,AX MOV AX,B

18、X ;取當前列掃描代碼 ;= MOV Bl,00H MOV Cl,Al ROL CL,1 JNC XB_0 OR BL,01hXB_0: ROL CL,1 JNC XB_2 or bl,02hXB_2: ROL CL,1 JNC XB_3 or bl,04hXB_3: ROL CL,1 JNC XB_4 or bl,08hXB_4: ROL CL,1 JNC XB_5 or bl,10hXB_5: ROL CL,1 JNC XB_6 or bl,20hXB_6: ROL CL,1 JNC XB_7 or bl,40hXB_7: ROL CL,1 JNC XB_8 or bl,80hXB_8:

19、mov al,bl ret;=BUF DB ?,?,?,?,?,?CODE ENDS END HE14五、設(shè)計實施結(jié)果當實驗程序裝載完畢,實驗運行時,“歡送光臨嘉興學院字樣在點陣顯示模塊上從下向上移動,并循環(huán)顯示。六、總結(jié)以前我學習匯編語言時感覺很有難度。當知道要做課程設(shè)計的時候心里面感覺有些害怕和擔憂, 擔憂自己不會或者做不好。但是當真的要做的時候也只好進自己作大的努力去做。我在這個過程中有很多自己的感受,那就是感覺匯編語言真的是很神奇,街上的滾動廣告牌我自己竟也能設(shè)計出來。我們從開始的擔憂和害怕漸漸變成了享受,看著自己做出來的東西,心里面的感覺真的很好。雖然我們做的東西都還很簡單,但是畢竟是我們自

溫馨提示

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

評論

0/150

提交評論