• www.uptuexam.com
  • GBTU Results 2014
  • MTU Results 2014
  • UPTU Circulars
  • COP Result 2012,13,14
  • UPTU Previous Papers
  • GATE study material
  • Robotics Projects
Thank you for visiting www.UPTUexam.com " Free download Exam materials, previous year question papers, free ebooks & Providing Important Questions To Do their Exams Well and Totally a FREE SERVICE for all engineering streams (B.Tech)."

MICROPROCESSOR

 MICROPROCESSOR :- Important questions




Q1. Write a program to turn on and turn off the light for every 2 seconds. Use data bit D4 to operate the light. Also show the delay calaculation and assume system frequency 5Mhz.

Q2. Write a program to generate the square wave with a 200µs on period and 400µs off period. Also show the delay calaculation and assume system frequency 2Mhz.

Q3. Write a program to:
a)      Clear the accumulator.
b)      Add 45H
c)      Subtract 90H
d)     Add 64H
e)      Display the results after subtracting and after adding 64H.
Specify the answers you would expect at the output ports.

Q4.Write a program to load the bit pattern 91H in register B and 87H in register C. Mask all the bits except D0 from the registers  B and C. If D0 is at logic1 in both registers, turn on the light connected to the D0 position of output port 01H; otherwise, turn off the light.

Q5. A set of eight data bytes is stored in memory location starting at XX50 H. Write a program to check each data byte for the bits D7 and D0. If D7 or D0 is 0, reject the data byte; otherwise, store the data bytes at memory locations starting at XX60hH.
Data(H) : 80,52,E8,78,67,35,62, F5

Q6. A set of eight data bytes is stored in memory location starting at XX50 H. Write a program to check whether a byte 40H exist in the set. If it does, stop checking and display its memory location; otherwise output FF H.
Data (H) : 48,32,F2,38,37,40,82,8A

Q7. Six bytes of data are stored in memory locations starting at XX60H. Write a program to add all data bytes. Use register c to save any carries generated, while adding the data bytes. Display the entire sum at two output ports.
Data (H): A2,54,A2,86,5B,25

Q8. Draw the flowchart to load the hexadecimal numbers 90 H and A5 H in registers D and E respectively and add the numbers. If the sum is greater than FFH, display 01H at port 0; otherwise, display the sum.

Q9. Write a program to provide the given on/off time to three traffic lights (Green, Yellow and Red) and two pedstrain signs(WALK and DON’T WALK). The signal lights and signs are turned on/off by the data bits of an output port as shown below:
Lights
Data Bits
On Time
1.      Green
D7
20 seconds
2.      Yellow
D6
10 seconds
3.      Red
D4
20 seconds
4.      WALK
D2
20 seconds
5.      DON’T WALK
D0
30 seconds
The traffic and pedestrain flow are in the same direction; the pedstrain should cross the road when the Green light is on.

Q10. Write a program to control a railway crossing signal that has two alternately flashing red lights, with a 1 second delay on time for each light.

Q11. Write a 20ms time delay subroutine using register pair BC. Clear the Z flag without affecting any other flags in the flag register and return to the main program.

Q12. Write a program to add the two hex numbers 7A and 46 and to store the sum at memory location XX98H and the flag status at location XX97H.

Q13. An 8bit binary no. is stored in memory location XX50H. Write a program to transfer the byte to the accumulator and Separate the two nibbles. Also call the subroutine to convert each nibble into ASCII hex code and Store the codes in memory location XX60H and XX61H.

Q14.  A BCD no. between 0 and 99 is stored in an R/W memory location called the input buffer (INBUF). Write a main program and a conversion subroutine (BCDBIN) to convert the BCD no. into its binary equivalent.  Store the result in a memory location defined as the output buffer (OUTBUF).

Q15. A set of six unpacked BCD no. is stored in memory locations starting at XX30 H. Assume the seven segment codes of the digits  0 to 9  for common cathode LED are stored in memory location starting at XX70 H. Write a program to select an appropriate seven segment code for each digit. The code should be stored in memory location in reverse order starting at XX90 H.

Q16.Calculate the delay in the following loop, assuming the system clock period is 0.5microseconds:
                                    LXI B, 12FF H      10
                  DELAY:   DCX B                   6
                                   XTHL                     16
                                   NOP                        4
                                   MOV A, C              4
                                   ORA B                    4
                                   JNZ DELAY           10/7



Q17. A set of ten packed BCD no. is stored in memory location starting at XX40 H.
i) Write a program to add these numbers in BCD. If a carry is generated save it in register B and adjust it for BCD. The final sum will be less than 9999BCD .
ii) Write a second subroutine to unpack the BCD sum stored in register A and B and Store them in the memory location starting at XX60 H. (MSB at XX60 H and LSB at XX63 H)

  Q18. With reference to Q17. Write a subroutine to convert the unpacked BCD digits stored at XX60 to XX63 H into ASCII code and store them at output buffer memory starting at XX80 H.      

Q19. Write a program to subtract two packed BCD numbers (75- 36) stored in register B and C respectively. The minuend is placed in register C and subtrahend is placed in register B. Display the result at output port 0.

Q20. A binary number is stored in memory location XX50 H. Convert the no. into BCD and store each BCD as two unpack BCD digits in the output buffer (XX70 H). to perform the task, write a main program and two subroutines: one to supply powers of 10 and the other to perform the conversion.

2 comments:

  1. I'm amazed, I have to admit. Seldom do I encounter a blog that's both equally educative and entertaining, and without a doubt, you've hit
    the nail on the head. The issue is something which not enough folks are speaking intelligently
    about. I am very happy that I stumbled across this in my hunt for something concerning this.


    Also visit my weblog; minecraft games

    ReplyDelete
  2. Please provide us the answer key of these questions

    ReplyDelete