Вы находитесь на странице: 1из 4

1

Microprocessor Based Systems (EE-401)


Microcontroller 8051
Q#1: a) Explain the types of directives? Write anyone program that uses only one directive out of these directives? ADD 3 to 12. 360 times and when the process completes send the final result to port2 Q#2: a) Define the following flags? 1) CY, the carry flag 2) AC, the auxiliary flag 3) P , the parity flag 4) The Over flow flag Show the status of these flags after the addition of 38H and 2FH. b) Assume 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 pin P1.5 to turn on a buzzer

Q#3: a) explain the register bank in the 8051 microcontroller and also show their RAM addresses. b) Write a program to read the temperature and test it for the value 75. According to the test results, place the temperature value into the Registers indicated by the following. If T = 75 then A = 75 If T < 75 then R1 = T If T > 75 then R2 = T Q#4: a) What is ACALL and LCALL ? Differentiate between these two instructions. b) A switch is connected to pin P1.7 and an LED to pin P2.0. Write a Program to get the status of the switch and send it to the LED.

Q#5: a) For an 8051 system of 11.0592 MHZ, find the time delay for the following subroutine: DELAY : MOV R3,#250 HERE : NOP NOP NOP NOP DJNZ R3,HERE RET Also , find the machine cycle for each instruction individually. b) Assume that the on-chip ROM has a message THINK, SAY and DO . Write a program to Copy it from code space into the upper memory space starting at address 80H. Also, as you place a byte in upper RAM, give a copy to P0.

2
Q#6: a) Write a program to get hex data in the range of 00 FFH from Port 1 and convert it to decimal. Save it in R7, R6 and R5. b) Write a program to copy the value 55H into RAM memory locations 40H to 41H using (a) Direct addressing mode, (b) register indirect addressing mode without a loop, and (c) with a loop Q#7: a) Draw a block diagram of 8051 microcontroller and label each pin. Explain the function of port 0 in the microcontroller chip. Why we called to port 0 a dual role? Define shortly. b) Write an ALP to blink two LEDS alternatively. Q#8: Explain that which one port has an pull up resistor and which one has not ? Write a program that 1) Creates a square wave of 50 % duty cycle on bit 0 of port 1 and 2) Creates a square wave of 66% duty cycle on bit 3 of port 1. Q#9: How many ways are there for accessing the entire 8 bits? Explain each one briefly? Write an assembly language program to perform to solve the following at last send the data to port 2. Q#10: a) Write a program that subtracts the number 3F from 23. Also show the steps in that program and show that which one flag will be enabled and disabled? b) Explain the following in detail I) Data Pointer II) Stack Pointer III) stack IV) PSEN pin V) 8052 microcontroller Q#11: Explain in detail Data serialization how it can be performed with 8051 microcontroller. Write a program to transfer value 58 H serially via pin p1.1. Put one high at the start and end of the data. Send the byte LSB first ? How to rotate the bit right or left through the carry. Explain with the help of Instructions.

Q#12: a) Indicate which mode and which timer are selected for each of the following: 1) MOV TMOD , # 01H 2) MOV TMOD , # 20H 3) MOV TMOD , # 12H b) Write an ALP for traffic signal such that RED light remains ON for 8 seconds, RED and Yellow remain ON for two seconds and green light remain ON for 4 seconds. Q#13: what are different types of 7 segment displays? b) Write and ALP to display digits 0-9 on common cathode type seven segment display. Q#14: Assume that XTAL = 11.0592 MHZ. What values do we need to load into the timers registers if we want to have a time delay of 5ms? Show the program for Timer 0 to create a pulse width of 5ms on P2.3. Using the same crystal frequency, write a program to generate a square wave of 2 KHZ frequency on pin P1.5. Q#15: a) What are the different interrupts in microcontroller 8051, b) differentiate interrupts and polling also explain the steps to enable an interrupt. Write a program to create a delay of 1mili second approximately through use of interrupts.

Q#16: a) What is the difference between RET and RETI instructions? Explain why we cannot use RET instead of RETI as the last instruction of an ISR? b) Write a program that continuously gets 8-bit data from P0 and sends it to P1 while simultaneously creating a square wave of 200sec period on p2.1.Use Timer 0 to create a square wave. Assume XTAL = 11.0592MHz.

Q#17: a) what are edge triggered interrupts and level triggered interrupts? b) Assuming that P3.3 (INT1) is connected to a pulse generator, write a program in which a pulse will be send to P1.3, which is connected to a low active LED. In other words the LED is turned on and off at the same rate as the pulse is applied to the INT1 pin. Perform this by both edge triggered interrupt and level triggered interrupt. Q#18 a) Explain Different types of timers in detail b) Write an assembly language program to display ANY WORD on any LCD interfaced with 8051 microcontroller Q#19 a) What is BCD ? Explain the types of BCD ? b) Assume that 5 BCD data items are stored on RAM locations starting at 40H . Write a program to find the sum of all the numbers of the memory locations 40, 41,42,43,44 40 = 71 41 = 11 42 = 65 43 = 59 44 = 37 Q#20 a) Write a program for the AT89C51 to toggle all the bits of P0, P1, and P2 every 1/4 of a second. b) for 8051 microcontroller, Write an ALP to add two decimal numbers. If there is carry on the LED connected to P1.6

Microprocessor 8085
Q#1(a) what is a microprocessor? What is the difference between microprocessor and a CPU also differentiate the microcomputer when compared with the microprocessor. (b) Explain the difference between between the machine language and the assembly language of the 8085 microprocessor? What is an assembler? What are the advantages of an assembly language in comparison with the high level language? (c) SSI, MSI, LSI stands for? Explain each term.

Q#2(a) what is a bus? Explain the types of buses and also specify the direction of the information flow on each bus? (b) Specify the four control signal commonly used by the 8085 microprocessor? Explain each control signal briefly? If the memory chip size is 256 bits , how many chip are required to make up 2K(2056) bytes of memory? (c) What is the difference between tri-state devices and buffers? Why the tri-state devices are essential in a bus oriented system?

Q#3(a) How many types of flag registers are used in the 8085 microprocessor? Explain the function of each flag briefly? How many interrupts signal are there in the 8085 microprocessor? (b) Draw a schematic diagram of Demultiplexing the bus AD 7-AD0 and also label it? Explain each term given in the diagram shortly? (c) ALE and IO/M stands for? Explain the function of each signal.

Q#4: (a) what is op-code and operand? How many ways (types) are there for specifying the operand? Explain each type of operand? (b) What is machine cycle and T-state? How many T-state are required to complete one machine cycle and how many machine cycles are required to complete one instruction cycle? (c) What is addressing mode? Explain the types of addressing mode.

**** BEST OF LUCK****

Вам также может понравиться