You are on page 1of 4

Register Questions

Number
16BEE0355 1. Write an 8051 assembly program with the following assumptions. Port
18BEE0001
P1.3 is an input and represents the condition of an oven. If it goes high
18BEE0027
18BEE0078 it means that the oven is hot. Monitor the bit continuously. When it goes
18BEE0096
high send a low – to – high pulse to port 2.5 to blink a LED.
18BEE0100
2. Write an 8051 assembly program to
a. Create a Square wave of 30 % duty cycle on bit 3 of port 1.
b. Create a Square wave of 40 % duty cycle on bit 1 of port 2.
18BEE0121 1. Write a program that continuously gets a single bit of data from P3.1
18BEE0206
and send it to P2.0, while simultaneously creating a square wave of
18BEE0221
18BEE0222 180 µs period on pin P1.5. Use timer 1 to create square wave. Assume
18BEE0234
that XTAL = 20 MHz.
18BEE0246
2. Give the content of the accumulator and flags after executing each
instructions. Assume R0 = 05H, DPTR=7000H, A=76H. The
location 7001 contains the value 62H and the location 7000 contains
the value 55H and 7002 contains 78H and location 05h contains 83H
MOV B ,#35H
SUBB A,@R0
INC DPTR
MUL AB
MOVX A,@DPTR
ADD A,B
INC DPTR
MOVX A, @DPTR
1. Write a program to convert a 8 bit hexadecimal number
18BEI0006
available in A register into decimal number
18BEI0037
18BEI0118 2. Give the content of the accumulator and flags after executing
19BEE0030
each instructions. Assume R1 = 03H, DPTR=9000H, A=66H.
19BEE0036
19BEE0037 The location 9001 contains the value 52H and the location
9000 contains the value 45H and 9002 contains 78H and
location 03h contains 73H
MOV B ,#25H
SUBB A,@R1
INC DPTR
MUL AB
MOVX A,@DPTR
ADD A,B
INC DPTR
MOVX A, @DPTR

19BEE0081 1. Assume that the INT0 pin is connected to a switch that is normally
19BEE0089
high. Whenever it goes low, it should turn on an LED. The LED is
19BEE0098
19BEE0125 connected to P2.3 and is normally off. When it is turned on it should
19BEE0134
stay on for a fraction of second. As long as the switch is pressed
19BEE0166
low, the LED should stay on. Write an 8051 assembly program with
the above specifications.

2. Write an assembly language program to check whether the number


is negative. If it is positive then add the value 100d to a register R2
and if it is negative then subtract 100d from the register R3. Also
specify the algorithm for the above mentioned program.
19BEE0175 1. Write a 8051 assembly program to solve the following
19BEE0183
19BEE0184
19BEE0187
19BEE0188
19BEE0192

2. Give the algorithm and write the program to find the largest number in
an array.
19BEE0201 1. Generate a squarewave with 8ms delay using timer 0 in mode2 at p2.1.
19BEE0251
2. Write an 8051 assembly program with the following assumptions. Port
19BEE0278
19BEE0295 P2.4 is an input and represents the condition of an oven. If it goes high
19BEE0309
it means that the oven is hot. Monitor the bit continuously. When it goes
19BEE0324
high send a low – to – high pulse to port 1.5 to turn on a LED.
19BEE0330 1. Assuming that XTAL = 20 MHz, show a program to generate a square
19BEE0354
wave on pin P2.2, find the lowest square wave frequency that we can
19BEE0356
19BEE0369 generate using mode 1.
19BEE0370
19BEE0377 2. Write an assembly language program to check whether the number is
positive. If it is positive then add the value 72h to a register R2 and if it
is negative then subtract 72h from the register R3. Also specify the
algorithm for the above mentioned program.
19BEE0396 1. Write an 8051 assembly program with the following assumptions. Port
19BEE0416
P2.4 is an input and represents the condition of an oven. If it goes high
19BEE0431
19BEI0009 it means that the oven is hot. Monitor the bit continuously. When it goes
19BEI0010
high send a low – to – high pulse to port 1.5 to turn on a LED.
19BEI0029
2. Generate a wave with 6ms ON time delay and 4ms OFF time delay
using timer 0 in mode1 at p2.1.Assume the processor frequency as
60Mhz.
19BEI0062 1. Write an assembly language program to generate a square wave in Port1
19BEI0081
with a frequency of 50 Hz normally, the frequency should get doubled
19BEI0084
19BEI0086 when INT1 is activated and it should be tripled when INT0 is activated.
19BEI0091
2. In 8051 microcontroller write the program by considering that bit P1.2
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 P2.6 to turn on a
LED.
19BEI0094 1.Write an 8051 assembly program with the following assumptions. Port
19BEI0102
P2.4 is an input and represents the condition of an oven. If it goes high it
19BEI0122
19BEI0144 means that the oven is hot. Monitor the bit continuously. When it goes high
19BEI0146
send a low – to – high pulse to port 1.5 to turn on a LED.
2. Write an assembly language program to check whether the number is
negative. If it is positive then add the value 98h to a register R2 and if it is
negative then subtract 98h from the register R3. Also specify the algorithm
for the above mentioned program.

You might also like