Exercise 5: Kinetis Car Windscreen Wiper with Polling

Document created by peterurbanek on May 14, 2014Last modified by ebiz_ws_prod on Dec 13, 2017
Version 3Show Document
  • View in full screen mode

To do:


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 active wait loops instead of the timer in this Kinetis exercise.

Hint: Have you already switched a case?


Result: TWR_K60_wiper_poll.zip

Original Attachment has been moved to: TWR_K60_wiper_poll.zip