0% found this document useful (0 votes)
15 views5 pages

LAB 1 MP-146

The lab report focuses on introducing development tools and software for microcontroller programming, specifically using Arduino and AVR ATmega 328P. It includes tutorials on using Arduino IDE, AVR Studio, and Proteus for coding and simulating microcontroller projects. The conclusion highlights the skills gained in creating projects, debugging, and simulating circuits.

Uploaded by

Souban Javed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

LAB 1 MP-146

The lab report focuses on introducing development tools and software for microcontroller programming, specifically using Arduino and AVR ATmega 328P. It includes tutorials on using Arduino IDE, AVR Studio, and Proteus for coding and simulating microcontroller projects. The conclusion highlights the skills gained in creating projects, debugging, and simulating circuits.

Uploaded by

Souban Javed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

MICROPROCESSOR SYSTEMS & INTERFACING

EEE-342

Lab # 01: Introduction to Development Tools and Lab Softwares

Name MUHAMMAD SOUBAN JAVAID

Registration No. FA20-BEE-146

Class 5B

Submitted To DR JUNAID AHMAD


Lab # 01 Introduction to Development Tools and Lab
Software

Objectives
• Learn to use software development tools such as Arduino, Integrated Development Environment (IDE) (Atmel
Studio, AVR Studio), Compiler (WinAVR), and Simulator (Proteus) for the AVR ATmega 328P
microcontroller.
Learn to program Arduino and ATmega328P

In-Lab
In-Lab Task 1: Arduino Learning Tutorial
1. Launch Arduino IDE.
2. Some built-in examples are included in Arduino software. Click on the toolbar menu: File > Examples >
Basics > Blink. This will turn an LED on Arduino board on and off with some delay.
3. Compile the sketch. After successful compilation, the code can be uploaded to the Arduino board.

Task 2: AVR Studio Learning Tutorial & Task 3: Atmel Studio Learning Tutorial
Code:
/*This code will configure Port B for output and then toggle Port B pin 3 with a delay of 1000ms*/

#include <avr/io.h> /*This header file includes the appropriate I/O definitions for the device */

#define F_CPU 16000000UL //XTAL Frequency =16MHz

#include <util/delay.h> /*This header file is required for generating delays*/

int main() { // Write your code here


DDRB = 0b11111111; //Configure Port B as Output

while(1) //This loop will run forever

{ PORTB = 0b00001000; /*Send 1 on Port B Pin 3,

rest of the pins are zero*/

_delay_ms(1000); //Delay of 1000ms

PORTB = 0b00000000; //Send 0 on Port B Pin 3

_delay_ms(1000); //Delay of 1000ms } }

Output:

In-Lab Task 4- Proteus Introductory Learning Tutorial


In Lab Task 5:

a. The following code is written to generate fibonacci series output at PortB which is
given as (0, 1, 2, 3, 5, 8, 13, 21, 34, 55).

Code:

b. Build the following code in AVR Studio or Atmel Studio. Read the error messages,
identify and correct any syntax errors and rebuild the solution.
c. Use Debugging mode of AVR Studio or Atmel Studio to debug and correct the code
to get the desired output. In debug mode, open watch window to check the value of the
variables.

Conclusion: In this introductory lab, I got an overview about Arduino IDE, AVR studio (Microchip
Studio) and Proteus. This lab showed me how to create a project, run the program and upload it on Proteus
to simulate the circuit and make the hardware using the hex file. I learned how to program Arduino and
ATmega328p.

You might also like