8086之8253芯片仿真

8086之8253芯片仿真

汇编语言 微机原理 8086

8086之8253芯片仿真

题目1

问题描述

实现开关闭合后5s后点亮发光二极管 方式0

解答

使用1HZ频率输入给定时器0
工作模式为0

电路图

8086之8253芯片仿真
题目1 电路图

程序

;====================================================================
; Main.asm file generated by New Project wizard
;
; Created:   周日 7月 7 2019
; Processor: 8086
; Compiler:  MASM32
;
; Before starting simulation set Internal Memory Size 
; in the 8086 model properties to 0x10000
;实现开关闭合后5s后点亮发光二极管
;====================================================================
data segment
T08253 equ 40h
T18253 equ 42h
T28253 equ 44h
TD8253 equ 46h
data ends
CODE    SEGMENT PUBLIC 'CODE'
        ASSUME CS:CODE,ds:data
START:
     mov ax,data
     mov ds,ax
     
     ;写控制字
     mov dx,TD8253
     mov al,00010000b
     out dx,al
     ;写计数初值
     mov dx,T08253
     mov al,05h
     out dx,al
        ; Write your code here
ENDLESS:
        JMP ENDLESS
CODE    ENDS
        END START

题目2

问题描述

实现开关闭合后5s后点亮发光二极管 方式1

解答

电路图

8086之8253芯片仿真
题目2 电路图

程序

;====================================================================
; Main.asm file generated by New Project wizard
;
; Created:   周日 7月 7 2019
; Processor: 8086
; Compiler:  MASM32
;
; Before starting simulation set Internal Memory Size 
; in the 8086 model properties to 0x10000
;实现开关闭合后5s后点亮发光二极管 方式2
;====================================================================
data segment
T08253 equ 40h
T18253 equ 42h
T28253 equ 44h
TD8253 equ 46h
data ends
CODE    SEGMENT PUBLIC 'CODE'
        ASSUME CS:CODE,ds:data
START:
     mov ax,data
     mov ds,ax
     
     ;写控制字
     mov dx,TD8253
     mov al,01010010b
     out dx,al
     ;写计数初值
     mov dx,T18253
     mov al,05h
     out dx,al
        ; Write your code here
ENDLESS:
        JMP ENDLESS
CODE    ENDS
        END START

题目3

问题描述

发出喇叭中音 方式2

解答

电路图

8086之8253芯片仿真
题目3电路图

程序

;====================================================================
; Main.asm file generated by New Project wizard
;
; Created:   周一 7月 8 2019
; Processor: 8086
; Compiler:  MASM32
;
; Before starting simulation set Internal Memory Size 
; in the 8086 model properties to 0x10000
;利用方式2发出中音1(523HZ),输入10khz
;====================================================================
data segment
T08253 equ 40h
T18253 equ 42h
T28253 equ 44h
TD8253 equ 46h
data ends
CODE    SEGMENT PUBLIC 'CODE'
        ASSUME CS:CODE,ds:data
START:
     mov ax,data;
     mov dx,ax;
     
     ;写入控制字
     mov dx,TD8253;
     mov al,00010101b;
     out dx,al;
     
     ;写入计数初值
     mov dx,T08253
     mov al,20H
     out dx,al
     
ENDLESS:
        JMP ENDLESS
CODE    ENDS
        END START

题目4

问题描述

发出喇叭中音 方式3

解答

电路图

8086之8253芯片仿真
题目4电路图

程序

;====================================================================
; Main.asm file generated by New Project wizard
;
; Created:   周一 7月 8 2019
; Processor: 8086
; Compiler:  MASM32
;
; Before starting simulation set Internal Memory Size 
; in the 8086 model properties to 0x10000
;利用方式2发出中音1(523HZ),输入10khz
;====================================================================
data segment
T08253 equ 40h
T18253 equ 42h
T28253 equ 44h
TD8253 equ 46h
data ends
CODE    SEGMENT PUBLIC 'CODE'
        ASSUME CS:CODE,ds:data
START:
     mov ax,data;
     mov dx,ax;
     
     ;写入控制字
     mov dx,TD8253;
     mov al,01010111b;
     out dx,al;
     
     ;写入计数初值
     mov dx,T18253
     mov al,20H
     out dx,al
     
ENDLESS:
        JMP ENDLESS
CODE    ENDS
        END START
上一篇:JAVA集合中的迭代器的遍历


下一篇:Java设计模式8:迭代器模式