NATIONAL INSTITUTE OF TECHNOLOGY, TIRUCHIRAPPALLI-620 015
DEPARTMENT OF INSTRUMENTATION AND CONTROL ENGINEERING
SUBJECT: ICPC18 MICROPROCESSOR AND MICROCONTROLLER
PROGRAMMING ASSIGNMENT – II
Marks: (10 Marks)
Instructions
1. The report of the assignment-II must be submitted in the electronic format with
algorithm, program, observation and result for each problem statement.
2. For each program, provide the program size in bytes. Also give the optimized program
size along with the change made in the code.
3. Do not copy the content of assignment from neighbors which leads to zero marks for
the assignment-II. Also, the group fail to submit on due date will lose mark accordingly.
Problem statement
Write and simulate the C language program (generalized program - should work for
any input) to:
1. A simple burglar alarm system has 4 zone inputs connected to an 8051 I/O port. If any
one of these inputs is activated a bell will sound for 10 seconds and the corresponding
zone LED, or LEDs, will be activated.
2. A heating oven in a manufacturing process is to be maintained at a temperature level
between 80oC and 150oC. The controller device is to be based on an 8051
microcomputer. Two temperature sensor devices are fitted to the oven as follows:
(i) Sensor A outputs logic 1 if temperature falls below 60oC
(ii) Sensor B outputs logic 1 if temperature exceeds 135oC
3. Write an 8051 C language program which will generate a 500 Hz square wave at an
output pin. The program is to use a 16 bit timer in interrupt driven mode.
4. Write an 8051 C language subroutine which will transmit an 8-bit data character via the
serial port.
5. Write an C programme to generate a sinewave at the given frequency. The frequency
input should be given by the User. Also define the voltage range given by the user (uV,
mV and V). Incorporate the switching from one range to another. Display the waveform
in the logic analyser and verify the parameters.
6. Write an C programme to generate a triangular waveform for the given frequency. Also
define the voltage range given by the user (uV, mV and V). Incorporate the switching
from one range to another. Display the waveform in the logic analyser and verify the
parameters.
#####################################################################