Lab 02
Lab 02
EEE-342
Lab Report 02
Class BEE-5C
• Learn to program (download code to program memory of) a microcontroller using Arduino
board.
Softwares Used:
Microchip Studio (Version 7) or AVR Studio (Version 4)
• AVRDUDESS
Pre-Lab
For this lab, students need to use a microcontroller. A microcontroller is a programmable IC that
has many functionalities built-in the chip itself. Furthermore, microcontrollers have the ability
to send and receive both digital and analogue data via pins. The main outcome of these lab
sessions is that students should be able to program microcontrollers for a variety of tasks by the
end of the semester.
Pre Lab Task:
Task 1:
Enlist 5 peripherals (Devices) that can be interfaced with Atmega328P Microcontroller
Here are five peripherals or devices that can be interfaced with the Atmega328P microcontroller:
1. LCD Display
2. Keypad
3. Serial Communication Module (e.g., UART)
4. ADC (Analog-to-Digital Converter)
5. PWM (Pulse Width Modulation) Module
Task 2: I
Install AVRDUDESS on to your computer/laptop.
Done.
Task 3:
Please download datasheets of ATmega328P and Arduino Uno/ Nano.
In-Lab Tasks:
Task 1:
Write and test following program in AVR Studio/Atmel Studio. Also, show hardware
Task 2:
Write and code and simulate it on hardware to show your roll no. through LED blinking/
Task 3/Post-Lab:
(To be assigned by Lab instructor_ Switches are connected to one port of ATmega328p for input
and LEDs are connected to another port for output. Using these, perform a task assigned by your
lab instructor. Students should write the code for given task, simulate it on proteus and then
implement it on hardware.
Critical Analysis:
In this lab, we see the datasheet of atmega328P microcontroller and Arduino nano. We see how
to program Arduino uno and we make a small circuit of LED blinking. Then in task 2, we display
our roll number using Arduino uno . And in task 3 we we connect a switch to one port of arduino
and two LED’s to other port of Arduino and open close switch to glow one led and off other.