18EC46
18EC46
(08 Marks)
2 a. Explain the PSW register and also the find the status of the conditional flags if number AB
and FF is added in the accumulator. (06 Marks)
b. Write the block diagram of internal RAM of 8051 and explain. (06 Marks)
c. Write the interfacing diagram of 4K bytes of RAM and 8K bytes of ROM to 8051
microcontroller and explain. (08 Marks)
3 a. List the bit level logical instructions present in 8051 and explain its working. (06 Marks)
b. Explain the working of following instructions with an example :
i) MOVX A, @dptr
ii) CJNE @R0, # data, address
iii) RETi
iv) XRL dataaddress, A
v) RL A
vi) JZ codeaddress. (06 Marks)
c. Write an assembly level program to realize the function y = AB + C and store the result
obtained in carry flag. Assume that bit A is present at 30H, bit B is present at 40H and bit C
is present at 50H. (08 Marks)
4 a. With a neat diagram, explain the range associated with JUMP instruction. (06 Marks)
b. Explain the working of MUL and DIV instruction of 8051 with an example. (06 Marks)
c. Write an assembly level program to convert the given eight bit binary number into its BCD
equivalent and store the result in register DPTR. (08 Marks)
5 a. What is the use of stack and explain the working of PUSH and POP instruction. (06 Marks)
b. Calculate the delay produced by the program given below. Assume that the crystal used is
12MHz.
MOV R1, #255
Same : DJNZ R1, same
Repeat : SJMP repeat
Also find instead of 255 what value should be stored to get a delay of 200s. (06 Marks)
c. Write an assembly level program to find the number of 1s and 0s present in the external
RAM 8000H. (08 Marks)
1 of 2
18EC46
6 a. How many ports are present in 8051? Briefly explain the functions associated with all the
ports. (06 Marks)
b. Write an ALP to find the factorial of given number and store the result in register R3.
(06 Marks)
c. Write a program to check the status of the switch connected to P1.3 of the switch is ON
toggle the bits of port P3 else toggle the bit of port 2, to toggle the bits use a subroutine
program. (08 Marks)
7 a. With a diagram explain the different steps to program timer0 in mode1. (06 Marks)
b. Write a program for counter1 in mode 2 to count pulse and display the state of TLI count on
port 2. Assume that the clock is connected to pin 3.5. (06 Marks)
c. Write an assembly level program to generate a square wave on P1.3 of frequency 2KHz. Use
timer1 in model1 and show the delay calculation. XTAL used 11.0592MHz. (08 Marks)
8 a. Explain the bit pattern of SCON register in 8051 microcontroller. (06 Marks)
b. Write a 8051 C program to transmit the message ECE using serial communication port of
8051 use baud rate 4800. (06 Marks)
c. Explain the RS232 DB09 connector signals used for serial communication by connecting it
to 8051 microcontroller. (08 Marks)
9 a. Write the interrupt vector table of 8051 microcontroller and also explain how the register IE
is used for activating the interrupts. (06 Marks)
b. Write an 8051 C program to generate a square wave of frequency 10KHz on P1.2 using 8bit
autoreload timer and also to read the data from P2 and send it through P3 continuously. Use
timer interrupt. (06 Marks)
c. Show how LCD can be interfaced to the microcontroller and using that display the message
‘HELLO’ on LCD. (08 Marks)
*****
2 of 2