Lab-1 Manual: 1. IDE installation You need to download Microchip Studio for AVR and SAM Devices 7.0 from the link below: https://www.microchip.com/en-us/development-tools-tools-and-software/microchip-studio-for-avr-and-sam-devices and scroll down to the bottom of the webpage and click the link to download the software:

Lab-1 Manual:

1. IDE installation

You need to download Microchip Studio for AVR and SAM Devices 7.0 from the link below:

https://www.microchip.com/en-us/development-tools-tools-and-software/microchip-studio-for-avr-and-sam-devices

and scroll down to the bottom of the webpage and click the link to download the software:

Once downloaded, follow the instructions for installation. This process is straightforward.

•For the Mac/IOS please refer to Moodle IDE installation process. If you have issues for installing the visual box, please install the windows on a different partition. https://support.apple.com/en-us/HT201468. If you have any questions, please reach out to the TAs.

1

2.Software configuration-(refer to the document: “C Programming AtmelStudio7”)

Please open the Microchip Studio from the Start Menu.

2

3

4

3. C code programming for testing. (blink the LEDs on developer board)

4. Build and compile the file.

You should see no errors after compiling.

5

5. Connect the microcontroller board and run the program.

Navigate to Tools tab and choose device programming.

Under the tool option, chose mEDBG ATMLxxxxx, then click apply.

6

In the memories option, chose program to write the code into the device. You will see Programming Flash…OK when the code was written into the board.

6.Observe the results on developer board.

You should see the LEDs blinking at 1Hz. If you have encountered an issue that you can’t enter into program mode, it is because you haven’t exit the debugWire mode.

7

Solution:

1. Re-enter the debug mode:

8

Click the simulator to configure the debug mode

Under tool option, choose mEDBG ATMLxxx as the debugger.

9

Chose debugWIRE as the interface. Then you can start debugging by pressing F10(execute each line). If there is a window popping up regarding the debugWire mode, click Yes.

10

You will see a yellow cursor pointing at the executing line. Then you can click Debug tab and click Disable debugWIRE and Close to exit the debugWIRE mode.

Once you exited the debugWIRE mode, you can repeat step 5 to test the results.

11

7.build the LEDs with push button switch on a breadboard.

A proposed schematic design is shown below but other designs are also accepted:

For the operation of pushbutton switch, the diagram is shown as below:

12

Please note that you should connect the LED to resistor: When hooking up an LED, you are always supposed to use a current-limiting resistor to protect the LED from the full voltage.

8.Modify the c codes to meet the homework requirements.

9.Repeat step 4-6 to test the results.

13

Reference no: EM132069492

WhatsApp
Hello! Need help with your assignments? We are here

GRAB 25% OFF YOUR ORDERS TODAY

X