To do:
The development platform is Eclipse. The EVAL Board is the Kinetis Tower TWR K60. On the Tower, you find 2 pushbuttons and 4 LEDs.
a) Generate a hexadecimal random number from 0x0 to 0xF as long as pushbutton1 is pressed. Display the result with the 4 LEDs for about 3 seconds.
b) Replace the code for recognizing a pressed key by a macro "KEY1_PRESSED".
c) Replace the access to the 4 LEDs by a macro "LEDx_TOGGLE" with x = 0...3".
Use active wait loops instead of the timer in this Kinetis exercise.
Result: TWR_K60_RANDOM.zip