Looking for COMP317-Fall25-01-CE-EMBEDDED SYSTEMS test answers and solutions? Browse our comprehensive collection of verified answers for COMP317-Fall25-01-CE-EMBEDDED SYSTEMS at learn.hub.ku.edu.tr.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
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).
Procedure:
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.
Double_Click:
Repeat Task 2, but this time, the rate switch should occur after a “double-click” instead of a single one (as in double-clicking a mouse button, typically executed in 0.5 seconds.) As in Task 2, you need to implement debouncing in software.
Procedure:
Write a lab report describing your design and implementation, and submit it as a file upload below. A lab report template is available online, which you can use as needed.
Light_Move_Control:
Your task is to create a moving light effect by controlling all LEDs and letting only two active (on) LEDs move one from left-to-right and one from right-to-left continuously (that is, the displayed bit patterns will cycle as $81, $42, $24, $18, $18, $24, $42, $81, $00,....). The speed of the moving-light effect will be controlled by pressing one of the buttons on Port B 0-4 with the following functionality.
Procedure:
Part 3: Getting familiar with the Easy AVR v7 development board and assembly programming
Part 2: Getting familiar with the Easy AVR v7 development board
Write your answers for each question below (specify the line numbers of each question) in the following answer part.
Part 1: Getting familiar with Atmel/Microchip Studio
Write your answers for each question below (specify the line numbers of each question) in the following answer part.
;*************************************************************************************;* ;* File Name : "lab0.asm";* Title : ELEC/COMP 317 first program;* Date : Februrary 19, 2021;* Version : 1.0;* Target MCU : ATmega32;*;* DESCRIPTION;*;* A simple program that turns off LEDs on the EasyAVR Development Kit;* when the corresponding button is pressed.;*
;*************************************************************************************rjmp RESET ; Set up the reset vector.
; Other vector setup really should go here...
RESET:
ldi R16, $FF ; All ones makesout DDRB, R16 ; port B all outputsldi R16, $00 ; All zeros makesout DDRD, R16 ; port D an input
LOOP:in R16, PIND ; Read buttons from port Dcom R16 ; 1`s complementout PORTB, R16 ; Output value of buttons to port Brjmp loop ; Forever