Team:Net_Bug
7/22/2018 Joyanta kumar Sarker 1
What is Interrupt ?
An interrupt is a signal from a device
attached to a computer or from a
program within the computer that
requires the operating system to stop
and figure out what to do next.
7/22/2018 Joyanta kumar Sarker 2
Types Of Interrupt
1.Software Interrpt
2.Hardware Interrupt
Maskable Interrupt
Non-Maskable Interrupt
7/22/2018 Joyanta kumar Sarker 3
Diagram of Interrupt
Interrupt
Hardware
Maskable
Non-
Maskable
Software
256 Types of
Software
Interrupt
7/22/2018 Joyanta kumar Sarker 4
Hardware Interrupt
Hardware interrupts are generated
by hardware devices when
something unusual happens; this
could be a keypress or a mouse
move or any other action.
7/22/2018 Joyanta kumar Sarker 5
Software Interrupt
A software interrupt is a type of interrupt that is
caused either by a special instruction in the
instruction set or by an exceptional condition
in the processor itself.
7/22/2018 Joyanta kumar Sarker 6
Those interrupts whose request can be denied by
microprocessor.
- -RST 1, RST2, RST 5, RST 6.5 etc..
7/22/2018 Joyanta kumar Sarker 7
Non-Maskable Interrupt
Interrupts whose request cannot be
denied.
eg -RST 4.5
 -TRAP
 -RESET IN.
7/22/2018 Joyanta kumar Sarker 8
7/22/2018 Joyanta kumar Sarker 9
Differences between Maskable and Non-Maskable
7/22/2018 Joyanta kumar Sarker 10
RIM(Read Interrupt Mask )
RIM is a multipurpose instruction used to
 Read the status of interrupts 7.5, 6.5, 5.5
To read serial input data bit.
Loads 8-bit data in the accumulator.
RIM does the following three tasks:
1. Read the interrupt mask (bit 2, 1, 0).
2. Identify pending interrupts (bit 6, 5, 4).
3. Receive serial input data bit (bit 7).
Joyanta kumar Sarker 117/22/2018
SIM(Set Interrupt Mask)
Can mask or unmask RST5.5, RST6.5, andRST7.5
Reset the pending RST7.5 flip flop
Set or reset the SOD(Serial Output Data) pin.
SIM does the following three tasks:
1. Mask the interrupts (bit 2, 1, 0).
2. Reset RST 7.5 (bit 4).
3. To implement serial I/O (bit 7, 6).
Joyanta kumar Sarker 127/22/2018
TRAP
TRAP is a non-maskable interrupt having the highest priority among all
interrupts. It consists of both level as well as edge triggering and is used
in critical power failure conditions. It is enabled until it gets acknowledged.
This interrupt transfers the control to the location 0024H.
RST7.5
It is a maskable interrupt, having the second highest priority among all
interrupts. When this interrupt is executed, the processor saves the content
of the PC register into the stack and branches to 003CH address.
Joyanta kumar Sarker 137/22/2018
RST 6.5
It is a maskable interrupt, having the third highest priority among all
interrupts. When this interrupt is executed, the processor saves the content
of the PC register into the stack and branches to 0034H address.
RST 5.5
It is a maskable interrupt. When this interrupt is executed, the processor
saves the content of the PC register into the stack and branches to 002CH
address.
Joyanta kumar Sarker 147/22/2018
SIM INSTRUCTION
Set Interrupt Musk
Controls Hardware Interrupts
Implicit addressing mode
7/22/2018 Joyanta kumar Sarker 15
How SIM Interprets the Accumulator
7/22/2018 Joyanta kumar Sarker 16
SIM and the Interrupt Mask
 To set making bit for interrupt RST 7.5, RST 6.5 , RST 5.5
 To reset RST 7.5 flip-flop
 To implement serial input output
