Lecture 2 Flashcards
Describe the hardware interrupts
The hardware interrupt occurs by the interrupt request signal from peripheral circuits.
The hardware interrupts has an external interrupt and internal interrupts
Describe the software interrrupts
the software interrupt occurs by executing a dedicated instruction.
What is the main difference between maskable and non maskable interrupt
Maskable interrupt is a hardware interrupt that can be disabled or ignored by the instructions of CPU
While;
A non-maskable interrupt is a hardware interrupt that cannot be disabled or ignored by the instructions of CPU.
Mention other comparisions between maskable and non maskable interrupts
- NMI cannot be masked off or made pending while MI can be masked off or made pending
- NMI disables all maskable interrupts while MI does not disables all non maskable interrupts
- NMI is used or emergency purposes like power failure or smoke detector while the MI is used to interface peripherals
- NMI has higher priority while MI has lower prority
- NMI is vectored while MI is vectored or non vectored
- NMI response time is low while MI response time is high
What is a watchdog timer>
A watchdog timer (WDT) isa timer that monitors microcontroller unit (MCU) programs to see if they are out of control or have stopped operating.
Describe instruction formats
Instruction formats provide computer guidelines to perform tasks. Basically instruction formats consist of two units of information.
The operations to be performed (such as ADD, LOAD, MOVE etc. ) and
the address of the operand (data that is to be operated upon).
OPERATION||OPERAND ADDRESS
Mention the two enconding formats that are presents in most computer architectures
Fixed lenghts: very computer instruction is represented using the same number of bytes,
Variable Lenght format
Mention the most common instructinon formats
Zero operand
OPCODE only
One operand (usually a memory address)
OPCODE + 1 Address
Two operands (usually registers, or one register and one memory address)
OPCODE + 2 Addresses
Three operands (usually registers, or combinations of registers and memory)
OPCODE + 3 Addresses
define address modes
Addressing mode refers to the mechanism employed for specifying operands.
Mention types of addressing modes
Direct
Indirect
Indexed
Relative
Intermediate
Describe Direct
Only one memory reference is needed and the operand’s address is contained in the instruction.
Describe Indirect
Two memory references are needed.
Describe indexed
A constant is added to the contents of a register known as the index register in order to determine the operand’s address
Describe relative
The program counter (PC) takes the place of the index register, otherwise it is identical to indexed addressing.
Describe Immediate
The operand’s value is directly specified in the instruction itself.