You are on page 1of 7

Register Assignment Questions

Number
19BEE0011 1. Write a program to count the number of vowels in the given string. Get

19BEE0063 string input from RAM location 45H. String “MICRO”.


2. Write an 8051-assembly program to
19BEE0091
a. Create a Square wave of 66 % duty cycle on bit 5 of port 1.
b. Create a Square wave of 75 % duty cycle on bit 3 of port 2.

1. Write an ARM assembly program to solve the following equations.


19BEE0114
Assume a,b,c are 8 bit numnber & “x” is 16 bit number.
19BEE0132
19BEE0197

2. Read a value from the analog speedometer, the output of speedo


meter ranges from 0 to 5 V. Write 8051 assembly program to read the
speed in digital form. If the speed is more than 3.5V, turn on the
buzzer which is connected with P1.0.
1. Write a program to generate PWM by comparing triangular wave and
constant DC line.
19BEE0224
19BEE0245 2. Assume that register “A” has packed BCD. Write a program to convert
19BEE0302
packed BCD into two unpacked numbers and place them in R2 & R6.
1. Assume that the INT1 pin is connected to a switch that is normally high.
Whenever it goes low, it should turn on an LED. The LED is connected
to P1.3 and is normally off. When it is turned on it should stay on for a
fraction of second. As long as the switch is pressed low, the LED
19BEE0359
19BEE0380 should stay on. Write an 8051-assembly program with the above
19BEE0394
specifications.

2. Write an ARM assembly program to solve the following


1. Write a program that continuously gets a single bit of data from P3.2
19BEE0398
and send it to P1.0, while simultaneously creating a square wave of 200
19BEI0046 µs period on pin P2.5. Use timer 0 to create square wave. Assume that
19BEI0112 XTAL = 11.0592 MHz
2. Write an 8051-assembly language program to generate 50 Hz
sinusoidal wave form on Port 1.

1. Write an 8051-assembly program to solve the following

19BEI0132
20BEE0089
20BEE0147

2. Create an algorithm and an 8051-assembly program to carry out the


following task. Assume you have two switches (S1 & S2) as well as two LEDs
(Green & Red). LEDs are normally turned off. Green LED should be on when
you push S1 for the first time. Red LED should be on when you push S1 for
the second time. Similarly, when you hit S2 for the first time, the Red LED
should turn on, and when you press it again, the Green LED should turn on.
Assume that S1 and S2 are mutually exclusive (One input signal it true at a
time).
1. Write an assembly language program to generate a cosine waveform
with a frequency of 50 Hz, show the calculations involved. Show how
a DAC should be interfaced to obtain the waveform?
20BEE0159
2. Write an assembly language program to check whether the given string
20BEE0176
20BEE0262 is palindrome.

1. Write an assembly language program to get input from switches from


Port 0 and do the following by connecting LEDs in Port1
20BEE0322
20BEE0324 i. Rotate a single LED towards right if 01H is the input from
20BEE0344
Port0
ii. Rotate a single LED towards left if 02H is the input from Port
0
iii. Make the alternate LED to blink if 03H is the input from Port
0.
2. Write an 8051-assembly program with the following assumptions. Port
P1.4 is an input and represents the condition of an oven. If it goes high,
it means that the oven is hot. Monitor the bit continuously. When it
goes high send a low – to – high pulse to port 2.5 to turn on a buzzer.
1. Assuming that XTAL = 12 MHz, show a program to generate a square
20BEI0040
wave on pin P1.2, find the lowest square wave frequency that we can
20BEI0072
20BEI0092 generate using mode 1.

2. Assume LM35 is connected with Port0 of 8051 microcontroller, write


an assembly language to read the value from the sensor and display the
same in the LCD display with the message “Value is = unit”, show
the necessary blocks.
1. Design 8051microcontrollers based system to measure and display the
19BEE0042
temperature in Celsius, system will take input from LM 35 sensor.
19BEE0084 Display temperature on LCD. Also display minimum temperature and
19BEE0110 maximum temperature of the day on LCD.
● Design suitable signal conditioning circuitry.
● Draw complete interfacing diagram using suitable ADC.
● Draw the flowchart and write the program in assembly or in C
language which includes initialization and peripherals.
2. Create an 8051-assembly language program that will trigger the pulse
(ON time) on port 1.1 every 1 second. Turn on the buzzer associated
with P0.0 when the pulse reaches 60.
1. Write an assembly language program to generate a square wave in
Port0 with a frequency of 50 Hz normally, the frequency should get
19BEE0122
19BEE0176 doubled when INT0 is activated, and it should be tripled when INT1 is
19BEE0204
activated.
2. In 8051 microcontroller write the program by considering that bit P2.3
is an input and represents the condition of an oven. If it goes high, it
means that the oven is hot. Monitor the bit continuously. Whenever it
goes high, send a “high” – to – “low” pulse to port P1.5 to turn on a
buzzer.
1. You are going to conduct the survey. In order to conduct the survey, you
are going to use 8051 microcontroller, two buttons, and one display.
19BEE0230 Write a program and display the following contents.
19BEE0253 i. A number of people participated in the survey.
19BEE0337
ii. A number of people who agreed and not agreed.
2. Write an assembly language program to convert a given hexadecimal
number into BCD number.

