0% found this document useful (0 votes)
193 views

Assignment 2

This document contains an assignment for a Microprocessor and Microcontroller course. It includes 9 questions related to programming an 8051 microcontroller to generate waveforms and frequencies on different pins using timers, and designing systems using an 8051 microcontroller that include a bidirectional visitor counter, RF vehicle speed control, railway gate control, home automation, and password protected door lock. The questions are worth between 2-3 marks each and assess the student's ability to program functional units of the 8051 microcontroller, describe peripheral devices, and explain applications using microcontrollers.

Uploaded by

PIYUSH KUMAR
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
193 views

Assignment 2

This document contains an assignment for a Microprocessor and Microcontroller course. It includes 9 questions related to programming an 8051 microcontroller to generate waveforms and frequencies on different pins using timers, and designing systems using an 8051 microcontroller that include a bidirectional visitor counter, RF vehicle speed control, railway gate control, home automation, and password protected door lock. The questions are worth between 2-3 marks each and assess the student's ability to program functional units of the 8051 microcontroller, describe peripheral devices, and explain applications using microcontrollers.

Uploaded by

PIYUSH KUMAR
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

VTU No.

ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

VTU R 2015

ASSIGNMENT – II

B.Tech. – ECE

Faculty Name: Vinoth Kumar V Section: F


Course Category: Program Core Course Code: 1151EC110
Course Title: Microprocessor and Microcontroller Max. Marks: 5
Semester: Winter 2021-2022 Date of Submission: 04.06.2022
Achievable Course Outcomes
CO3: Program the functional units of 8051 microcontroller for the given specifications using C/Assembly
language. Level –
K3
CO4: Describe various peripheral devices such as 8255, 8279, 8251, 8253, 8259 and 8237. Level – K2
CO5: Explain various applications using 8051 microcontroller and basic architectures of PIC, ARM and
ATMEGA microprocessors and microcontroller. Level – K2

Course
Q.Set Assignment Questions Marks POs
Outcome
Create a square wave of 50% duty cycle with equal portions of high and low
2 CO3 1, 2
pulse on the bit P1.5.use timer 0 to generate delay of 200 microseconds.
1. Design a microcontroller system for Bidirectional Visitor Counter using
CO4, 1, 2,
8051: This Bidirectional Visitor Counter Circuit is helpful to count the 3
CO5 9
number of persons entering or leaving a room and to display it on a screen.
With the frequency of 22MHz, generate a frequency of 100KHz on the pin
2 CO3 1, 2
P2.3 using timer1 in mode 1.
Design a microcontroller system for RF Based Speed Control System for
Vehicles: Road safety at important places like schools, hill areas,
2. highways and express ways is very important. In this project, a speed
CO4, 1, 2,
control system for vehicles is proposed at places like mentioned above. It is a 3
CO5 9
microcontroller-based system with RF based communication. This is a
simple, low cost and a durable project for safety of drivers as well as the
public.
Generate a square wave with ON time of 3ms and OFF time of 10ms on all
2 CO3 1, 2
the pins of port 0. Assume the crystal frequency is 22Mhz
Design a microcontroller system for Automatic Railway Gate Controller
3.
with High-Speed Alerting System: The main aim of this project is to operate CO4, 1, 2,
3
and control the unmanned railway gate in the proper manner in order to avoid CO5 9
the accidents in the unmanned railway crossing.
Assuming XTAL=22Mhz, write a program to generate a pulse train of 2
2 CO3 1, 2
seconds period on pin P2.4. Use timer1in mode1.
4.
Design a microcontroller system for Bidirectional Visitor Counter using CO4, 1, 2,
3
8051: This Bidirectional Visitor Counter Circuit is helpful to count the CO5 9
VTU No. ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

VTU R 2015

number of persons entering or leaving a room and to display it on a screen.

Assume that XTAL =11.0592MHz, write a program to generate a square


