0% found this document useful (0 votes)
23 views1 page

Microprocessor Systems Exam Questions

This document appears to be an exam for a Microprocessor Based Systems course. It contains 7 questions assessing students' knowledge of microprocessor architecture, assembly language programming, and computer engineering concepts. The questions cover topics like USART architecture, interrupt handling, assembly programming to find factorials and divide numbers, assembler directives, timing delays, instruction sets, port modes, and addressing modes. Students are instructed to attempt any 5 of the 7 questions in detail with workings and justifications.

Uploaded by

Suprit Behera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

Microprocessor Systems Exam Questions

This document appears to be an exam for a Microprocessor Based Systems course. It contains 7 questions assessing students' knowledge of microprocessor architecture, assembly language programming, and computer engineering concepts. The questions cover topics like USART architecture, interrupt handling, assembly programming to find factorials and divide numbers, assembler directives, timing delays, instruction sets, port modes, and addressing modes. Students are instructed to attempt any 5 of the 7 questions in detail with workings and justifications.

Uploaded by

Suprit Behera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Roll Number:

Thapar Institute of Engineering & Technology, Patiala


Department of Computer Science and Engineering
END SEMESTER EXAMINATION
COEM BA (Third Year) Course Code: UCS617
Course Name: Microprocessor Based Systems
Design
Jan 27, 2021-1430 hrs
Time: 2 Hours, M. Marks: 50 Name of Faculty: Harpreet
Note: (.1) Attempt any 5 questions with proper justification and working.
(2) Assume missing data, if any, suitably.
Q1 Elaborate the architecture of USART in detail. Why Transmitter and (7+3)
Receiver section called as double buffered system?
Q2(a) How 8085 and 8086 microprocessors respond to the interrupts? (5)
Elaborate in steps.

dp Q2(b) Write a program in any 8085/8086/ARM assembly language to find


the factorial of given number.
(5)

Q3(a) What is the difference between LHLD and SHLD instruction? (5)
Illustrate with the help of timing diagrams.
Q3(b) Write a program in any 8085/8086/ARM assembly language to find (5)
the factorial of given number.
Q4(a) Explain different types of Assembler Directives with the help of (5)
example.
Q4(b) WAP to Generate a delay of 0.4 sec if the crystal freq is 5 MHz in (5)
8085.
Q5(a) Write a program in any 8085/8086/ARM assembly language to (5)
divide two 16-bit numbers.
Q5(b) Discuss the following instructions with suitable example in 8086: (5)
i. LEA
• ii. AAM
iii. XLAT
iv. LOOP
v. TEST

Q6(a) Explain the working of ports in different modes in Programmable (6)


Peripheral Interface.
Q6(b) Write a set of instructions to set bit 4 of Port C of 8255. Assume the (4)
address of Port A is 10H.
Q7 Differentiate between the following terms with example:- (2.5*4)
i. Pre-Index and Post-Index Addressing in ARM
ii. Thumb and ARM Instructions
iii. CPSR and SPSR
iv. Little Endian and Big Endian

Common questions

Powered by AI

