MM Assignmemt 2
MM Assignmemt 2
(ANSWERS)
RISC Microcontrollers:
Instruction Set:
o Smaller set of simple instructions, typically fixed-length.
o Each instruction performs a basic operation (load, store, arithmetic, etc.).
o Relies on multiple instructions to accomplish complex tasks.
Processing:
o Faster execution of individual instructions (often one cycle per instruction).
o May require more instructions for complex tasks, potentially impacting
overall performance.
o Often leverages features like pipelining to improve efficiency.
Benefits:
o Simpler design, potentially lower cost.
o Lower power consumption due to faster instruction execution and less
complex hardware.
o Well-suited for applications requiring real-time performance and energy
efficiency (e.g., battery-powered devices).
Examples:
o ARM Cortex-M series
o Microchip PIC32
CISC Microcontrollers:
Instruction Set:
1|Page
o Larger and more complex set of instructions.
o Instructions can vary in length and complexity.
o Some instructions can perform multiple operations in a single cycle,
potentially reducing code size.
Processing:
o Instruction execution time can vary depending on complexity.
o Can be faster for certain tasks due to fewer instructions needed.
o May require more complex hardware for decoding instructions.
Benefits:
o Can be simpler to program for some tasks due to fewer instructions
required.
o May be suitable for applications where code size is a critical factor.
Examples:
o Intel MCS-51 series
o Microchip PIC16 series
2|Page
3. Draw and Explain the control signal generation in 8085
Microprocessor.(4M)
The 8085 microprocessor generates various control signals to coordinate
data transfer and operations with memory and peripherals. Here's a
breakdown of the control signal generation process:
Inputs:
The 8085 microprocessor outputs three key signals that serve as inputs for
control signal generation:
o READ (RD'): Active LOW signal indicating a read operation from memory
or Input/Output (I/O).
o WRITE (WR'): Active LOW signal indicating a write operation to memory or
I/O.
o I/O or MEMORY (IO/M'): This signal determines whether the operation
involves memory (IO/M' = 1) or an I/O device (IO/M' = 0).
Decoder:
A 3-to-8 decoder (like the 74LS138) is used to decode the three input
signals (RD', WR', IO/M') into eight output lines.
Each output line of the decoder represents a specific control signal based
on the combination of the input signals.
Control Signals:
The decoder's output lines are used to generate various control signals,
including:
o Memory Read (MEMRD'): Active LOW signal sent to memory during a
read operation from memory.
o Memory Write (MEMWR'): Active LOW signal sent to memory during a
write operation to memory.
o Input Read (INRD'): Active LOW signal sent to the I/O interface during a
read operation from an I/O device.
3|Page
o Input Write (INWR'): Active LOW signal sent to the I/O interface during a
write operation to an I/O device.
o ALE (Address Latch Enable): A positive-going pulse generated at the
beginning of a machine cycle to latch the lower order address onto the
address bus.
o S1 and S0 (Status signals): These two signals indicate the type of
operation being performed (fetch, read, write, etc.) and are used for
additional control purposes.
Explanation:
The combination of RD', WR', and IO/M' signals determines which control
signal is activated.
For instance, if RD' = 0, WR' = 1, and IO/M' = 1, then MEMWR' will be
activated, indicating a write operation to memory.
Similarly, other combinations will activate the corresponding control signal
for the specific operation (read/write from memory or I/O).
4|Page
4. What are the addressing modes for 8051? Explain in brief
giving suitable example.(7M)
The 8051 microcontroller offers various addressing modes to specify the
location of data operands in instructions. Here's a breakdown of the
common addressing modes:
accumulator A)
2. Register Addressing (Reg):
o The operand is located in one of the 8 general-purpose registers (R0 to
R7).
o Example: ADD A, R2 (Add the value in register R2 to the accumulator A)
1)
4. Indirect Addressing (@Reg):
o The address of the data is stored in a register pair.
DPTR (Data Pointer): a 16-bit register used for external memory or data
tables.
R0 & R1 combined: used for internal RAM data access.
o Example: MOV A, @R0 (Move the value from the memory location pointed
5|Page
o Primarily used with DPTR for accessing data tables or elements within
arrays stored in external memory.
o Example: MOV B, @A + 20H (Move the value from the memory location
20H bytes away from the address in register A to register B)
LOOP:
; Complement PORT B
CPL P0 ; Complement PORT B
; End of program
SJMP $ ; Jump to the beginning (infinite loop)
7|Page