4 6 1
Download
1 / 3

實例演練 (4-6-1) - PowerPoint PPT Presentation


  • 117 Views
  • Uploaded on

實例演練 (4-6-1). 連接電路. 4ms. 4ms. 4ms. Ch4-1.asm-1. ORG 0 ; 程式從 0 位址開始 START: MOV P1, #1EH ; 將最右邊數字顯示 1 CALL DELAY ; 延遲 4ms MOV P1, #5DH ; 將右邊第二個數字顯示 5 CALL DELAY ; 延遲 4ms MOV P1, #0BH ; 將右邊第三個數字顯示 0 CALL DELAY ; 延遲 4ms MOV P1, #87H ; 將最左邊數字顯示 8 CALL DELAY ; 延遲 4ms

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' 實例演練 (4-6-1)' - kemal


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
4 6 1
實例演練(4-6-1)

  • 連接電路

4ms

4ms

4ms


Ch4 1 asm 1
Ch4-1.asm-1

ORG 0 ;程式從0位址開始

START: MOV P1, #1EH ;將最右邊數字顯示1

CALL DELAY ;延遲4ms

MOV P1, #5DH ;將右邊第二個數字顯示5

CALL DELAY ;延遲4ms

MOV P1, #0BH ;將右邊第三個數字顯示0

CALL DELAY ;延遲4ms

MOV P1, #87H ;將最左邊數字顯示8

CALL DELAY ;延遲4ms

JMP START ;從頭開始掃瞄


Ch4 1 asm 2
Ch4-1.asm-2

;=========延遲約4ms=(即2usxR7xR7)=============

DELAY: MOV R7, #10

D1: MOV R6, #200

DJNZ R6, $ ; (2 machine cycles)

DJNZ R7, D1

RET

END

Note: For XTAL clk =12 MHz, 1mc = 12 clk = 1μs.


ad