Pre-Index and Post-Index Addressing are two techniques in the ARM architecture for calculating addresses in the instruction set. In Pre-Index Addressing, the address of the operand is calculated before the base register is updated, meaning the effective address is determined by adding an offset to the base register before accessing the memory. An example would be LDR R1, [R0, #4] where R0 plus 4 is used directly as the effective address. In contrast, Post-Index Addressing calculates and uses the address of the operand before updating the base register, meaning the memory is accessed first, and then the offset is added to update the base register accordingly, as shown in LDR R1, [R0], #4 where R0 is updated to R0+4 after the operand is accessed at the original R0 address.

Little Endian and Big Endian are byte order conventions for storing multibyte data types like integers. Little Endian stores the least significant byte at the smallest address, while Big Endian stores the most significant byte at the smallest address. Implications of using Little Endian include easier access and manipulation of the least significant byte, especially beneficial in stack operations and formatting numbers for byte swapping. Big Endian is intuitive for network protocols, aligning with human logical reading of high-order bytes first. The choice between them affects data serialization, cross-platform data sharing, and performance, especially when interpreting raw byte sequences where endian mismatch can lead to incorrect interpretation of data values.

The Current Program Status Register (CPSR) and the Saved Program Status Register (SPSR) are critical in ARM processor operations. The CPSR holds the current state of the processor, including flags for condition codes, interrupt disable bits, and the current mode of operation, affecting how instructions are processed and executed. It enables state checks and decision-making dynamically during operation. The SPSR serves a particular role in exception handling, where it saves the program state when an exception occurs, allowing for restoring the processor state precisely after exceptions are handled. This mechanism facilitates both normal execution and exception-driven state changes without permanent alterations to the CPSR, allowing robust multi-mode operations.

The LHLD instruction (Load HL Registers Directly) is used in 8085 microprocessor to load data from a specified memory address into the HL register pair, whereas the SHLD instruction (Store HL Register Pair Directly) stores the content of the HL register pair into specified memory locations. The LHLD reads from two consecutive memory locations, starting at the given address and loads the first byte into the L register and the second byte into the H register. Conversely, SHLD stores the contents of the L register to the first memory address and the H register to the subsequent address. Timing diagrams reveal the sequence of control and data signals during execution, showing LHLD requires reading memory twice and has additional cycles for setting up addresses as outputs. SHLD writes to memory and similarly broadcasts the address in two cycles with a focus on output and write control signals.

The LEA (Load Effective Address) instruction in the 8086 microprocessor is used to compute the effective address of an operand and load it into a specified register. It does not modify the flags and is especially beneficial for obtaining the offset component in memory operations without altering the data content at the address. For example, 'LEA BX, [SI+DI*2]' computes the effective address resulting from the SI and DI registers and stores it in the BX register without reading or writing memory. It is often used for indexing arrays and performing pointer arithmetic efficiently.

Generating a specific delay on the 8085 microprocessor requires programming a loop that consumes processors' cycles, translating them into real-time delays based on the crystal frequency. For a 0.4-second delay using a 5 MHz crystal, the program needs to account for 2 MHz effective clock cycles (as the clock is divided by an inherent factor of 2 internally for machine cycles). This results in 2,000,000 cycles per second. To achieve a 0.4-second delay, 800,000 cycles are needed. A loop structure that effectively iterates the number of required cycles without altering other operations must be crafted, ensuring the accumulated delay meets the targeted real-world timing.

The transmitter and receiver sections of a USART (Universal Synchronous/Asynchronous Receiver/Transmitter) are termed double-buffered because each contains two registers: a shift register and a buffer register. The buffer register holds the data temporarily before it's transferred to the shift register for transmission or storage. As the shift register deals with serial data streaming, the buffer register ensures continuous data flow without delays, allowing one byte to be loaded while the other is transmitted/received. This mechanism increases efficiency and speed since it allows the processor to prepare the next piece of data for transmission before the previous byte has been fully sent or fills one byte while the other is being read electronically.

The 8085 microprocessor handles interrupts using a series of steps, starting with recognizing the interrupt request, completing the current instruction, saving the program counter, and jumping to the interrupt service routine provided by a vector address. The vector's location is determined externally during an RST instruction. The 8086 microprocessor, however, incorporates a more advanced mechanism where interrupt requests are acknowledged while completing the current instruction, and it uses a 256-entry Interrupt Vector Table with each entry being four bytes to hold the CS:IP (Code Segment:Instruction Pointer) address of the service routine. In addition, 8086 supports both hardware and software interrupts, with priorities handled by interrupt priority management. Nesting is supported through the use of the Interrupt Flag (IF) and the Trap Flag (TF) being manipulatable as needed for granular interrupt control.

Assembler directives are commands within assembly language code that manage the assembly process but do not generate machine code themselves. Instead, they provide instructions for the assembler on how to process the program. Examples include the 'ORG' directive to set the starting address of the code and 'END' to indicate the end of the source file. Directives such as 'DB' or 'DW' define data, while 'EQU' assigns constant values. They influence the assembly by organizing the code's structure, memory allocation, constant definition, and ensuring the correct translation, which affects the runtime memory map and variable access.

You might also like