2 CO3 1, 2
wave of frequency 1KHz on pin 1.2 using timer 0 mode 2.
5. Design a microcontroller system for DTMF Based Home Automation
System Circuit: This is a simple and very useful circuit in our real life named CO4, 1, 2,
3
DTMF controlled home appliances system. It helps to control the home CO5 9
appliances using DTMF technology.
Design a counter for counting the pulses of an input signal. The pulses to be
2 CO3 1, 2
counted are fed to pin P3.4, assume XTAL=22MHz
6. Design a microcontroller system for DTMF Based Home Automation
System Circuit: This is a simple and very useful circuit in our real life named CO4, 1, 2,
3
DTMF controlled home appliances system. It helps to control the home CO5 9
appliances using DTMF technology.
Write an 8051 C program to toggle all the bits of port P1 continuously with
2 CO3 1, 2
some delay in between. Use timer 0 16bit mode to generate delay.
Design a microcontroller system for Password Based Door Lock System
7. using 8051 Microcontroller: This system demonstrates a password-based
CO4, 1, 2,
door lock system wherein once the correct code or password is entered, the 3
CO5 9
door is opened and the concerned person is allowed access to the
secured area. After some time, the door would be closed.
Write an 8051 C program to toggle only bit P1.5 continuously every 50ms.
2 CO3 1, 2
Use timer 0, mode 1 to create the delay.
Design a microcontroller system for Password Based Door Lock System
8. using 8051 Microcontroller: This system demonstrates a password-based
CO4, 1, 2,
door lock system wherein once the correct code or password is entered; the 3
CO5 9
door is opened and the concerned person is allowed access to the
secured area. After some time, the door would be closed.
Write an 8051 C program to toggle all the bits of P2 continuously every
2 CO3 1, 2
500ms.Use timer 1, mode 1 to create a delay.
9.
Design a circuit using PIC microcontroller for Intelligent CO4, 1, 2,
3
temperature control system using DS1820 and explain. CO5 9
Write an 8051 C program to toggle only pin P1.5 continuously every
2 CO3 1, 2
250ms.Use timer 0, mode 2 to create a delay.
10.
Design a circuit using PIC microcontroller for simple calculator CO4, 1, 2,
3
And explain CO5 9
Write an 8051 C program to create a frequency of 2500Hz on pin 2.7. Use
2 CO3 1, 2
timer 1 mode 2 to create a delay.
Design a microcontroller system for Password Based Door Lock System
11.
using 8051 Microcontroller: This system demonstrates a password-based CO4, 1, 2,
3
door lock system wherein once the correct code or password is entered, the CO5 9
door is opened and the concerned person is allowed access to the
VTU No. ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

VTU R 2015

secured area. After some time, the door would be closed.


