1 / 3

實例演練 (4-6-1)

實例演練 (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

kemal
Download Presentation

實例演練 (4-6-1)

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 實例演練(4-6-1) • 連接電路 4ms 4ms 4ms

  2. 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 ;從頭開始掃瞄

  3. 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.

More Related