Exercise 6: Kinetis Car Windscreen Wiper with Interrupts

Document created by peterurbanek on May 14, 2014
Version 1Show Document
  • View in full screen mode

To do: Same as exercise 5 but now with interrupts.

 

In this exercise, you realize a windscreen wiper with the Tower. The LEDs simulate the moving wiper by running from left to right and back again.

The user interface is simple: With pushbutton1, the time delay interval is increased in steps of 1 second starting from 5 seconds delay down to 1 second and further to continuous wiping. With pushbutton2 the delay is decreased in the same way.

If the delay is decreased, the wiper should start immediately, because right now there is a need for wiping. This is not true for increasing the delay. In this case, wait till the current delay time is over, set the new delay. In technical terms: Use asynchronous interval reset for decrease and synchronous reset for increase.

 

Use the timer and the port interrupts for the pushbuttons in this Kinetis exercise.

 

Result: TWR_K60_wiper_int.zip

Attachments

Outcomes