logo

Crowdly

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

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

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.

Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на learn.hub.ku.edu.tr?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome