Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
My First Studio Project Download the Atmel Studio software using the instructions on the Atmel website Save a copy of the “Atmel Studio Debugger Setting” from my website in a convenient location Double click the Atmel Studio desktop icon (or select from the menu) You should get the following window (you may get a “tips of the day” window also, close it) Select New Project Select Assembler on the left pane and then select AVR Assembler Project from the list Give your project a name Choose a location Let the solution name default Check the box to create a directory for the solution NOTE: You can use 1 project for the whole semester. You will simply create different assembly files for each program Click OK The Device Selection window will pop up Scroll down the window and select ATmega328 Click OK The SW will then create your project A sample assembly program is loaded called “main.asm” This program increments register 16 in an infinite loop Note that in the Solution Explorer pane the file name main.asm has a red arrow, this indicates that this is the file to be assembled and simulated Compile the program by selecting Build -> Build Solution You should see the compile results in the Output pane at the bottom of the window Build succeeded. ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== Start the debugger by selecting Debug -> Start Debugging and Break The first time you do this in a project you will get a popup window telling you to “Please select a connected tool and interface and try again” Click continue Select simulator on the pulldown menu Close the My356Project* (your project name will be different) tab Select Tools -> options -> Import and Export Settings Check the “use team settings file:” and then enter the path and file for the Atmel Studio Debugger Settings file you saved in the second step. Re-try to start debugging (Debug -> Start Debugging and Break) This should work this time (if you get a floating window labeled Memory4 just close it Note that the yellow arrow(PC) is pointing to the first instruction (inc r16) and r16=0 in the Registers pane Click the “down arrow dot” icon next to the eye glasses icon several times Watch the PC loop between the inc command and the rjmp command while r16 grows Select Debug-> Stop Debugging Then File-> Exit