Set No. 1
Code No: RR420303
IV B.Tech II Semester Regular Examinations, Apr/May 2007 MICROPROCESSORS ( Common to Mechanical Engineering and Automobile Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Explain various interrupt pins of 8085 Microprocessor, and also write their priority. (b) What are the various status flags provided in 8085? Discuss their role. [8+8] 2. (a) Draw and explain the pin out diagram of 8086. (b) Explain the various operations performed by Bus Interfacing unit in 8086. [10+6] 3. (a) Explain the Fixed part and variable part formats of IN and OUT instructions with examples. (b) Write a program to check whether the given string is palindrome or not. [8+8] 4. (a) Define a macro for moving an arbitrary character string that ends with an EOT character from one string of bytes in memory to another? (b) Write a procedure COMPUTE for performing the computation R ← X + Y − 3 The word variables X, Y, R and COMPUTE are in the same code segment. The variables X and Y are defined in data segment D1 SEG. The data segment D2 SEG contains the variable R. Show the necessary definition along with the procedure? [8+8] 5. (a) Evaluate the result after each instruction for the following sequence. MOX AX, 005H MOV CX,AX REP ADD AX,AX MOV CX,AX REP ADD AX,AX (b) It is necessary to move a block of data of length 100H from location 5000H:2000H to location 0B000H:2000H. Write an instruction sequence using string instructions? [8+8] 6. (a) Write an instruction sequence that will cause the priority of an 8259, whose even address is 0800H, to be IR5 , IR6 , IR7 , IR0 , IR1 , IR2 , IR3 , IR4 . Solve this problem when the current priority is IR 1 and for the second time assuming the current priority to be IR7 ? (b) Explain with examples how interrupt type 1 and type 3 provide debugging feature? [8+8] 1 of 2
Set No. 1
Code No: RR420303
7. Interface an 8-bit DAC to 8255 with an address map of 0100H to 0103H. The DAC provides output in the range of +5V to -5V. Write the instruction sequence for the following? (a) For generating a square wave with a peak to peak voltage of 2V and the frequency will be selected from memory location ‘FREQ’. (b) For generating a triangular wave with a maximum voltage of +4V and a minimum of -2V. [8+8] 8. (a) Draw the circuit of TTL to RS232 and explain the necessity of this interface. (b) Draw necessary circuit to interface 8251 to an 8086 based system with an address 0A0H. Write the sequence of instructions to initialize 8251 for synchronous transmission with odd parity, single SYNC character, 8-bit data character? [8+8] ⋆⋆⋆⋆⋆
2 of 2
Set No. 2
Code No: RR420303
IV B.Tech II Semester Regular Examinations, Apr/May 2007 MICROPROCESSORS ( Common to Mechanical Engineering and Automobile Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) What is a Microprocessor? (b) Explain in detail the pin diagram of 8085 Microprocessor.
[6+10]
2. (a) Draw and explain the pin out diagram of 8086. (b) Explain the various operations performed by Bus Interfacing unit in 8086. [10+6] 3. (a) Explain the following instructions i. ii. iii. iv.
LES POPF SAHF LEA
(b) Explain the Fixed part and variable part formats of IN and OUT instructions with examples. [8+8] 4. Write a recursive routine to evaluate the following polynomial Y = A0 +A1 X + A2 X2 +A3 X3 +... .......+AN XN The coefficients A0 , A1 , A2.... AN a re to be successive words in memory and all parameter addresses are to be passed via the stack. [16] 5. (a) Write an assembly language program that will examine an ASCII string of 100 characters and replace each decimal digit by a %. The character string starts at STRG. (b) Explain the prefix instruction format of 8086 processor? Discuss how these instructions are useful in string manipulation? [8+8] 6. Write an initialization sequence for an 8259 that is the only 8259 in an 8086 based system, with an even address of 0A0H that will cause. [16] (a) Request to the level triggered mode (b) IR0 request to an interrupt type 28 (c) SP/EN to output a disable signal to the data-bus transceivers. (d) The ISR bits to be cleared automatically at the end of second INTA pulse. (e) The IMR to be cleared. (f) The highest priority interrupt will be IR3 .
1 of 2
[16]
Set No. 2
Code No: RR420303
7. Interface an 8-bit DAC to 8255 with an address map of 0100H to 0103H. The DAC provides output in the range of +5V to -5V. Write the instruction sequence for the following? (a) For generating a square wave with a peak to peak voltage of 2V and the frequency will be selected from memory location ‘FREQ’. (b) For generating a triangular wave with a maximum voltage of +4V and a minimum of -2V. [8+8] 8. (a) Draw the block diagram of 8251 and explain each block? (b) Discuss the serial data transmission standards and their specifications? [8+8] ⋆⋆⋆⋆⋆
2 of 2
Set No. 3
Code No: RR420303
IV B.Tech II Semester Regular Examinations, Apr/May 2007 MICROPROCESSORS ( Common to Mechanical Engineering and Automobile Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Explain various interrupt pins of 8085 Microprocessor, and also write their priority. (b) What are the various status flags provided in 8085? Discuss their role. [8+8] 2. (a) Draw and explain the pin out diagram of 8086. (b) Explain the various operations performed by Bus Interfacing unit in 8086. [10+6] 3. (a) Explain the following Instructions. i. ii. iii. iv.
MOV POP XCHG SAHF
(b) Write a program to sort an array in descending order
[8+8]
4. (a) Write a procedure COMPUTE for performing the computation R ← X + Y − 3 The word variables X, Y, R and COMPUTE are in the same code segment. The variables X and Y are defined in data segment D1 SEG. The data segment D2 SEG contains the variable R. Show the necessary definition along with the procedure? (b) Give the definition of a macro RESTORE that will pop the register contents that have been pushed in the order AX, BX, CX, DX, SI and DI? [8+8] 5. (a) Give the instruction sequence that compares the first 20 bytes beginning at STR1 with the first ten bytes beginning at STR2 and branches to MAT FOUND if they are equal, otherwise continues in sequence? [8] (b) Explain the following instructions and the flags that are affected by these instructions. i. ii. iii. iv.
SCAS DST STOS DST MOVSW CMPSB
[2+2+2+2]
6. The I/O circuitry in an 8086 based system consists of five I/O devices with one status signal for each device. Design the required hardware providing two address locations to each device, one for status and other for data. In the range 0F00H to 1 of 2
Set No. 3
Code No: RR420303
0FOFH. Write an instruction sequence to test the status of each device and store it. [16] 7. Interface a stepper motor with 8-step input sequence to 8086 based system and write the instruction sequence to move the stepper motor 20 steps in clockwise and 12 steps in anti-clockwise direction. [16] 8. (a) Explain demand transfer mode and block transfer mode of 8237? (b) Show how 8237s are cascaded to provide more number of DRQ’s and explain the operation? (c) Explain how memory to memory transfer is performed with 8237? ⋆⋆⋆⋆⋆
2 of 2
[6+5+5]
Set No. 4
Code No: RR420303
IV B.Tech II Semester Regular Examinations, Apr/May 2007 MICROPROCESSORS ( Common to Mechanical Engineering and Automobile Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Explain various interrupt pins of 8085 Microprocessor, and also write their priority. (b) What are the various status flags provided in 8085? Discuss their role. [8+8] 2. (a) Write down the table used to find the Binary Codes for MOD and R/M fields in instruction formats of 8086. (b) Explain the Flag register of 8086. Also show their positions in Flag register. (c) Explain the purpose of Queue in 8086.
[8+4+4]
3. (a) Explain the following Instructions. i. ii. iii. iv.
MOV POP XCHG SAHF
(b) Write a program to convert a Binary Number to a BCD Number.
[8+8]
4. Give a set of macro definitions for performing the logical operations OR, AND and XOR on double words whose locations are indicated by the first two dummy parameters? The result is to be put in the concatenation DX:AX. Give the solution without nesting macro definitions? Provide the solution using definition nesting for the above problem? [16] 5. (a) Evaluate the result MOV MOX MOV REP ADD MOV REP ADD
after each instruction for the following sequence. DX, 00AH AX, 00H CX,DX AX,DX CX,AX AX,AX
(b) Write a program segment that will copy all ASCII characters in string STRG that are enclosed by a pair of parentheses to the string F MESG and store the number of characters moved in LENGTH? [8+8] 6. (a) Show the circuit required to generate the upper and lower I/O strobes in minimum and maximum modes of 8086? 1 of 2
Set No. 4
Code No: RR420303
(b) What is the minimum no. of bus cycles that can occur between the time an interrupt request is recognized and the first instruction in the interrupt service routine is fetched. Show the interrupt acknowledge cycle with a flow chart? [8+8] 7. Interface an 8-bit DAC to 8255 with an address map of 0100H to 0103H. The DAC provides output in the range of +5V to -5V. Write the instruction sequence for the following? (a) For generating a square wave with a peak to peak voltage of 2V and the frequency will be selected from memory location ‘FREQ’. (b) For generating a triangular wave with a maximum voltage of +4V and a minimum of -2V. [8+8] 8. (a) What is the difference between 20mA current loop and RS232−C standard? (b) Explain the necessity of RS232 to TTL interface and draw the circuit? (c) Draw the circuit of TTL to RS232 and explain the necessity of this interface. [5+5+6] ⋆⋆⋆⋆⋆
2 of 2