logo

Crowdly

Single_Button_Light_Move_Control : Your second task is to modify your code for...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Single_Button_Light_Move_Control:

Your second task is to modify your code for the first task to control four different move rates by a single button (PortB 0). Each “PortB 0” press should switch the light move rate to the next rate (in the order: turn-off, slow, faster, much faster, and then turn-off).

  • Button presses should not cause random jumps between rates.
  • BUTTON4 should still be functional to change the cycling pattern. 
  • Your program should ensure that the rate switch occurs only once per button press.
  • Single-button control functionality should work for any number of “PortB 0-3” buttons pressed for any reasonable duration.
  • Your grade will depend on the quality of your implementation!

Procedure:

  1. Create a new project named last-name_lab1_task2
  2. You can start with the ASM code for Task 1.
  3. Do your modifications on the source code. Assemble. Debug as necessary.
  4. Compute your coding resources, including program size in memory (in bytes), required data memory size (in bytes), and the number of registers in use. Please report them in the textbox below.
  5. Ensure you demo the functionality to the instructor.
  6. Submit your task2.asm code from the following file upload interface.

Important Hint: When you press a button, the mechanical contacts can undergo a transient state of short-duration connections and disconnections until they reach their final state. This is called “BOUNCING.” It is possible to eliminate bouncing with “DEBOUNCING” hardware; however, in this experiment, you are expected to implement “DEBOUNCING” in software.

More questions like this

Want instant access to all verified answers on learn.hub.ku.edu.tr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome