Microprocessor and Microcontroller (4341101) - Summer 2025 Solution

Solution guide for Microprocessor and Microcontroller (4341101) Summer 2025 exam

Question 1(a) [3 marks]

Define Microprocessor and draw its block diagram.

Answer: A microprocessor is a programmable digital device that performs arithmetic and logical operations on data according to stored instructions.

Block Diagram:

  • CPU: Central Processing Unit performs all operations
  • Memory: Stores programs and data
  • Control Unit: Controls instruction execution sequence

Mnemonic: "My Computer Processes Instructions" (Memory-CPU-Program-Instructions)

Question 1(b) [4 marks]

Explain operand and opcode with proper instruction example.

Answer: Opcode specifies the operation to be performed. Operand specifies the data on which operation is performed.

Example Table:

InstructionOpcodeOperandFunction
MOV A,BMOVA,BMove B to A
ADD A,#05HADDA,#05HAdd 05H to A
  • Opcode: Operation code (MOV, ADD, SUB)
  • Operand: Data or address (A, B, #05H)
  • Format: Opcode + Operand = Complete Instruction

Mnemonic: "Operation On Data" (Opcode-Operand-Data)

Question 1(c) [7 marks]

Compare Microprocessor and Microcontroller.

Answer:

ParameterMicroprocessorMicrocontroller
DefinitionCPU onlyCPU + Memory + I/O
MemoryExternal RAM/ROMInternal RAM/ROM
I/O PortsExternal interfaceBuilt-in ports
CostHigher system costLower system cost
PowerHigher consumptionLower consumption
SpeedFaster processingModerate speed
ApplicationsComputers, laptopsWashing machine, microwave
  • Microprocessor: General purpose computing
  • Microcontroller: Specific embedded applications
  • Integration: Microcontroller has everything on single chip

Mnemonic: "Micro Means More Integration" (Microcontroller-Memory-More-Integration)

Question 1(c OR) [7 marks]

Compare RISC and CISC.

Answer:

ParameterRISCCISC
InstructionsSimple, fewComplex, many
Instruction SizeFixed lengthVariable length
Execution TimeSingle cycleMultiple cycles
Memory AccessLoad/Store onlyAny instruction
RegistersMore registersFewer registers
PipelineEfficient pipeliningComplex pipelining
ExamplesARM, MIPSx86, 8085
  • RISC: Reduced Instruction Set Computer
  • CISC: Complex Instruction Set Computer
  • Performance: RISC faster, CISC more flexible

Mnemonic: "Reduced Instructions Speed Computing" (RISC-Instructions-Speed-Computing)

Question 2(a) [3 marks]

Explain Bus Organization of 8085 microprocessor.

Answer: 8085 has three types of buses for communication with external devices.

Bus Organization Table:

Bus TypeLinesFunction
Address Bus16 lines (A0-A15)Memory addressing
Data Bus8 lines (D0-D7)Data transfer
Control BusMultiple linesControl signals
  • Address Bus: Unidirectional, 64KB memory addressing
  • Data Bus: Bidirectional, 8-bit data transfer
  • Control Bus: Read, Write, IO/M signals

Mnemonic: "Address Data Control" (ADC)

Question 2(b) [4 marks]

Explain function of ALE signal with diagram.

Answer: ALE (Address Latch Enable) separates address and data on multiplexed bus.

ALE Timing Diagram:

goat
  • High ALE: Address is available on AD0-AD7
  • Low ALE: Data is available on AD0-AD7
  • Function: Latches lower address byte
  • Frequency: ALE = Clock frequency ÷ 2

Mnemonic: "Address Latch Enable" (ALE)

Question 2(c) [7 marks]

Describe architecture of 8085 microprocessor with the help of neat diagram.

Answer:

Key Components:

  • ALU: Performs arithmetic and logical operations
  • Registers: Store temporary data (A, B, C, D, E, H, L)
  • Program Counter: Points to next instruction
  • Stack Pointer: Points to stack top
  • Control Unit: Generates control signals

Mnemonic: "All Registers Program Stack Control" (A-R-P-S-C)

Question 2(a OR) [3 marks]

Draw Flag Register of 8085 microprocessor & explain it.

Answer:

Flag Register Format:

goat

Flag Functions:

  • S (Sign): Set if result is negative
  • Z (Zero): Set if result is zero
  • AC (Auxiliary Carry): Set for BCD operations
  • P (Parity): Set for even parity
  • C (Carry): Set when carry/borrow occurs

Mnemonic: "Some Zero Auxiliary Parity Carry" (SZAPC)

Question 2(b OR) [4 marks]

Explain De-multiplexing of Address and Data buses for 8085 Microprocessor.

Answer: De-multiplexing separates address and data signals from AD0-AD7 lines.

De-multiplexing Circuit:

goat
  • ALE High: Address latched in external latch
  • ALE Low: Data flows through buffer
  • 74LS373: Common latch IC used
  • Benefit: Separate address and data buses

Mnemonic: "Address Latch External Demultiplex" (ALED)

Question 2(c OR) [7 marks]

Describe Pin diagram of 8085 microprocessor with the help of neat diagram.

Answer:

goat

Pin Categories:

  • Power: VCC, VSS
  • Clock: X1, X2, CLK
  • Address/Data: AD0-AD7, A8-A15
  • Control: ALE, RD, WR, IO/M
  • Interrupt: INTR, INTA, RST7.5, RST6.5, RST5.5, TRAP

Mnemonic: "Power Clock Address Control Interrupt" (PCACI)

Question 3(a) [3 marks]

Write a function of DPTR and PC.

Answer:

Functions Table:

RegisterFunctionSize
DPTRData Pointer16-bit
PCProgram Counter16-bit

DPTR Functions:

  • External Memory: Access external data memory
  • Addressing: 16-bit address for MOVX instructions

PC Functions:

  • Instruction Pointer: Points to next instruction
  • Auto Increment: Increments after each instruction fetch

Mnemonic: "Data Program Counter" (DPC)

Question 3(b) [4 marks]

Draw PCON SFR of 8051and Explain function of each bit.

Answer:

PCON Register (87H):

goat

Bit Functions:

  • SMOD: Serial port baud rate doubler
  • GF1, GF0: General purpose flags
  • PD: Power Down mode control
  • IDL: Idle mode control

Power Management:

  • IDL = 1: CPU stops, peripherals run
  • PD = 1: Complete power down

Mnemonic: "Serial General Power Idle" (SGPI)

Question 3(c) [7 marks]

Explain architecture of 8051 microcontroller with the help of neat diagram.

Answer:

Major Blocks:

  • CPU: 8-bit processor with ALU
  • Memory: 4KB ROM, 128B RAM
  • Timers: Two 16-bit timers
  • Serial Port: Full duplex UART
  • I/O Ports: Four 8-bit ports
  • Interrupts: 5 interrupt sources

Mnemonic: "CPU Memory Timer Serial IO Interrupt" (CMTSII)

Question 3(a OR) [3 marks]

List common features of 8051 microcontroller.

Answer:

Common Features:

  • CPU: 8-bit microcontroller
  • Memory: 4KB ROM, 128B RAM
  • I/O Ports: 32 I/O lines (4 ports)
  • Timers: Two 16-bit timers/counters
  • Serial Port: Full duplex UART
  • Interrupts: 5 interrupt sources
  • Clock: 12MHz maximum frequency

Mnemonic: "CPU Memory IO Timer Serial Interrupt Clock" (CMITSIC)

Question 3(b OR) [4 marks]

Draw IP SFR of 8051 and Explain function of each bit.

Answer:

IP Register (B8H):

goat

Bit Functions:

  • PS: Serial port interrupt priority
  • PT1: Timer 1 interrupt priority
  • PX1: External interrupt 1 priority
  • PT0: Timer 0 interrupt priority
  • PX0: External interrupt 0 priority

Priority Levels:

  • 1: High priority
  • 0: Low priority

Mnemonic: "Priority Serial Timer External" (PSTE)

Question 3(c OR) [7 marks]

With the help of neat diagram explain Pin diagram of 8051 microcontroller.

Answer:

goat

Pin Groups:

  • Power: VCC (40), VSS (20)
  • Clock: XTAL1 (19), XTAL2 (18)
  • Reset: RST (9)
  • Ports: P0, P1, P2, P3
  • Control: ALE, PSEN, EA

Mnemonic: "Power Clock Reset Ports Control" (PCRPC)

Question 4(a) [3 marks]

Explain arithmetic instructions with example.

Answer:

Arithmetic Instructions:

InstructionFunctionExample
ADDAdditionADD A,#10H
SUBBSubtractionSUBB A,R0
MULMultiplicationMUL AB
DIVDivisionDIV AB
INCIncrementINC A
DECDecrementDEC R1
  • ADD A,#10H: Add 10H to accumulator
  • Flags: Affected by arithmetic operations

Mnemonic: "Add Subtract Multiply Divide Increment Decrement" (ASMIDI)

Question 4(b) [4 marks]

Write an 8051 Assembly Language Program to Find 2's complement of a value stored at memory location 65H. Put the result on same location.

Answer:

Assembly

Program Steps:

  • Load: Get value from memory location 65H
  • Complement: Generate 1's complement using CPL
  • Add 1: Convert to 2's complement
  • Store: Put result back to same location

Mnemonic: "Load Complement Add Store" (LCAS)

Question 4(c) [7 marks]

List Addressing Modes of 8051 Microcontroller and explain them with example.

Answer:

Addressing Modes Table:

ModeDescriptionExampleUsage
ImmediateData in instructionMOV A,#25HConstant data
RegisterData in registerMOV A,R0Fast access
DirectMemory addressMOV A,30HRAM access
IndirectAddress in registerMOV A,@R0Pointer access
IndexedBase + offsetMOVC A,@A+DPTRTable access
RelativePC + offsetSJMP LOOPBranch instructions
BitBit addressSETB P1.0Bit operations

Examples:

  • MOV A,#25H: Load immediate value 25H
  • MOV A,@R0: Load from address in R0
  • SJMP LOOP: Jump relative to current PC

Mnemonic: "Immediate Register Direct Indirect Indexed Relative Bit" (IRDIIRB)

Question 4(a OR) [3 marks]

Explain logical instruction with example.

Answer:

Logical Instructions:

InstructionFunctionExample
ANLAND operationANL A,#0FH
ORLOR operationORL A,R1
XRLXOR operationXRL A,#55H
CPLComplementCPL A
RLRotate leftRL A
RRRotate rightRR A
  • ANL A,#0FH: AND accumulator with 0FH (mask operation)
  • Applications: Bit masking, data manipulation

Mnemonic: "AND OR XOR Complement Rotate" (AOXCR)

Question 4(b OR) [4 marks]

Write an 8051 Assembly Language Program to Multiply the number in register R3 by the number in register R0 and put the result in internal RAM location 10h(MSB) and 11h(LSB).

Answer:

Assembly

Program Flow:

  • Load: Move multiplicand and multiplier to A and B
  • Multiply: Use MUL AB instruction
  • Store: MSB in B register, LSB in A register
  • Result: 16-bit result stored in two locations

Mnemonic: "Load Multiply Store Result" (LMSR)

Question 4(c OR) [7 marks]

Explain data transfer instruction with example.

Answer:

Data Transfer Instructions:

CategoryInstructionExampleFunction
RegisterMOVMOV A,R0Register to register
ImmediateMOVMOV A,#25HImmediate to register
DirectMOVMOV A,30HMemory to register
IndirectMOVMOV A,@R0Indirect addressing
ExternalMOVXMOVX A,@DPTRExternal memory
CodeMOVCMOVC A,@A+DPTRCode memory
StackPUSH/POPPUSH ACCStack operations

Examples:

  • MOV A,R0: Move R0 content to accumulator
  • MOVX A,@DPTR: Read from external data memory
  • PUSH ACC: Push accumulator to stack

Data Movement:

  • Internal: Within 8051 memory space
  • External: To/from external memory
  • Code: From program memory

Mnemonic: "Move Data Between Locations" (MDBL)

Question 5(a) [3 marks]

Explain the 8051 flags with the help of PSW format.

Answer:

PSW Register (D0H):

goat

Flag Functions:

  • C (Carry): Set when carry/borrow occurs
  • AC (Auxiliary Carry): For BCD arithmetic
  • OV (Overflow): Set when signed overflow
  • P (Parity): Even parity of accumulator
  • RS1, RS0: Register bank select bits

Mnemonic: "Carry Auxiliary Overflow Parity Register" (CAOPR)

Question 5(b) [4 marks]

Draw and explain diagram Interfacing 7 segment with microcontroller.

Answer:

7-Segment Interface Circuit:

goat

Components:

  • ULN2003: Current driver IC
  • Resistors: Current limiting (330Ω)
  • Display: Common cathode type

Working: Port data drives display segments through current driver

Mnemonic: "Port Driver Display Ground" (PDDG)

Question 5(c) [7 marks]

Interface 8 LEDs with microcontroller and write a program to turn on and off.

Answer:

LED Interface Circuit:

goat

Assembly Program:

Assembly

Mnemonic: "Light Emitting Display Interface" (LEDI)

Question 5(a OR) [3 marks]

List Applications of microcontroller in various fields.

Answer:

Applications by Field:

FieldApplications
HomeWashing machine, Microwave, AC
AutomotiveEngine control, ABS, Airbag
IndustrialProcess control, Robotics
MedicalPacemaker, Blood pressure monitor
CommunicationMobile phones, Modems
SecurityAccess control, Burglar alarm
EntertainmentGaming consoles, Remote control

Mnemonic: "Home Auto Industrial Medical Communication Security Entertainment" (HAIMCSE)

Question 5(b OR) [4 marks]

Draw and explain diagram interfacing of DC motor with 8051.

Answer:

DC Motor Interface:

goat

Components:

  • L293D: Dual H-bridge driver IC
  • Motor: 12V DC motor
  • Control: Direction and speed control

Control Logic:

  • Forward: P1.1=1, P1.2=0
  • Reverse: P1.1=0, P1.2=1
  • Stop: P1.1=0, P1.2=0

Mnemonic: "Driver Control Motor Direction" (DCMD)

Question 5(c OR) [7 marks]

Interface LCD with microcontroller and write a program to display "Microprocessor and Microcontroller".

Answer:

LCD Interface:

goat

Assembly Program:

Assembly

Mnemonic: "Liquid Crystal Display Interface" (LCDI)