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 />

Non-Alike Access Recovery Time (T CHCL ) refers to the recovery time required by the 82C59A-2<br />

between accesses of different types (e.g., a RD followed by a WR or a WR followed by an INTA).<br />

This problem is more complicated than the back-to-back read or write recovery time because the<br />

programmer does not typically have control over the INTA signal. The only way to avoid violating<br />

this specification for INTA is to disable interrupts during reads or writes to the 82C59A-2 and<br />

re-enable interrupts only after recovery time has elapsed. The “JMP $+2” method may be used<br />

for wait states between reads and writes.<br />

8.7 MODULE EXAMPLES<br />

Example 8.1 is a template for system initialization. Follow this template closely when designing<br />

your system software. Failure to initialize the 8259A modules correctly will result in system failure<br />

and potential system damage.<br />

Example 8.2 shows the code necessary to issue an End-of-Interrupt (EOI) command. Note the<br />

clearing of the Interrupt Request Register bit to prevent unrequested interrupts from occurring.<br />

Example 8.3 illustrates the use of the Poll command in lieu of normal interrupt servicing.<br />

MOD186<br />

NAME <strong>80C186EC</strong>_ICU_INITIALIZATION_TEMPLATE<br />

;The following code would typically be found in the boot section<br />

;of the system software.<br />

;It is assumed that the equates for the pcb register mnemonics<br />

;are in the include file “pcb_equates.inc”<br />

$INCLUDE (PCB_EQUATES.INC)<br />

BOOT_ROM SEGMENT ;This is the boot rom code<br />

ASSUME CS:BOOT_ROM, DS:NOTHING<br />

;First, ensure that all external interrupts are disabled.<br />

CLI<br />

;Clear CPU interrupt enable<br />

;Set up interrupt vector table. We only show the initialization of the timer 0<br />

;vector. The timer 0 vector type is set to 28h (Type 40) in the slave 8259a<br />

;initialization.<br />

;Your system code needs to initialize all vectors for the 8259a modules and<br />

;all exceptions and traps.<br />

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

8-47

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

Saved successfully!

Ooh no, something went wrong!