Question: 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
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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
