Blinky subroutine USER Push Button to the blue LED on Discovery Board
Create an assembly project as per Lab 2. This project is called blinky and is saved in a folder called Blinky. Your assembly program should be called blinky.s. You will be able to use a substantial amount of code from echo.s.
Write your assembly program as follows:
• Enable the I/O Port A and Port C clocks.
• The blue LED port (PC8) pin should have configuration of general purpose output push-pull and mode of output maximum speed 10MHz.
• Use GPIOA_IDR to continuously read the status of the push button and Flash the Blue LED (PC8) once per second:
• When the user presses the user button (PA0) Flash the Blue LED (PC8) twice per second.
• You must use a subroutine to implement the time delay
• Choose values that give accurate timings.
Debug the project.
Press the blue USER push (PA0) button and observe the blue LED flash on/off at half second intervals. When the USER push button is released the LED will flash on/off at one second intervals
Insert appropriate comments into your code.
Upload your assembly file to Moodle.