EE3404-MPMC CAE1 Answer Key
EE3404-MPMC CAE1 Answer Key
Semester/Year VI/III
Course Code& EE3404 & Microprocessor and
Course Title Microcontroller
Credits 3
Course Type Core
Nature of the
Theory
Course
PART A (10X2=20)
Sl.No Question
Find Maximum external memory that shall be interfaced with 8085 which has 16-
bit address lines.
The Intel 8085 microprocessor has a 16-bit address bus, meaning it can address a
maximum of:
216=65,536 (or 64 KB)
Since 8085 is an 8-bit microprocessor, it can access a total of 64 KB (Kilobytes) of
external memory.
1.
This 64 KB memory space is used for both ROM and RAM. Typically, a portion is
allocated for program memory (ROM), and the rest is available for data memory
(RAM).
So, the maximum external memory that can be interfaced with the 8085
microprocessor is 64 KB (or 65,536 bytes).
What is the signal classification of 8085?
The signals of the 8085 microprocessor can be classified into six groups based on
their function:
1. Power Supply and frequency Signals
2. 2. Address Signals
3. Data Bus Signals
4. Control and Status Signals
5. Externally initiated signals
6. Serial I/O ports
Specify the four control signals commonly used by 8085 MPU.
Control Signals
• ALE (Address Latch Enable) – Distinguishes address and data phases
3.
• IO/M ̅ – Differentiates memory and I/O operations
̅
• RD (Read) – Enables memory or I/O read
• WR̅ (Write) – Enables memory or I/O write
Define machine cycle and T-state.
4. Machine Cycle:
A machine cycle is the time required by the 8085 microprocessor to complete one
operation, such as fetching an opcode, reading/writing data, or performing an I/O
operation. It consists of one or more T-states.
T-State:
A T-state is one clock cycle of the microprocessor. It is the smallest unit of time in
which the processor executes a part of an operation. Multiple T-states form a machine
cycle.
Example:
• An Opcode Fetch Machine Cycle in 8085 consists of 4 to 6 T-states.
• A Memory Read/Write Machine Cycle typically takes 3 T-states.
State any two applications of look up table.
• Character Encoding and Display – Used in embedded systems and
microcontrollers for mapping ASCII values to display characters in seven-
segment or LCD displays.
5.
• Mathematical Computation – Used to store precomputed values of
trigonometric, logarithmic, or exponential functions to speed up calculations in
signal processing and scientific applications.
What are the different Peripheral interfacing used with 8085 processor?
• Input/Output Devices – 8255 PPI, 8279 Keyboard/Display Interface.
• Communication Interfaces – 8251 USART, RS-232.
9.
• Interrupt Controllers – 8259 PIC.
• Timers/Counters – 8253/8254 PIT.
• Memory Interfaces – EPROM, RAM.
What is the need for for 8259 PIC?
• 8085 has only one INTR pin, limiting multiple interrupt handling.
10. • 8259 PIC allows prioritization and handling of multiple interrupts efficiently.
• Supports vector addressing to avoid polling.
• Reduces the processing overhead of interrupt handling.
Sl.No Question
11.a With neat sketch, briefly explain the interrupt structure of 8085 microprocessor.
11.b Two machine codes 00111110 (3EH) and 00110010 (32H) are stored in memory locations
8000H and 8001H, respectively. The first machine code (3EH) represents the opcode to load
a data byte in the accumulator, and the second code (32H) represents the data byte to be
loaded in the accumulator. Illustrate the bus timings as these machine codes are executed.
Calculate the time required to execute the Opcode Fetch and the Memory Read cycles and
the entire instruction cycle if the clock frequency is 2 MHz.
12.a Illustrate the contents of stack memory and register when push and POP instructions are
executed, and explain how memory pointers are exchanged.
PUSH Instruction
Definition:
The PUSH RP instruction stores the contents of a register pair (RP) into the stack.
Execution Steps:
1. SP is decremented by 1 → Higher byte of the register pair is stored.
2. SP is decremented by 1 → Lower byte of the register pair is stored.
3. SP is updated to point to the new stack location.
Key Takeaways
1. PUSH stores register pair data into the stack (SP decrements).
2. POP retrieves register pair data from the stack (SP increments).
3. The stack is LIFO (Last In, First Out).
4. The Stack Pointer (SP) is updated automatically after every PUSH/POP operation.
12.b (i) Write instructions to clear the CY flag, to load number FFH in register B, and increment
(B). If the CY flag is set, display 01 at the output port; otherwise, display the contents of
register B. Explain your results. (10)
Objective:
• Clear CY flag
• Load FFH in register B
• Increment B (result becomes 00H, and CY flag is set)
• If CY = 1, output 01H
• Else, output contents of register B
Explanation:
• FFH + 1 = 00H, which causes an overflow, setting the Carry flag (CY).
• The program checks the CY flag using JNC.
• Since CY is set, it outputs 01H to port 01H.
• If CY weren’t set, it would output the incremented value of B.
(ii) Write a subroutine to set the Zero flag and check whether the instruction JZ (Jump on
Zero) functions properly, without modifying any register contents other than flags. (6)
Objective:
• Write a subroutine that sets the Zero (Z) flag
• Use the JZ (Jump if Zero) instruction to test whether it works
• Do not modify any register except flags
Explanation:
• XRA A sets Accumulator = 00H, which sets the Zero flag (Z = 1)
• The JZ instruction checks this flag and jumps to the label if it’s set
• No other register (like B, C, D...) is changed — only the flags are affected
The Intel 8255 is a popular Programmable Peripheral Interface (PPI) device used to connect
input/output devices to a microprocessor like the 8085.
It provides 24 I/O pins that can be programmed in different modes.
Main Functional Blocks:
• Data Bus Buffer:
Interfaces the internal data bus of 8255 to the system data bus.
• Read/Write Control Logic:
Controls the operation (read or write) depending on control signals like RD, WR, CS,
A0, and A1.
• Control Logic:
o Decides whether the operation is related to Port A, Port B, Port C, or the
Control Word Register.
• Group A & Group B:
o Divides ports into two groups:
▪ Group A: Port A + upper half of Port C.
▪ Group B: Port B + lower half of Port C.
o Each group can operate in different modes.
Ports:
• Port A: 8-bit bidirectional data port.
• Port B: 8-bit bidirectional data port.
• Port C:
o Split into two 4-bit ports (CU and CL).
o Used for handshaking and control signals.