Microcontrollers and Applications Lab
Microcontrollers and Applications
Lab Record
Name of Student: Aishani Limaye
MIS: 612309031
Batch: B
Class: SY Instru
Department of Instrumentation & Control
COEP Technological University, Pune
1
Microcontrollers and Applications Lab
INDEX
Sr. Name of Experiment Date Pages Remark
No.
1. Introduction to Keil and its Features
2. LED Interfacing
3. Switch Interfacing with LED
4. 7-Segment Display Interfacing
5. LCD Interfacing
6. Using On-chip Timer and Counter
7. USART/UART Interfacing
8. ADC Interfacing
9. Interrupt Generation
This is to certify that Mr./Ms.
_________________________________________________ has completed the above
mentioned _________________________________________ lab work in the
_________________________________________ Department of COEP
Technological University, Pune.
_________________ _____________________
Course Coordinator Head of
Department
2
Microcontrollers and Applications Lab
Date: _________________
Experiment 1
Introduction to KEIL and its Features
Problem Statement:
Write a Program to add 2 numbers. Simulate it using KEIL debugger. Send
the output on P1 of 8051 microcontroller.
Program:
3
Microcontrollers and Applications Lab
Simulation:
Results:
4
Microcontrollers and Applications Lab
Experiment 2
LED Interfacing
Problem Statement:
a. Write a program to interface LED with 8051 microcontroller in
sinking mode and sourcing mode.
b. Write a program to show blinking of LED.
c. Write a program to show LED patterns on a port (alternate
blinking/series blinking).
Program:
5
Microcontrollers and Applications Lab
6
Microcontrollers and Applications Lab
7
Microcontrollers and Applications Lab
Simulation:
8
Microcontrollers and Applications Lab
9
Microcontrollers and Applications Lab
10
Microcontrollers and Applications Lab
11
Microcontrollers and Applications Lab
Results:
12
Microcontrollers and Applications Lab
Experiment 3
Switch Interfacing with LED
Problem Statement:
Write a program to blink and LED on and off using a switch or button.
Program:
13
Microcontrollers and Applications Lab
Simulation:
Results:
14
Microcontrollers and Applications Lab
Experiment 4
7-Segment Display Interfacing
Problem Statement:
a. Write a program to interface single 7-segment display and count 0-
9.
b. Write a program to interface two 7-segment displays and count 00-
99.
c. Write a program to interface multiplexed array of four 7-segment
displays.
d. Write a program to interface BCD to 7-segment displays and count
00-99.
Program:
Simulation:
15
Microcontrollers and Applications Lab
16
Microcontrollers and Applications Lab
17
Microcontrollers and Applications Lab
Results:
18
Microcontrollers and Applications Lab
19
Microcontrollers and Applications Lab
Experiment 5
LCD Interfacing
Problem Statement:
a. Write a program to display a single character on LCD.
b. Write a program to display name on LCD.
c. Write a program to display any number on LCD.
d. Write a program to display digital clock on LCD.
Program:
20
Microcontrollers and Applications Lab
21
Microcontrollers and Applications Lab
22
Microcontrollers and Applications Lab
23
Microcontrollers and Applications Lab
24
Microcontrollers and Applications Lab
Simulation:
25
Microcontrollers and Applications Lab
26
Microcontrollers and Applications Lab
Results:
27
Microcontrollers and Applications Lab
Experiment 6
On-Chip Timer and Counter
Problem Statement:
a. Generate a delay using timer and display square wave output on
any pin.
b. Generate square wave with varying duty cycles.
c. Use the timer to generate an exact 1 second delay and implement it
in digital clock.
d. Make a frequency counter using on-chip counter and display on
LCD.
Program:
28
Microcontrollers and Applications Lab
29
Microcontrollers and Applications Lab
30
Microcontrollers and Applications Lab
31
Microcontrollers and Applications Lab
32
Microcontrollers and Applications Lab
Simulation:
33
Microcontrollers and Applications Lab
34
Microcontrollers and Applications Lab
35
Microcontrollers and Applications Lab
Results:
36
Microcontrollers and Applications Lab
Experiment 7
USART/UART Interfacing
Problem Statement:
a. Write a program to send character from Tx.
b. Receive the character on Rx and display on LCD.
Program:
37
Microcontrollers and Applications Lab
38
Microcontrollers and Applications Lab
Simulation:
39
Microcontrollers and Applications Lab
Results:
40
Microcontrollers and Applications Lab
Experiment 8
ADC Interfacing
Problem Statement:
Write a program to receive an analog signal and convert it to digital using
ADC 0808 and display the digital output on seven segment display.
Program:
41
Microcontrollers and Applications Lab
Simulation:
Results:
42
Microcontrollers and Applications Lab
Experiment 9
Interrupt Generation
Problem Statement:
a.Write a program to generate an interrupt for timer/counter and stop the
execution of current instruction if external trigger comes.
b.Write a program to generate square wave using a timer interrupt
Program:
43
Microcontrollers and Applications Lab
44
Microcontrollers and Applications Lab
Simulation:
45
Microcontrollers and Applications Lab
46
Microcontrollers and Applications Lab
Results:
47
Microcontrollers and Applications Lab
Assignment
Interrupt Generation
48