Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What is 4-bit BCD value of 101010102? 2. What is the difference between polli

ID: 3738380 • Letter: 1

Question

1. What is 4-bit BCD value of 101010102? 2. What is the difference between polling and interupt? Use an example to describe the operation of polling and interrupt. 3. How many different interrupts does 68HC12 have? List the interrupt sources of 68HC12 4. What is maskable interrupt? 5. What is non-maskable interrupt? 6. What is the relationship between Reset and interrupt? 7. What is interrupt service routine? 8. What is interrupt vector table? How is it used by CPU? How to initialize the interrupt vector table? 9. How to enable and disable maskable interrupt? How to enable and disable non-maskable interrupt? 10. How many different interrupt service routines can 68HC12 have? 11. How does CPU know which interrupt service routine to run after getting an interrupt? 12. List step-by-step actions of the CPU when an interrupt occurs. 13. Can you call an interrupt service routine in your main program without crashing the program? Explain. 14. What is software interrupt? What is the difference between software interrupt and calling a subroutine? 15. Give an example of using the software interrupt. 16. What is interrupt priority? When is interrupt priority useful? 17. Can a higher priority-interrupt interrupt CPU while it is executing a lower priority ISR? 18. Can a lower priority-interrupt interrupt CPU while it is executing a higher priority ISR 19. Is it appropriate to include a long program code in the interrupt service routine? Why or why not?

Explanation / Answer

2)Answer:

polling:

Polling is the process where the computer or controlling device waits for an external device to check for its readiness or state, often with low-level hardware. ... Although not as wasteful of CPU cycles as busy waiting, this is generally not as efficient as the alternative to polling, interrupt-driven I/O

->CPU constantly checks device status whether it needs CPU's attention.

->It is a Protocol

->In poling CPU services the device

->Comand-ready bit indicates the device needs servicing.

->CPU has to wait and check whether a device needs servicing which wastes lots of CPU cycles

->CPU polls the devices at regular interval.

->Polling becomes inefficient when CPU rarely finds a device ready for service

->Constantly keep on opening the door to check whether anybody has come.

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. ... The computer simply takes turns managing the programs that the user starts

->Device notify CPU that it needs CPU attention.

->An interrupt is a hardware mechanism.

->Interrupt-request line indicates that device needs servicing

->CPU is disturbed only when a device needs servicing, which saves CPU cycles

->An interrupt can occur at any time

->Interrupt becomes inefficient when devices keep on interrupting the CPU repeatedly

->Let the bell ring then open the door to check who has come

Key Differences Between Interrupt and Polling in OS

4)Answer:

Maskable interrupt:

A maskable interrupt is a one that can be suppressed by software/code. That is to say, it may be ignored. Usually there are standard interrupt masking techniques for every processor, so that it may not be interrupted while performing some crucial task. Maskable interrupts can be ignored using these methods.

5)Answer:

NMI:

a non-maskable interrupt (NMI) is a hardware interrupt that standard interrupt-masking techniques in the system cannot ignore. It typically occurs to signal attention for non-recoverable hardware errors. Non-Maskable Interrupt, NMI is the highest-priority interrupt capable of interrupting all software and non-vital hardware devices. The NMI is not commonly used and usually only used to verify if a serious error has occurred or stop all operations because of a failure. For example, when you press Ctrl+Alt+Del when the computer freezes or stops responding an NMI is sent to the CPU.

7)Answer:

An interrupt handler, also known as an interrupt service routine (ISR), is a callback subroutine in an operating system or device driver whose execution is triggered by the reception of an interrupt.

Interrupt handler services the Device