1. In elevator, IR sensors are mounted and it can accommodate maximum


of 8 persons. Write a program to perform the following
19BEE0376
19BEE0392 i. Turn on LED’s which is connected in P2 to indicate when elevator
19BEE0395
overloads.
ii. Switch ON the lights and fans when a person enters into the
elevator.
iii. When elevator is ideal for a while, turn OFF the lights and fans.
Assume lights and fans are connected in P1.
2. A seminar hall has the capacity of 50 seats. Assume IR sensors are
mounted at the entrance. Main door of the seminar hall should be closed
when the required number of audiences are entered into the hall. Write
the 8051-microcontroller program to implement the above activity.
1. If crystal used for 8051 microcontroller is of 4.5 MHz determine the
time for setting the timer overflows for:
19BEI0042 i. Timer mode – 0 if THX starts from 00H
19BEI0069
ii. Timer mode – 2 if THX starts from 9CH
19BEI0123
2. Assume IR sensors are mounted in your classroom. A class has totally
60 students. The classroom has four lights and four fans. Assume IR
sensor is connected P2 and lights and fans are connected in Port 1 of
the 8051 microcontroller. Write the program for the following
i. Switch ON the lights and fans when any one person is entering the
classroom.
ii. Switch OFF the lights and fans when the classroom is empty.
iii. Count the number of students entering into the classroom and store
the count value in location 100H.
1. A keyboard has two keys; run and stop. Write a program that is
interrupt driven by these two keys using INT0 for the run key, and INT1
20BEE0024
20BEE0139 for the stop key. If the run key is selected, set pin P3.0 high; if stop is
20BEE0157
selected, set the pin low.
2. Write a program to trigger a MOSFET for every 2 seconds, which is
connected in the DC chopper circuit. Use timer 0 in mode 1.
1. Write an assembly language program to generate a square wave in Port
0 with a frequency of 50 Hz normally, the frequency should get
20BEE0173
20BEE0201 doubled when INT0 is activated and it should be tripled when INT1 is
20BEE0320
activated.
2. Write an assembly language program to perform the following.
i. Rotate the LED towards right if INT0 is true
ii. Rotate a single LED towards left if INT1 is true
iii. Generate 2 KHz square wave on P1.1. Use timer 1 in mode 2.
Assume XTAL = 22MHz.
20BEE0323 1. Generate PWM by comparing sine wave with constant DC value.
20BEE0330
20BEE0401 2. Load number 10H in R2 & 16H in R3. Increment R2 and decrement
R3 until they are equal.
1. Load the message “ELECTRICAL” in external memory. Write the
20BEI0057
program to count the string “E” in the given message.
20BEI0091 2. Write the program to implement the single axis solar panel system.

1. Write the ARM program to generate the Fibonacci series.


Practice 2. Load FFH in alternative RAM location of 8051.
1. Write the 8051-assembly program to generate 50 Hz and 100 Hz
square wave on P1.1 and P1.2 respectively. Use timer 1 in mode 1 for
Practice 50 Hz and timer 0 in mode 1 for 100 Hz. Assume XTAL = 22 MHz.
2. Generate the cosine wave form on Port 0 of 8051 microcontroller.

Practice 1. Write the 8051-assembly program to generate the following wave form on P1.

2. Write an ARM assembly program to perform the following task.


Load 0xABCDEFFE in any register and mask bit 27, 31 and 6.
Practice 1. Write the 8051-assembly program to generate the following wave forms from P0,
P1, P2 and P3 respectively.

2. Write an ARM assembly code to check the given number is ODD or EVEN. If the
given number is EVEN, set all even position of register R0 else set all ODD position
of register R0.

You might also like