logo

Crowdly

Browser

Додати до Chrome

Part 1: Getting familiar with Atmel/Microchip Studio Write your answers for ea...

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

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.

  1. Make sure that Atmel/Microchip Studio is installed on your computer.
  2. Start the “Atmel/Microchip Studio” program on your PC.
  3. Initiate a new project from File -> New -> Project, choose “Assembler” from “Installed”, browse your Lab0 drive location in “Location” at the bottom, and edit the name as “lab0-lastname”.
  4. Choose “ATmega32” as the device in the next window.
  5. Copy the content of the below “lab0.asm and paste it to your new “main.asm” window in Atmel Studio.
  6. Open the “Project” tab and choose “lab0-lastname Properties”. In the “Tool” tab, choose “Simulator” in the “Selected debugger/programmer” menu. Close the properties tab.
  7. Assemble (Build -> Build Solution)
  8. In the "Debug" tab, press the “Start Debugging and Break (Alt + F5)” and start pressing the F10 button to see the steps of the simulation. What do you observe? What is happening in the loop? Write down your observations in the answer part.
  9. Keep trying the "Run to Cursor" and "Reset" controls under the "Debug" tab. Write down your observations in the answer part.
  10. While debugging the code, observe register R16 in the "Processor Status" window, which should be on the right or can be accessed with the "Processor Status" icon on the menu above. What is happening to R16? Write down your observations in the answer part.
  11. There is a "Cycle Counter" field in the "Processor Status" window. Observe its characteristics as you run the code step-by-step in Debug mode, and write down your observations in the answer section.
  12. On the menu above find "Registers", "Memory", and "I/O" icons, and observe what they display. Write down your observations in the answer part.
  13. Show and demo your environment to the instructor/TA.
  14. Part 1 is all done. Thanks.

;*************************************************************************************

;*

;* 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 makes

out DDRB, R16 ; port B all outputs

ldi R16, $00 ; All zeros makes

out DDRD, R16 ; port D an input

LOOP:

in R16, PIND ; Read buttons from port D

com R16 ; 1`s complement

out PORTB, R16 ; Output value of buttons to port B

rjmp loop ; Forever

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

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

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

Browser

Додати до Chrome