主片初始化程序段:MOV AL,00010001B ;ICW1:边沿,ICW4,ICW3OUT 20H, AL ;写入ICW1MOV AL, 00001111B ;ICW2:IR7中断类型号为0FHOUT 21H, AL ;写入ICW2MOV AL, 00000100B ;ICW3:主片IR2接从片INTOUT 21H, AL ;写入ICW3MOV AL, 00000101B ;ICW4:无缓冲,非正常中断结束
OUT 21H, AL ;写入ICW4
从片初始化程序段:MOV AL,00010001B ;ICW1:边沿,ICW4,ICW3OUT 0A0H, AL ;写入ICW1MOV AL, 01110001B ;ICW2:IR0中断类型号为71HOUT 0A1H, AL ;写入ICW2 MOV AL, 00000010B ;ICW3:从片接主片的IR2OUT 0A1H, AL ;写入ICW3MOV AL, 00000001B ;ICW4:非缓冲,非正常结束,
OUT 0A1H, AL ;写入ICW4
2022-11-15 10:16:44
7.02MB
微机
1