7/22/2018 Joyanta kumar Sarker 17
DMA
Direct memory access (DMA) is a feature of computer systems that
allows certain hardware subsystems to access Memory , independent of
the (CPU).
DMA is also used for intra-chip data transfer in multi-core processors.
DMA can also be used for "memory to memory" copying or moving of
data within memory. DMA can offload expensive memory operations.
7/22/2018 Joyanta kumar Sarker 18
Advantages of DMA
 Computer system performance is improved by direct transfer of data between memory and I/O
devices
 CPU is free to perform operations that do not use system buses
Disadvantages of DMA
 In case of burst mode data transfer, the CPU is rendered inactive for relatively long periods of time.
7/22/2018 Joyanta kumar Sarker 19
Maskable Interrupt Process
 Enabled using the EI instruction.
 checks for every instruction
 If there is an interrupt, and if the interrupt is enabled using the
interrupt mask, the microprocessor will complete the executing
instruction, and reset the interrupt flip flop.
7/22/2018 Joyanta kumar Sarker 20
Masking RST 5.5, RST 6.5 and RST
7.5
 These three interrupts are masked at two levels:
 EI/DI instructions.
 The Interrupt Enable flip flop controls the whole maskable interrupt process.
 Through individual mask flip flops that control the availability of the
individual interrupts.
 These flip flops control the interrupts individually.
7/22/2018 Joyanta kumar Sarker 21
Maskable Interrupts and vector locations
7/22/2018 Joyanta kumar Sarker 22
EI ( Enable Interrupt )
This is a 1 byte instruction .
The instruction sets the interrupt enable flip-
flop & enables the interrupt process .
System reset or an interrupt disables the
interrupt process .
7/22/2018 Joyanta kumar Sarker 23
DI ( Disable Interrupt )
This is a 1 byte instruction .
The instruction resets the interrupt enable flip-
flop & disable the interrupt .
It should be included in a program segment .
7/22/2018 Joyanta kumar Sarker 24

