Adding a Hardware Interrupt

8085 Circuit image showing Interrupt Connections

We Interrupt This Program...



Interrupts

Interrupts are the breaking news reports of the software world. They stop the current program, take over for a while, then return you to the previously scheduled program. Unlike television, you don't miss anything from the program that was interrupted.

Adding an Input

The TRAP Interrupt

Now that we have an output in the form of the LED hooked up to the 8085's SOD line, we should add an input. This will let us control the operation of the 8085 while it is running. The input will be a single momentary push button switch. If this doesn't seem like much, don't worry. We'll be adding a small keyboard later, in addition to other interrupt inputs.

The above image shows an interrupt input to the 8085. The orange wire going to the 8085 from the 7400 chip is the actual interrupt input. In the image, it is going to the RST7.5 input (pin 7). We'll be simplifying things for our initial program by connecting it to the TRAP input (pin 6). The lower half of the 74LS00 shown above is used to condition the signal from the push button switch. The push button switch is outside the frame, it's connected to the brown/white and white/brown wires that lead off the left edge of the picture. It's a standard switch pulled from an old broken keyboard.

The TRAP input is what's called a "non-maskable interrupt." That means there's no way for the computer to ignore it. Most other interrupts can be ignored. The RST5.5, RST6.5, and RST7.5 interrupts are ignored by default (this makes the 8085 more compatible with software for the 8080A.) Rather than using an interrupt that we need to write software to enable for our initial interrupt test, we'll use TRAP so that we can avoid the extra trouble.

Here is the circuit when using a 7400-type IC with the clock (click to enlarge):

Key debounce circuit using 7400 series.

Here is the circuit when using a 7404 or 4049 type IC (click to enlarge):

Key debounce circuit using 7400 series.

Add a Hardware Interrupt Part 2: Software >>

Interrupt Page: 1  2


<< Mag-85 Home