Mikroprosessor 8086 dengan 7-segment & keypad





1.RANGKAIAN SIMULASI [kembali]





; multi-segment executable file template.

data segment
    ; add your data here! 
    task_data db 100 dup(0) 
    task_id   dw 0 
   PORTA EQU 00H
   PORTB EQU 02H
   PORTC EQU 04H
   PCW   EQU 06H
   
ends

stack segment
    dw   128  dup(0)
ends

code segment
start:
; set segment registers:

    mov ax, data
    mov ds, ax
    mov es, ax 
    MOV DX,PCW
    MOV AL,10000010B
    OUT DX,AL 
   BEGIN:
    MOV CX,00FFH
    MOV AL,0FEH
    MOV DX,PORTA
    OUT DX,AL
    
    EELOOP:
    ;MOV AL,PORTB
     IN AL,PORTB
     CMP AL,0FEH
     JNE NEXT1
     MOV AL,001H;
     OUT PORTC,AL;
     OUT PORTC,AL 
     JMP GO
     NEXT1: CMP AL,0FDH
     JNE NEXT2
     MOV AL,004H;
     OUT PORTC,AL;
     OUT PORTC,AL
     JMP GO
     NEXT2:
     CMP AL,0FBH
     JNE NEXT3
     MOV AL,007H;
     OUT PORTC,AL;
     OUT PORTC,AL
     JMP GO
      NEXT3:
      CMP AL,0F7H
     JNE GO
     MOV AL,00BH;
     OUT PORTC,AL;
     OUT PORTC,AL
     GO:
    LOOP EELOOP 
   
       MOV CX,00FFH
    MOV AL,0FDH
    MOV DX,PORTA
    OUT DX,AL
    
    EELOOP2:
    ;MOV AL,PORTB
     IN AL,PORTB
     CMP AL,0FEH
     JNE NEXT12
     MOV AL,002H;
     OUT PORTC,AL;
     OUT PORTC,AL
     JMP GO2
     NEXT12: CMP AL,0FDH
     JNE NEXT22
     MOV AL,005H;
     OUT PORTC,AL;
     OUT PORTC,AL
      JMP GO2
     NEXT22:
     CMP AL,0FBH
     JNE NEXT32
     MOV AL,008H;
     OUT PORTC,AL;
     OUT PORTC,AL
     JMP GO2
      NEXT32:
      CMP AL,0F7H
     JNE GO2
     MOV AL,000H;
     OUT PORTC,AL;
     OUT PORTC,AL
   
     GO2:
    LOOP EELOOP2
    
       MOV CX,00FFH
    MOV AL,0FBH
    MOV DX,PORTA
    OUT DX,AL
   
     EELOOP3:
    ;MOV AL,PORTB
     IN AL,PORTB
     CMP AL,0FEH
     JNE NEXT13
     MOV AL,003H;
     OUT PORTC,AL;
     OUT PORTC,AL
     JMP GO3
     NEXT13: CMP AL,0FDH
     JNE NEXT23
     MOV AL,006H;
     OUT PORTC,AL;
     OUT PORTC,AL
     JMP GO3
     NEXT23:
     CMP AL,0FBH
     JNE NEXT33
     MOV AL,009H;
     OUT PORTC,AL;
     OUT PORTC,AL
     JMP GO3
      NEXT33:
      CMP AL,0F7H
     JNE GO3
     MOV AL,00CH;
     OUT PORTC,AL;
     OUT PORTC,AL
     GO3:
    LOOP EELOOP3
    JMP BEGIN   

    JMP BEGIN

Jika video diatas tidak bisa diputar, maka klik :
7 Segmen dan Keypad dengan Mikroprosessor 8086
  

Silakan unduh berikut, klik :

  1. HMTL
  2. Rangkaian Simulasi
  3. Listing Program
  4. Flowchart
  5. Video








Tidak ada komentar:

Posting Komentar