Microcontrollers and Embedded Systems Lab Manual
1. Introduction
This lab manual is designed to provide students with hands-on experience in working with microcontrollers and
embedded systems. The experiments focus on basic interfacing, programming, and hardware control using a common
microcontroller platform (e.g., Arduino or 8051).
2. Lab Guidelines and Safety
- Handle all components with care.
- Ensure power supply connections are correct.
- Avoid electrostatic discharge.
- Follow instructions from lab supervisors.
3. List of Equipment
- Microcontroller board (Arduino Uno or 8051 trainer kit)
- Breadboard and jumper wires
- LEDs, resistors, switches
- LCD Display (16x2)
- Seven Segment Display
- Sensors (e.g., LDR, Temperature)
- DC Motor and H-Bridge
- Oscilloscope or logic analyzer
Microcontrollers and Embedded Systems Lab Manual
Experiment 1: LED Blinking using GPIO
Write a program to blink an LED connected to a digital pin using delay loops. Observe the blinking rate by varying the
delay.
Microcontrollers and Embedded Systems Lab Manual
Experiment 2: Interfacing Switch and LED
Connect a push button and an LED. When the button is pressed, turn the LED ON; else turn it OFF.
Microcontrollers and Embedded Systems Lab Manual
Experiment 3: Seven Segment Display Interface
Display digits 0-9 on a common cathode 7-segment display using microcontroller GPIO pins.
Microcontrollers and Embedded Systems Lab Manual
Experiment 4: LCD (16x2) Display Interface
Interface a 16x2 LCD and display a welcome message. Use 4-bit or 8-bit mode.
Microcontrollers and Embedded Systems Lab Manual
Experiment 5: ADC Interface (Analog Sensor Reading)
Connect an analog sensor (like LDR or temperature sensor) and display its value on the serial monitor.
Microcontrollers and Embedded Systems Lab Manual
Experiment 6: PWM Generation using Microcontroller
Generate PWM on a pin and control the brightness of an LED or speed of a DC motor.
Microcontrollers and Embedded Systems Lab Manual
Experiment 7: Serial Communication (UART)
Send data from microcontroller to PC using UART and display it on serial monitor.
Microcontrollers and Embedded Systems Lab Manual
Experiment 8: I2C Communication with EEPROM
Interface an EEPROM using I2C protocol and write/read data.
Microcontrollers and Embedded Systems Lab Manual
Experiment 9: SPI Communication with Sensor
Connect an SPI-based sensor and read data over SPI protocol.
Microcontrollers and Embedded Systems Lab Manual
Experiment 10: Timer and Counter Applications
Use internal timers to toggle an LED or measure pulse width.
Microcontrollers and Embedded Systems Lab Manual
Experiment 11: Interrupt Handling
Demonstrate external interrupt by triggering an LED blink when a button is pressed.
Microcontrollers and Embedded Systems Lab Manual
Experiment 12: DC Motor Control using H-Bridge
Control direction and speed of a DC motor using H-bridge and PWM.
Microcontrollers and Embedded Systems Lab Manual
5. Viva Questions
1. What is the difference between microcontroller and microprocessor?
2. What are the main features of an 8051 microcontroller?
3. What is the purpose of PWM?
4. How does UART differ from SPI and I2C?
5. What happens during an interrupt?
6. References
- "The 8051 Microcontroller and Embedded Systems" by Mazidi
- Arduino Documentation: https://docs.arduino.cc/
- Datasheets of respective components used