INTA
CAS0 IR0 CAS1 IR1 CAS2 IR2 IR3 INTA IR4 IR5 INT IR6 IR7 SP/EN INTR CAS0 INTA CAS1 CAS2 INT IR0 IR1 SP/EN IR7 +5V
(2)编写主、从片初始化程序。(8分) ;初始化主片8259A MOV DX,0F000H
MOV AL,11H ICW1:11H OUT DX,AL ;ICW1 MOV DX,0F001H MOV AL,70H
OUT DX,AL ;ICW2 NOP
MOV AL,01H 00000001 OUT DX,AL ;ICW3 NOP
MOV AL,11H OUT DX,AL ;ICW4 3. (1) 画出8253的接线图;(5分)
;初始化从片8259A MOV DX,0E000H MOV AL,11H OUT DX,AL MOV DX,0E001H MOV AL,80H OUT DX,AL NOP
MOV AL,00H OUT DX,AL NOP MOV AL 01H OUT DX,AL
cs A0 A1
8253 (2)设计8253的控制程序。(5分) 计数初值=2000/[1000/(20+20)]=80=50H .MODEL TINY T1-8253 EQU 0F001H CON-8253 EQU 0F003 STACK 100 .CODE
STAR: MOVE DX,CON-8253
f=2000HZ GATE1=5v OUT1
MOVE AL,56H OUT DX,AL MOV DX,T1-8253 MOV AL,50H OUT DX,AL END STAR