学历改变命运
24小时客服:4008135555/010-82335555
当前位置:首页 > 笔记串讲 > 北大微型计算机及接口技术上机题(03年1月1

北大微型计算机及接口技术上机题(03年1月14)

2006年06月09日    来源:北京自考热线   字体:   打印

  题目:把一个1mhz的脉冲通过两次分频转换成1hz的方波。(通道0、通道1、通道2、控制字地址 分别为280h,281h,282h,283h)

  答案

code segment
       assume cs:code
start:mov dx,283h
       out dx,00110111b;选中通道0,工作在3方式下,对bcd码自减
       mov dx,280h
       mov al,0h
       out dx,al
       mov al,10h
       out dx,al

       mov dx,283h
       out dx,01110111b;选中通道1,工作在3方式下,对bcd码自减
       mov dx,281h
       mov al,0h
       out dx,al
       mov al,10h
       out dx,al

code segment
       end start

注:连线:clk0-1mhz
          gate0-"1"
          out0-clk1
          gate1-"1"
          out1-逻辑笔

关闭