Coa INTERUPT

29
Computer organization & architecture Interrupt signals and working(8085 or 8086)

Transcript of Coa INTERUPT

Page 1: Coa INTERUPT

Computer organization & architecture

Interrupt signals and working(8085 or 8086)

Page 2: Coa INTERUPT

What is a microprocessor? What are its functions? How was it invented? 

Read on to know about one of the greatest wonder of electronics.

A brief history on Microprocessors

Page 3: Coa INTERUPT

A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components.

 Everything a computer does is described by lots of precise instructions, and microprocessors carry out these instructions at incredible speed—many millions of times a second.

What is a microprocessor?

Page 4: Coa INTERUPT

 Single board micro computers Personal Computers Communication  Instrumentation Control Office Automation and Publication Among others.

Applications of Microprocessors

Page 5: Coa INTERUPT

The world's first microprocessor, the 4004, was co-developed by Busicom, a Japanese manufacturer of calculators, and Intel, a U.S. manufacturer of semiconductors

The Worlds First.

Page 6: Coa INTERUPT

Intel 4004 (4 bit microprocessor and it was not a powerful microprocessor)

 Intel 8080 (was the first microprocessor to make it to Home computers, It was introduced during the year 1974 and it could perform 8 bit operations)

Intel 8085 (Came out in the year 1976, it was an update of 8080 processors.

Intel 8086 (Came out during the year 1976. The major difference between 8085 and 8086 processor is that 8085 is an 8 bit processor, but 8086 processor is a 16 bit processor.

Microprocessor timeline.

Page 7: Coa INTERUPT

Intel 8087 Intel 8088 processor ( It was the first to be

incorporated into IBM personal computers)

As the years progressed lots of processors from 8088,80286,80386,80486,Pentium II, Pentium III, Pentium IV and now Core2Duo,Dual Core and Quad core processors are the latest in the market.

Page 8: Coa INTERUPT

Apart from Intel, there are some other manufacturers who produce Microprocessor chips. Such manufacturers are called second source manufacturers.

The second source manufacturers include: AMD Mitsubishi NEC OKI Toshiba Siemens

Second source Manufacturers.

Page 9: Coa INTERUPT

In  year 1976, Intel introduced the 8085 microprocessor.

the 8085 microprocessor is an update of 8080 processors.

8080 processors are updated by adding two Enable/Disable Instructions, Three added interrupt pins and serial I/O pin

Intel introduced 8086 pins during the year 1976. The major difference between 8085 and 8086 processor is that 8085 is an 8 bit processor, but 8086 processor is a 16 bit processor.

The Intel 8085 microprocessor

Page 10: Coa INTERUPT

What is an interupt?

An interrupt is a signal or condition that causes the executing program

to stop, save its state, and do a function call to service the signal or

condition.

Page 11: Coa INTERUPT

Once the servicing is complete, the service routine does a return from interrupt sequence, effectively a return from function call, that allows the processor to continue doing what it was doing before the interrupt. 

Page 12: Coa INTERUPT

Maskable interrupts. non-maskable interrupts.

Interrupts in the 8085 microprocessor

Page 13: Coa INTERUPT

Difference between maskable and non-maskable interrupt?

the interrupt which can be ignored by the processor ,while performing its operations are called maskable interrupts

Non-maskable interrupts do not get gated by the interrupt control register -- they ALWAYS interrupt, no matter what state your processor is in. Typically these are used for CRITICIAL or FATAL conditions, or for system reset functions. If your system gets stuck in an infinite loop with interrupts disabled, the NMI is your last hope to reset the system.

Page 14: Coa INTERUPT

Software interrupts. Hardware interrupts.

There are 2 type of interrupts.

Page 15: Coa INTERUPT

Interrupt generated by executing an instruction is called software interrupt. It's also called 'trap'. Software interrupts are generally used to make system calls i.e. to request operating system to perform an I/O operation or to run a new program. 

Software interrupts

Page 16: Coa INTERUPT

Examples:C++: A cout or cin statement would generate a software interrupt because it would make a system call to print something.

A fork() statement in Linux would generate a software interrupt because it would make a system call to create a new process.

Assembly IA32: The instruction int 21h would generate a software interrupt which would request something from operating system (depending on the register values). 

Software interrupts Examples.

Page 17: Coa INTERUPT

Hardware interrupts are generated by hardware devices when something unusual happens; this could be a keypress or a mouse move or any other action.

Hardware interrupts.

Page 18: Coa INTERUPT
Page 19: Coa INTERUPT

• People like connecting devices • A computer is much more than the CPU • Keyboard, mouse, screen, disk drives • Scanner, printer, sound card, camera, etc. • These devices occasionally need CPU service • But we can’t predict when • External events typically occur on a macroscopic timescale • we want to keep the CPU busy between events FNeed a way for CPU to find out devices need attention

Why do we need interrupts?

Page 20: Coa INTERUPT

They are 

TRAP RST 7.5 RST6.5 RST5.5 INTR INTA

6 pins are available in 8085 for interrupt:

Page 21: Coa INTERUPT

A software interrupts is a particular instructions that can be inserted into the desired location in the rpogram. There are eight Software interrupts in 8085 Microprocessor. From RST0 to RST7.

RST0 RST1 RST2 RST3 RST4 RST5 RST6 RST7

Software Interrupts

Page 22: Coa INTERUPT

They allow the microprocessor to transfer program control from the main program to the subroutine program. After completing the subroutine program, the program control returns back to the main program.

Page 23: Coa INTERUPT

TRAP:-It is non maskable edge and level triggered interrupt. TRAP has the highest priority and vectores interrupt. Edge and level triggered means that the TRAP must go high and remain high until it is acknowledged. In case of sudden power failure, it executes a ISR and send the data from main memory to backup memory.

Hardware interrupts

Page 24: Coa INTERUPT

RST7.5:-It has the second highest priority. It is maskable and edge level triggered interrupt. The vector address of this interrupt is 003CH. Edge sensitive means input goes high and no need to maintain high state until it is recognized.

Page 25: Coa INTERUPT

RST6.5 and RST5.5:-These are level triggered and maskable interrupts. 

.INTR:-It is level triggered and maskable interrupt. It has the lowest priority. It can be disabled by reseting the microprocessor or by DI and SIM instruction.

Page 26: Coa INTERUPT

We can calculate the vector address of these interrupts using the formula given below:

                                                      Vector Address = Interrupt

Number * 8 So we can find simply vector address. For Example:

RST2:        vector address=2*8    =  16 RST1:        vector address=1*8    =  08 RST3:        vector address=3*8    =  24

Vector calculation of interrupt address’s

Page 27: Coa INTERUPT

Software interrupts vector Address

Page 28: Coa INTERUPT

Hardware interrupts Vector address

Page 29: Coa INTERUPT