Interrupt

  • 1.
  • 2.
    What is Interrupt? An interrupt is a signal from a device attached to a computer or from a program within the computer that requires the operating system to stop and figure out what to do next. 7/22/2018 Joyanta kumar Sarker 2
  • 3.
    Types Of Interrupt 1.SoftwareInterrpt 2.Hardware Interrupt Maskable Interrupt Non-Maskable Interrupt 7/22/2018 Joyanta kumar Sarker 3
  • 4.
    Diagram of Interrupt Interrupt Hardware Maskable Non- Maskable Software 256Types of Software Interrupt 7/22/2018 Joyanta kumar Sarker 4
  • 5.
    Hardware Interrupt Hardware interruptsare generated by hardware devices when something unusual happens; this could be a keypress or a mouse move or any other action. 7/22/2018 Joyanta kumar Sarker 5
  • 6.
    Software Interrupt A softwareinterrupt is a type of interrupt that is caused either by a special instruction in the instruction set or by an exceptional condition in the processor itself. 7/22/2018 Joyanta kumar Sarker 6
  • 7.
    Those interrupts whoserequest can be denied by microprocessor. - -RST 1, RST2, RST 5, RST 6.5 etc.. 7/22/2018 Joyanta kumar Sarker 7
  • 8.
    Non-Maskable Interrupt Interrupts whoserequest cannot be denied. eg -RST 4.5  -TRAP  -RESET IN. 7/22/2018 Joyanta kumar Sarker 8
  • 9.
  • 10.
    Differences between Maskableand Non-Maskable 7/22/2018 Joyanta kumar Sarker 10
  • 11.
    RIM(Read Interrupt Mask) RIM is a multipurpose instruction used to  Read the status of interrupts 7.5, 6.5, 5.5 To read serial input data bit. Loads 8-bit data in the accumulator. RIM does the following three tasks: 1. Read the interrupt mask (bit 2, 1, 0). 2. Identify pending interrupts (bit 6, 5, 4). 3. Receive serial input data bit (bit 7). Joyanta kumar Sarker 117/22/2018
  • 12.
    SIM(Set Interrupt Mask) Canmask or unmask RST5.5, RST6.5, andRST7.5 Reset the pending RST7.5 flip flop Set or reset the SOD(Serial Output Data) pin. SIM does the following three tasks: 1. Mask the interrupts (bit 2, 1, 0). 2. Reset RST 7.5 (bit 4). 3. To implement serial I/O (bit 7, 6). Joyanta kumar Sarker 127/22/2018
  • 13.
    TRAP TRAP is anon-maskable interrupt having the highest priority among all interrupts. It consists of both level as well as edge triggering and is used in critical power failure conditions. It is enabled until it gets acknowledged. This interrupt transfers the control to the location 0024H. RST7.5 It is a maskable interrupt, having the second highest priority among all interrupts. When this interrupt is executed, the processor saves the content of the PC register into the stack and branches to 003CH address. Joyanta kumar Sarker 137/22/2018
  • 14.
    RST 6.5 It isa maskable interrupt, having the third highest priority among all interrupts. When this interrupt is executed, the processor saves the content of the PC register into the stack and branches to 0034H address. RST 5.5 It is a maskable interrupt. When this interrupt is executed, the processor saves the content of the PC register into the stack and branches to 002CH address. Joyanta kumar Sarker 147/22/2018
  • 15.
    SIM INSTRUCTION Set InterruptMusk Controls Hardware Interrupts Implicit addressing mode 7/22/2018 Joyanta kumar Sarker 15
  • 16.
    How SIM Interpretsthe Accumulator 7/22/2018 Joyanta kumar Sarker 16
  • 17.
    SIM and theInterrupt Mask  To set making bit for interrupt RST 7.5, RST 6.5 , RST 5.5  To reset RST 7.5 flip-flop  To implement serial input output 7/22/2018 Joyanta kumar Sarker 17
  • 18.
    DMA Direct memory access(DMA) is a feature of computer systems that allows certain hardware subsystems to access Memory , independent of the (CPU). DMA is also used for intra-chip data transfer in multi-core processors. DMA can also be used for "memory to memory" copying or moving of data within memory. DMA can offload expensive memory operations. 7/22/2018 Joyanta kumar Sarker 18
  • 19.
    Advantages of DMA Computer system performance is improved by direct transfer of data between memory and I/O devices  CPU is free to perform operations that do not use system buses Disadvantages of DMA  In case of burst mode data transfer, the CPU is rendered inactive for relatively long periods of time. 7/22/2018 Joyanta kumar Sarker 19
  • 20.
    Maskable Interrupt Process Enabled using the EI instruction.  checks for every instruction  If there is an interrupt, and if the interrupt is enabled using the interrupt mask, the microprocessor will complete the executing instruction, and reset the interrupt flip flop. 7/22/2018 Joyanta kumar Sarker 20
  • 21.
    Masking RST 5.5,RST 6.5 and RST 7.5  These three interrupts are masked at two levels:  EI/DI instructions.  The Interrupt Enable flip flop controls the whole maskable interrupt process.  Through individual mask flip flops that control the availability of the individual interrupts.  These flip flops control the interrupts individually. 7/22/2018 Joyanta kumar Sarker 21
  • 22.
    Maskable Interrupts andvector locations 7/22/2018 Joyanta kumar Sarker 22
  • 23.
    EI ( EnableInterrupt ) This is a 1 byte instruction . The instruction sets the interrupt enable flip- flop & enables the interrupt process . System reset or an interrupt disables the interrupt process . 7/22/2018 Joyanta kumar Sarker 23
  • 24.
    DI ( DisableInterrupt ) This is a 1 byte instruction . The instruction resets the interrupt enable flip- flop & disable the interrupt . It should be included in a program segment . 7/22/2018 Joyanta kumar Sarker 24