03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INTERRUPT CONTROL UNIT<br />

;Now start the master initialization<br />

MOV DX, MPICP0 ;ICW1 for the slave is accessed<br />

;thru MPICP0<br />

XOR AH, AH ;Clear reserved bits<br />

MOV AL, 10001B ;Edge trigger, cascade mode,<br />

;IC4 required<br />

OUT DX, AL<br />

;Now set base interrupt type at 20H (Type 32) for the master module in ICW2.<br />

;This creates a contiguous block for the interrupt control unit<br />

;from type 20H to type 2FH.<br />

MOV DX, MPICP1 ;ICW2 is accessed thru MPICP1<br />

MOV AL, 20H ;Base type is 20H (Type 32)<br />

OUT DX, AL<br />

;Now program the master cascade configuration register in ICW3<br />

MOV DX, MPICP1 ;ICW3 is also thru MPICP1<br />

MOV AL, 80H ;Slave module is always on IR7<br />

OUT DX, AL<br />

;ICW4 completes the initialization<br />

MOV DX, MPICP1 ;ICW4 is also thru MPICP1<br />

MOV AL, 1B ;No special fully nested mode,<br />

;no AEOI mode, factory test codes<br />

;set correctly<br />

OUT DX, AL<br />

;Initialization is now complete. we can unmask global interrupts.<br />

STI<br />

BOOT_ROM ENDS<br />

Example 8-1. Initializing the Interrupt Control Unit (Continued)<br />

8-49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!