A switch is connected to pin P1.2. Write an 8051 C program to monitor SW
and create the following frequencies on P1.7 pin 2 CO3 1, 2
SW=0-500Hz and SW=1-750Hz, Use timer 0 mode 1 for both of them.
12. Design a microcontroller system for RFID based Attendance System:
This simple RFID based attendance system is designed using ATmega8 CO4, 1, 2,
3
Microcontroller and is mainly used in educational institutions, industries, etc. CO5 9
where authentication is needed.
Assume that 1Hz external clock is being fed into pin T1(P3.5). Write an C
program for counter 1 in mode 2 to count up and display the state of the TL1 2 CO3 1, 2
13. count on P1. Start the count at 0H..
Design a circuit using PIC microcontroller for stepper motor control and CO4, 1, 2,
3
explain. CO5 9
Assume that a 1-Hz external clock is being fed into pin T0 (P3.4). Write an C
program for counter 0 in mode 1 t count the pulses and display the TH0 and 2 CO3 1, 2
TL0 registers on P2 and P1 respectively.
14.
Design a circuit using PIC microcontroller for person counter and explain. CO4, 1, 2,
3
CO5 9
Write an 8051 C program to send Hex values for ASCII characters of
2 CO3 1, 2
0,1,2,3,4,5,A,B,C and D to port P1.
15. Design a microcontroller system for RFID based Attendance System:
This simple RFID based attendance system is designed using ATmega8 CO4, 1, 2,
3
Microcontroller and is mainly used in educational institutions, industries, etc. CO5 9
where authentication is needed.
Write an 8051 C Program to toggle all the bits of P1 continuously. 2 CO3 1, 2
Design a microcontroller system for Street Lights that Glow on Detecting
16. Vehicle Movement: This article describes about the circuit that switches the
CO4, 1, 2,
streetlights on detecting vehicle movement and remains off after fixed time. 3
CO5 9
This system controls the streetlights using light dependent resistor and PIR
sensor.
Assume that a 2Hz external clock is being fed to T1(P3.5). Write a C
program for counter 0 in mode 2 to display the count in ASCII. The 8-
bit binary count must be converted 2 CO3 1, 2
into ASCII. Display the ASCII digits on P0, P1 and P2 where P0 has the least
17. significant digit. Set the initial value to 0.
Design a microcontroller system for Street Lights that Glow on Detecting
Vehicle Movement: This article describes about the circuit that switches the
CO4, 1, 2,
street lights on detecting vehicle movement and remains off after fixed time. 3
CO5 9
This system controls the street lights using light dependent resistor and PIR
sensor.
Assume that a 60-Hz external clock is being fed into pin T0 (P3.4). Write a C
18. 2 CO3 1, 2
program for counter 0 in mode 2 to display the seconds and minutes on P1
VTU No. ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

VTU R 2015

and P2 respectively.

Design a microcontroller system for Sun Tracking Solar Panel: This


CO4, 1, 2,
article describes about circuit that rotates solar panel. This Sun tracking solar 3
CO5 9
panel consists of two LDRs, solar panel, stepper motor and Microcontroller.
LEDs are connected to bits P1 and P2. Write an 8051 C program that shows
2 CO3 1, 2
the count from 0 to FFH (0000 0000 to 1111 1111 in binary) on the LEDs.
19. Design a microcontroller system for Sun Tracking Solar Panel: This
CO4, 1, 2,
article describes about circuit that rotates solar panel. This Sun tracking solar 3
CO5 9
panel consists of two LDRs, solar panel, stepper motor and Microcontroller.
Write a program to transfer letter ‘Y’ serially at 9600 baud continually, and
also to send letter ‘N’ through port 0, which is connected to the display device. 2 CO3 1, 2

20. Design a microcontroller system for Temperature Controlled DC Fan


using Microcontroller: The main principle of the circuit is to switch on the CO4, 1, 2,
3
fan connected to DC motor when the temperature is greater than a threshold CO5 9
value. This can be used in home applications and in cpu to reduce heat
A door sensor is connected to the pin P1.1 and a buzzer is connected to P1.7.
Write an 8051 C program to monitor the door sensor, and when it opens,
2 CO3 1, 2
sound the buzzer. You can sound the buzzer by sending a square wave of few
hundred Hz.
21.
Design a microcontroller system for Ultrasonic Rangefinder using 8051:
This circuit explains you how to measure the distance using 8051 CO4, 1, 2,
3
microcontrollers. This ultrasonic range finder system measures the distance CO5 9
up to 2.5 meters at accuracy of 1 cm.
Write a program to receive the data which has been sent serial form and send
2 CO3 1, 2
it out to port 0 in parallel form. Also save the data at RAM location 60H.
Design a microcontroller system for Water Level Monitoring and
Control System: An 8051-microcontroller based water level monitor and
22.
control system is designed here. Few water level probes are placed in CO4, 1, 2,
3
overhead tank or other water container. The probes are placed such that they CO5 9
indicate quarter, half, three quarters and full levels in the tank. When the tank
is full, the relay turns the motor off.
Write a C program to send out the value 44H serially one bit a time via P1.0.
2 CO3 1, 2
The LSB should go out first.
Design a microcontroller system for LCD Based Voting Machine: A
23. microcontroller-based voting machine with LCD display unit is described in
CO4, 1, 2,
this article. It consists of voting unit, a control unit, a display unit and a power 3
CO5 9
supply unit. An Atmega16 microcontroller is used as the main controlling
unit. The results can be displayed on the LCD.
Find the values of TMOD to operate as timers in the following modes. (a)
2 CO3 1, 2
Mode1 Timer1, (b) Mode 2 Timer 0, Mode 2 Timer 1, (iii) Mode 0, Timer 1
24. Design a microcontroller system for Simple Toll Plaza: A simple
CO4, 1, 2,
microcontroller based automatic toll deduction system is designed in this 3
CO5 9
project. The system uses RFID and GSM technologies. RFID reader at the
VTU No. ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

