8
8
2A. Three 8 bit numbers X, N1 and N2 are stored in internal data RAM locations 20H, 21H
and 22H respectively. Write an 8051 ALP to perform the following operations
If X=00H; then LSB of 23H = LSB of N1 (AND) LSB of N2,
If X=01H; then MSB of 23H = MSB of N1 (OR) MSB of N2,
If X=02H; then MSB of 23H = compliment of MSB of N2. (04)
2B. Explain the following with respect to 8051 microcontroller
i. Power on Reset circuit with connection diagram
ii. Alternate functions assigned to each of the pins of Port “3”. (03)
2C. Determine the exact delay generated by the following 8051 program. Assume XTAL =
12MHz.
MOV A, #19H
MOV R0, #0A0H
MOV R1,# 0AH
UP: NOP
INC R0
DJNZ R1, UP
NEXT: MOV B,#05H
DIV AB
MOV R2,A
DJNZ R2, NEXT
REPEAT:DJNZ R0, REPEAT (03)
4A. Write an 8051 program to read the status of the switches connected to pins P1.0 and
P1.1. Wait till a switch is closed and if switch P1.0 is closed; transmit serially the
message “Normal Speed” at 19200 baud. If P1.1 is closed, transmit serially the message
“High speed” at 19200 baud rate. XTAL=11.0592MHz. (04)
4B. Interface a matrix key board in a 2X 5 matrix form containing ten keys ‘0’ to ‘4’ in Row 1
and ‘5’ to ‘9’ in Row 2 , to 8051. Use port ‘0’( P0.0 and P0.1) pins for the rows and port
‘1’ pins ( P1.0 to P1.4) for the columns. Show the connection diagram and write an
8051 ALP to detect any key pressed and transfer the ASCII code of the key pressed to
port ‘2’. Use software debouncing technique. Assume XTAL=11.059sMHz. (04)
4C. Explain the importance of busy flag in LCD. How can it be accessed? Also suggest an
alternate method to avoid writing to LCD before it is ready. (02)
5A. List and describe with an example, the various shift and rotate operations supported by (03)
ARM7 instruction set. Mention constraints, if any in case of each of these operations.
5B. Write a note on the register bank of ARM7 processor, indicating clearly the visible
registers in different modes of operation. Describe the functions of following bits of (04)
CPSR register: ‘N’, ‘Z’, ‘C’, ‘V’, ‘I’ and ‘F’.
5C. 16 bit data corresponding to armature current, armature resistance, series field
resistance and terminal voltage of a DC compound generator are available in successive
memory locations starting at 0X00009000 ( ‘2’ memory locations for each data). Write (03)
an ARM7 ALP to determine the EMF generated and store the result in next ‘4’ memory
locations. ( .