Starting from:
$30

$24

HOMEWORK No. 8 Solution

Read Chapter 9 in the textbook




What is the purpose of an interrupt?



Describe the flow of events when an interrupt occurs.



Describe the interrupt features available with the Atmega328P.



What is interrupt priority? How is it determined?



What steps are required by the system designer to properly configure an interrupt?



How is the interrupt system turned "on" and "off"?



Write a program to set up timer1 using NORMAL mode so that it generates an interrupt in exactly 1/8 of a second. Write an interrupt service routine (ISR), triggered by the timer interrupt TOV1 that stops, resets, and restarts the timer and toggles the Arduino Mega LED each time it is called. This will produce a light that blinks 4 times/sec.



Change your first program and ISR (in 7.) so that the timer now generates an interrupt in 1/100,000 of a second. You won't be able to see the light switching of course, but using the oscilloscope, measure the signal frequency and pulse width to determine how accurately the microcontroller can perform this task.

More products