VTU R 2015

plaza will detect the users RFID tag and automatically deducts the required
amount and the GSM module sends a notification to the user.
Write a program to receive the data which has been sent serial form and send
2 CO3 1, 2
it out to port 0 in parallel form. Also save the data at RAM location 60H.
Design a microcontroller system for Real time Car Battery Monitoring
and Low Voltage Alert System: Battery is an important device in
25. automotive. The aim of this project is to design a real time battery monitoring
CO4, 1, 2,
system with low voltage alert system. It uses a microcontroller and has 3
CO5 9
voltage measurement circuit and temperature measurement circuit integrated
to it. This system can be used in UPS, hybrid vehicles, regular electric
vehicles etc.
With a frequency of 22MHZ, generate a frequency of 100KHz on pin P2.#.
2 CO3 1, 2
Use Timer 1 in mode 1.
Design a microcontroller system for Real Time Burglar Alarm System
Using PIR Sensor: Passive Infrared sensors (PIR sensors) can be used in
26.
security systems and can prevent burglary. A microcontroller-based burglar CO4, 1, 2,
3
alarm system is designed here. PIR sensor is the main module along with CO5 9
some other sensors like acoustic and magnetic sensors. The communication
is through RF link and an alarm system is installed at the receiving end.
Write an ALP to generate a square wave with an ON time of 3 ms and an OFF
2 CO3 1, 2
time of 10ms on all pins of port 0. Assume an XTAL of 22MHz.
Design a microcontroller system for RFID Based Bus Ticketing System:
27. The main problem of manual ticketing system is formation of Queues. RFID
CO4, 1, 2,
based ticketing system provides an easy way of buying tickets. RFID can be 3
CO5 9
used to identify the passenger and based on GPS; the fare is automatically
deducted as per the distance.
Write an ALP to design a counter for counting the pulses of an input signal.
2 CO3 1, 2
The pulses to be counted are fed to pin P3.4. XTAL = 22 MHz.
Design a microcontroller system for Auto Turn off Water Pump with
28. Different Time Slot: This is an innovative solution to operate a motor for
CO4, 1, 2,
small duration. If the motor is to be operated for a specific duration of time 3
CO5 9
and then turn off automatically, then this project is very helpful. Four switches
are used so that four different time slots can be programmed.
Write an 8051 C program to toggle all bits of PC continuously every 500ms.
2 CO3 1, 2
Use Timer1, mode 1 to create the delay.
Design a microcontroller system for Fire Extinguishing Robot: Fire
29.
fighters try their best to fight and extinguish fire when needed. But an early
CO4, 1, 2,
detection of fire at household level can prevent major accidents. This robot 3
CO5 9
can detect and extinguish fire. Such robots can even assist fire fighters. It can
be made to work in autonomous mode or manual mode.
Write an 8051 C Program to toggle only pin P1.5 continuously every 250ms.
30. 2 CO3 1, 2
Use Timer 0, mode 2 (8 bit auto reload to create the delay.
VTU No. ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

VTU R 2015

Design a circuit using 8051 microcontroller for digital temperature sensor CO4, 1, 2,
3
and explain. CO5 9
Write a C program for the 8051 to transfer the letter ‘A’ serially at 4800 baud
2 CO3 1, 2
continuously. use 8-bit data and 1 stop bit.
Design a microcontroller system for Public Garden Automation: An
31. important task in agriculture fields and gardens is timely watering of crops
CO4, 1, 2,
and plants. The aim of this project is to implement a microcontroller based 3
CO5 9
garden and agricultural field automation. The timings are programmed in the
microcontroller and the respective solenoid valves open or close accordingly.
With XTAL = 11.0592 MHZ, find the TH1 value needed to have the
2 CO3 1, 2
following baud rates. (i) 9600 (ii) 2400 (iii) 1200.
Design a microcontroller system for Digital Over Voltage Protection
32. System For Industrial Loads: Industries work at high voltages and powers.
Even then, a sudden over voltage may bring a catastrophic damage to the CO4, 1, 2,
3
whole system. The purpose of this project is to provide over voltage CO5 9
protection for industrial loads. This is based on AVR microcontroller and can
be applied to any high power, voltage and current system like substations.
Write an ALP to transfer a letter "Y" serially at 9600 baud continuously, and
2 CO3 1, 2
also to send a letter "N" through port 0, which is connected to a display device.
Design a microcontroller system for RF Transceiver Based Traffic Alert
System for Automobiles: This is a microcontroller-based traffic alert system.
33.
An RF transmitter at the traffic signals transmits the status of the signal lights. CO4, 1, 2,
3
The receiver at the vehicle will detect these signals and displays on a LCD CO5 9
display. In case the vehicle is too close to another vehicle or an object, the
anti-collision system alerts the user.
Write an ALP to receive the data which has been sent in serial form and send
2 CO3 1, 2
it out to port 0 in parallel form. Also save the data at RAM location 60H.
34.
Design a circuit using 8051 microcontrollers for Stop watchcircuit with CO4, 1, 2,
3
LCD Display and explain CO5 9
If the crystal frequency is 22 MHz, what will be the baud rate if (a) TH1 = -
2 CO3 1, 2
3; (b) TH1=-12 with SMOD=0 and SMOD=1?
35.
Design a circuit using 8051 microcontrollers for Electronic voting machine CO4, 1, 2,
3
and explain CO5 9
Write an assembly language program to send the text string "Hello" to serial
2 CO3 1, 2
#1. Set the baud rate at 9600, 8 bit data and 1 stop bit.
Design an Electronic Voting Machine using Microcontroller Electronic
voting machine has now replaced the traditional mechanism of ballot voting
due to several advantages like security, automatic counting etc. The system
36. consists of two units – the control unit and the user unit. The control unit
CO4, 1, 2,
consists of some control switches and status LED’s and is handled by the 3
CO5 9
presiding officer. The user unit provides voting facility and contains a matrix
keypad, a memory IC and an LCD display. The system operates in three
modes – the Idle mode, voting mode and Counting mode. Each mode is
identified by a status byte written in the EEPROM. In Ideal mode the machine
VTU No. ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

VTU R 2015

is idle, that means the machine is ready to use.

Write a C program for the 8051 to transfer the letter "A" serially at 4800 baud
2 CO3 1, 2
continuously. Use 8 bit data and 1 stop bit.
Design a Heart rate Monitoring system using microcontroller This project
kit is a model of Heart Rate Measuring devices we see in hospitals, especially
inside ICU (Intensive Care Units). Heart Rate Monitor project kit is designed
37.
on the principle of Photo plethysmography (which is the process of optically CO4, 1, 2,
3
estimating volumetric measurement of an organ). The device senses the heart CO5 9
rate from the fingertip using IR reflection method and displays it on a 16×2
LCD display in beats per minute. This project kit is very unique and is ideal
for students taking Bio Medical courses like Bio Medical Engineering.
Write an 8051 C program to transfer the message “WELCOME" serially at
9600 baud, 8 bit data, 1 stop bit. Do this continuously. 2 CO3 1, 2
38.
Design a circuit using 8051 microcontroller for Elevator (Lift)Controller and CO4, 1, 2,
3
explain CO5 9
Write a C program to receive bytes of data serially and put them in P1. Set
2 CO3 1, 2
the baud rate at 4800, 8 bit data and 1 stop bit.
Design a Moisture sensing Automatic plant watering system. The system
simply senses the moisture level and switches on the irrigation pump when
39.
the moisture is below the set limit. The system switches off the pump when CO4, 1, 2,
3
the moisture rises above the set point. The moisture level threshold can be set CO5 9
using a trim pot on the system. The status of the pump (whether ON or OFF)
is displayed on a LCD display.
Write an 8051 C program to send two different strings to the serial port.
Assuming that SW is connected to pin P2.0, monitor its status and make a
2 CO3 1, 2
decision as follows: SW=0; send your first name, SW=1: send your last name.
Assume XTAL = 11.0592 MHz, baud rate of 9600, 8- bit data, 1 stop bit.
Design a Password Based Home Security System – is a real-world
application very similar to RFID based Access Control System. In this project
40. kit, we use a 4×4 keyboard for checking security access instead of RFID
reader and tag. A password is preset and stored in the program memory of
CO4, 1, 2,
8051 microcontroller. When a user/employee inputs the correct password and 3
CO5 9
hits Lock/Unlock key access will be granted. If the user inputs a wrong
password and hits Lock/Unlock key, access will be denied. A solenoid lock
can be connected to the output relay to automatically open/close the door.
Status messages are displayed on 16×2 LCD display
Write an ALP to display a value of 'Y' at port 0 and 'N' at port 2 and also
generates a square wave of 10KHz with Timer0 in mode 2 at port pin P1.2. 2 CO3 1, 2
XTAL = 22MHz.
41.
Design a circuit using 8051 microcontrollers for Water Levelcontroller and CO4, 1, 2,
3
explain CO5 9
VTU No. ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

VTU R 2015

Write an ALP to generate two square waves one of 5KHz frequency at pin
2 CO3 1, 2
P1.3, and another frequency 25KHz at pin P2.3. Assume XTAL=22MHz.
42.
Design a circuit using 8051 microcontroller for object counter and explain CO4, 1, 2,
3
CO5 9
Two switches are connected to pins P3.2 and P3.3. When a switch is pressed,
the corresponding line goes low. Write a program to (a) light all LEDs
2 CO3 1, 2
connected to port), if the first switch is pressed. (b) light all LEDs connected
to port 2, if the second switch is pressed.
Design a Gas Leakage Detector using microcontroller – is an interesting
project which finds real-world application in home kitchens, hotels and other
43.
places where gas leakage is a common issue. This project kit is designed using
MQ2 gas sensor which senses any type of LPG. When LPG leaks, the MQ2 CO4, 1, 2,
3
gas sensor will be activated. 8051 controller in the project kit identifies this CO5 9
and actuates the shutdown mechanism by turning output relay ON. The 16×2
LCD displays messages when a gas leak is detected. This project is very
useful in real world and it saves lives.
What is the difference between the RET and RETI instructions? Explain why
2 CO3 1, 2
we cannot use RET instead of RETI as the last instructions of an ISR.
44.
Design a circuit using 8051 microcontroller for Intelligent CO4, 1, 2,
3
temperature control system using DS1820 and explain CO5 9
Discuss what happens if interrupts INT0, TF0 and INT1 are activated at the
same time. Assume priority levels were set by the power up reset that the 2 CO3 1, 2
45. external hardware interrupts are edge triggered.
Design a circuit using 8051 microcontroller for simple calculator and explain CO4, 1, 2,
3
CO5 9
Remember K2-Understand K3-Apply K4-Analyze K5 –Evaluate K6 –Create
VTU No. ECE/Exam Cell/002
Regular

SCHOOL OF ELECTRICAL & COMMUNICATION


DEPARTMENT OF ECE

You might also like