There is only one deliverable for this assignment. For full credit, complete the assignment using only assembly. For half credit on the entire assignment, use C. It may be wise to implement in C first, then rewrite in assembly.
Connect two buttons, a red LED and a green LED to your Pico. If you do not have these colors, substitute two different colors or borrow from the instructor or the stock room.
One button (counter) is used to set the number of times the green LED should blink, the other (record) is to enter record mode. When the record button is pressed, the red LED should turn on. The Pico should count the number of times the counter button is pressed until the record button is pressed again. The red LED should be turned off when not in record mode. When not in record mode, the pico should be in blink mode: the green LED should blink (suggestion: 100ms on, 100ms off) the number of times counted in the most recent record mode, pause for one second, then repeat the count. When in blink mode, the system should check for a record button press when possible but does not have to respond instantaneously. It should respond within one blink cycle. There does not need to be an interrupt for the record button, although using an interrupt would provide a more elegant solution.
Example sequence:
Code
Demo (HALF CREDIT FOR C IMPLEMENTATION)