0% found this document useful (0 votes)
30 views5 pages

Microprocessors and MicroControllers DA

The document outlines a digital assignment for a B. Tech course on Microprocessors and Microcontrollers, requiring students to answer any seven out of nine provided questions. Each question involves writing assembly language programs for various applications, such as generating tones, designing systems, and interfacing with hardware. The assignment emphasizes practical programming skills using the 8051 microcontroller and 8086 architecture.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

Microprocessors and MicroControllers DA

The document outlines a digital assignment for a B. Tech course on Microprocessors and Microcontrollers, requiring students to answer any seven out of nine provided questions. Each question involves writing assembly language programs for various applications, such as generating tones, designing systems, and interfacing with hardware. The assignment emphasizes practical programming skills using the 8051 microcontroller and 8086 architecture.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Digital Assignment

Programme Name & Branch: B. Tech


Course Name & Code: Microprocessors and Microcontroller (BECE204L)
Slot and Class Number: WINTER SEM (24-25) Faculty Name: Vetriveeraan. R

Note: Answer any 7 questtions.

Attempt only two


questions
S.No
1 Write a program using interrupt to simultaneously create 7kHz and 500 Hz
square waves on P1.7 and P1.6 as shown in Figure 1.

Figure 1
2 The international tuning standard for musical instruments is "A above middle C"
at
a frequency of 440 Hz. Write an 8051 program to generate this tuning frequency
and Sound a 440 Hz tone on a loudspeaker connected to P1.1. ( Figure 2) Due to
Rounding of the values placed in TL1/TH1, there is a slight error in the output
frequency. What is the exact output frequency, and what is the percentage
error? What value of crystal would yield exactly 440 Hz with the program you
have written?

Figure 2
3 Design an intrusion warning system using interrupts that sounds a 400 Hz tone
for 1 Second (using a loudspeaker connected to P1.7) whenever a door sensor
connected to INT0 makes a high-to-low transition as shown in Figure 3.

Figure 3
4 Write a program to query the printer and then continually send a test message
to it for printing.Figure 4 shows the connection of the 8051 to a printer via the
Centronics parallel interface. The corresponding software is given in Figure 4.The
program first activates the STROBE signal to the printer and then checks the
status of the printer to ensure that it is not busy (BUSY = 0), that there is still paper
(PAPER END = 0), that it has been selected (SLOT = 1), and that there is no error
( ERROR = 1). If any of the conditions are not satisfied, an error message is
generated and the program
ends. Otherwise, the 8051 waits for the printer's ACK signal before it
proceeds.
Once the ACK signal is activated, the current character is obtained from the
test message and sent to the printer's data pins via P1.

Figure 4
5 The car parking area can accommodate a maximum of 200 cars. Assume
that a sensor is connected to P3.4 of the 8051 microcontroller to sense
the incoming car entering a parking area. If the count reaches
200(decimal), the microcontroller should turn ON a buzzer connected to
port pin P1.7 for 60ms. Assume the crystal frequency as 11.0592 MHz.
Write a suitable 8051 assembly code to implement for
the above scenario.
6 Design an 8051 assembly language program to implement the following
functionality. Assume that a string “MY VOTE IS NOT FOR SALE” is stored
in ROM location starting at 200H. If the switch, connected to port P1.3 is
ON (logic 1), the microcontroller should transmit the string of data
from ROM through serial port at 2400 baud rate and if the switch is
OFF (logic 0) the
microcontroller should transmit at 4800 baud rate.
7 Write an ALP, using 8051 to count 20,000 items passing down on a
conveyor belt has illustrated in figure 1. Port P1.7 is connected to the
switch of the motor. When P1.7 is low, the motor starts and the
microcontroller counts the item moving on a conveyor belt. When the
count reaches 20,000, P1.7 is set to logic high to stop the motor.

Figure
8 Write an 8086 ALP to find the variance of 10 numbers stored in the
memory locations and execute in emu 8086.
9 Write an 8086 ALP containing two programs (P1 and P2) P1 is to add 10
numbers and P2 is to multiply 4 numbers. P1 and P2 are using almost
same registers. First P1 starts to run, P2 interrupts in the middle, P2 runs
completely, P1 resumes and runs completely. (hint: P2 code can be
written with in P1). Execute in emu 8086.

You might also like