Search This Blog

Saturday, May 7, 2011

8085 Interrupts theory and instruction(short)

The interrupt I/O is a process of data transfer whereby an external device or a peripheral can inform a proccessor that it is ready for communication and it request attention.
The interrupt is not an order to the processor to do an action its a request to listen to the action and do if feasible.
The 8085 has 4 Maskable and 1 Non Maskable interrupt.
Interrupts           Call Location
1) Trap -------->    Pre Fixed (0024h)
2) RST 7.5 --------> Pre Fixed (003Ch)
3) RST 6.5 --------> Pre Fixed (0034h)
4) RST 5.5 --------> Pre Fixed (002Ch)
5) INTR -------->    Provided by device

Number 1,2,3,4,5 shows priority.

The first four are vectored interrupts meaning when activated jumps to specified location.

The last one is non vectored meaning the call location needed to be provided by the device.

The microprocessor can ignore or delay a maskable interrupt request if it is performing some critical task; however it has to respond to non maskable interrupt request immediately.

Instruction used in interrupts.
DI - Disable interrupt
-->> Bytes - 1
-->> M-cycles - 1
-->> T-states - 4
-->> Description - The interrupt enable flip flop is reset and all the interrupts except the TRAP are disabled.
-->> Use - This is commonly used when the execution of a code sequence cannot be interrupted. For example in critical time delays, this instruction is used at the beggining of the code and
interrupts are enabled at the end of the code.

EI - Enable Interrupt
-->> Byte - 1
-->> M-cycles - 1
-->> T-states - 4
-->> Description - The interrupt enable flip flop is set and all interrupts are enabled.
-->> Use - After a system reset or the acknowledgement of an interrupt, the interrupt Enable flip flop is reset, thus disabling the interrupts. This instruction is necessary to re enable the instruction.

TRAP, a non mask able interrupt known as NML.
It has highest priority among interrupt signals, need not be enabled or disabled.
It is level and edge sensitive trigger, meaning that input should go HIGH and stay HIGH to be acknowledged.
It cannot be acknowledged again until it makes a transition from HIGH to LOW to HIGH.
TRAP is generally used for critical events like power failure and emergency shutdown.

Set Interrupt Mask.

Format of SIM in Accumulator

Read Interrupt Mask

Format of RIM in Accumulator
Interrupt Table in Short

No comments:

Post a Comment