MBSD
MBSD
+------------------+
| |
| Input Device |
| |
+--------+---------+
|
v
+--------+---------+
| |
| Memory | <--- Stores both data and instructions
| |
+--------+---------+
|
v
+--------+---------+
| |
| Central |
| Processing Unit | <--- Executes instructions
| (CPU) |
| |
+--------+---------+
|
v
+--------+---------+
| |
| Output Device |
| |
+------------------+
Key Components:
1. Input Device: This is where data is entered into the system (e.g., keyboard, mouse).
2. Memory:
○ RAM: Temporary storage for both data and program instructions.
○ ROM: Permanent storage for essential programs (like the BIOS).
3. Central Processing Unit (CPU):
○ Control Unit: Directs operations of the CPU and tells other parts of the computer
how to carry out tasks.
○ Arithmetic Logic Unit (ALU): Performs arithmetic and logical operations.
4. Output Device: This is where processed data is output (e.g., monitor, printer).
● In a stored program computer, both program instructions and data are stored in memory.
The CPU fetches instructions from memory, decodes them, and executes them. This
allows for flexibility in programming, as instructions can be modified or replaced by
loading different programs into memory.
Design mp system
In notes
Steps describing mp
1. System Requirements
2. Microprocessor Selection
3. System Architecture
4. Memory Design
5. Input/Output Design
7. Clock Generation
● Design a clock circuit to synchronize the operations of the microprocessor and other
components.
8. Peripheral Interfacing
9. Software Development
Key Components
● Data Lines: Carry the actual data being sent to the microprocessor.
● Control Lines: Indicate when data is available and when it should be read.
● Address Lines: Help the microprocessor identify which input port is being accessed.
● Keyboards: Typically use a parallel input port to send multiple keypress signals.
● Sensors: Often connected via serial ports to send readings.
● Communication Interfaces: Such as SPI or I2C, which allow multiple devices to
communicate over fewer lines.
Design Considerations
● Speed: The required data transfer rate can dictate the choice between parallel and
serial.
● Complexity: Parallel interfaces are generally more complex due to multiple lines.
● Distance: Serial ports can transmit data over longer distances with fewer lines.
Microprocessor Examples
Digram in notes
output port for microprocessor based design
In a microprocessor-based design, the output port is a crucial component used for interfacing
the microprocessor with external devices. Here’s an overview of its functions, types, and
considerations:
1. Data Transmission: Output ports transmit data from the microprocessor to peripherals
like LEDs, motors, displays, etc.
2. Control Signals: They may also send control signals to manage the operation of
connected devices.
3. Status Indicators: Some output ports can drive status indicators or alarms to inform
users about system conditions.
Key Considerations
1. Voltage and Current Ratings: Ensure the output port can handle the required voltage
and current for the connected devices.
2. Number of Channels: Determine how many output lines are needed based on the
number of devices to be controlled.
3. Response Time: Evaluate the speed of the output port for time-sensitive applications.
4. Isolation: Consider isolation techniques for protecting the microprocessor from high
voltages or currents.
Microporcessor architecture and operation
Microprocessor architecture refers to the design and organization of a microprocessor, which is
the central processing unit (CPU) of a computer. Here’s a breakdown of key concepts related to
microprocessor architecture and operation:
1. Basic Components
2. Architecture Types
● Von Neumann Architecture: Uses a single memory space for both instructions and
data, which can lead to bottlenecks (known as the Von Neumann bottleneck).
● Harvard Architecture: Has separate memory spaces for instructions and data, allowing
simultaneous access and generally leading to better performance.
● Defines the set of instructions that a microprocessor can execute. Common ISAs
include:
○ CISC (Complex Instruction Set Computing): Supports a wide variety of
instructions (e.g., x86 architecture).
○ RISC (Reduced Instruction Set Computing): Focuses on a smaller set of
instructions that are executed more quickly (e.g., ARM architecture).
● Data Path: The part of the microprocessor that carries out data processing and
manipulation. It includes the ALU, registers, and buses.
● Control Path: Manages the data path operations based on the instruction being
executed. It generates control signals to direct the data flow.
5. Execution Cycle
6. Pipelining
7. Parallelism
● The clock speed (measured in GHz) determines how many cycles per second the
processor can execute. However, performance also depends on other factors like
architecture efficiency and cache size.
9. Power Consumption
Registers
Registers are small, fast storage locations within a microprocessor used to hold data temporarily
during processing. They are crucial for the CPU's operation, as they provide the quickest access
to data and instructions. Here’s an overview of their characteristics and types:
Characteristics of Registers
1. Speed: Registers are the fastest type of memory, providing rapid access for the CPU.
2. Size: Typically, registers are very small (usually 32 to 64 bits) compared to other memory
types (like RAM).
3. Purpose: They hold data that is being processed, instructions, addresses, and
intermediate results.
4.
Types of Registers
Usage in Operations
● During the fetch stage, the CPU retrieves instructions into the IR.
● In the decode stage, the CPU identifies which registers to use for the operation.
● During execution, data from registers is processed by the ALU.
● The results can then be written back to a register or stored in memory.
the microprocessor state and bar graph liquid
level indicator working
A microprocessor state and a bar graph liquid level indicator can be integrated into a system for
monitoring fluid levels. Here’s how both concepts can work together:
1. Components:
○ Sensors: Measure the liquid level (e.g., ultrasonic sensors, capacitive sensors,
float switches).
○ Microprocessor: Processes sensor data and controls the display.
○ Bar Graph Display: Typically consists of a series of LEDs or an LCD that
visually represents the liquid level.
2. Working Principle:
○ Sensing: The sensor detects the liquid level and sends this information to the
microprocessor.
○ Data Processing: The microprocessor reads the sensor data and determines the
corresponding liquid level.
○ Output Control:
■ The microprocessor activates a specific number of LEDs on the bar graph
based on the liquid level.
■ For instance, if the tank is half full, 5 out of 10 LEDs might light up.
○ Feedback Loop: The microprocessor continuously monitors the liquid level,
updating the display as needed.
Example Workflow
1. Initialization:
○ The microprocessor starts and initializes the bar graph display.
2. Continuous Monitoring:
○ The microprocessor enters a loop where it continuously reads data from the
liquid level sensor.
3. Decision Making:
○ Based on the sensor data, the microprocessor determines the level of the liquid.
○ It may check for specific conditions, such as if the level is below a certain
threshold, to trigger alarms or other actions.
4. Display Update:
○ The microprocessor updates the bar graph display:
■ Activates the corresponding number of LEDs.
■ May also update a numerical display or send data to other systems for
logging.
5. Error Handling:
○ If a sensor fails or a condition is met (e.g., overflow), the microprocessor updates
its state and may activate warning indicators.
1. I/O Methods
● The CPU actively checks (polls) the status of a peripheral device to see if it is ready for
data transfer.
● Advantages:
○ Simple to implement.
● Disadvantages:
○ Inefficient, as the CPU wastes time waiting for I/O operations, leading to wasted
processing cycles.
b. Interrupt-Driven I/O
● The CPU is interrupted by the device when it is ready for data transfer.
● The device sends an interrupt signal to the CPU, which then pauses its current operation
to handle the I/O request.
● Advantages:
○ More efficient than polling since the CPU can perform other tasks until
interrupted.
● Disadvantages:
○ More complex to implement, requiring an interrupt handling mechanism.
● A specialized controller (DMA controller) manages the data transfer directly between the
I/O device and memory, bypassing the CPU.
● The CPU is only involved to set up the DMA transfer and to handle the completion
notification.
● Advantages:
○ High-speed data transfer, freeing the CPU to perform other tasks.
● Disadvantages:
○ More complex hardware and requires additional control logic.
a. Byte-Oriented Transfer
● Data is transferred one byte (or character) at a time. This is common for devices like
keyboards and serial ports.
b. Word-Oriented Transfer
● Data is transferred in larger chunks (e.g., 16 or 32 bits), which is efficient for high-speed
devices such as disk drives.
c. Block Transfer
● Multiple bytes or words are transferred in a single operation, which reduces overhead
and improves performance. This is often used in conjunction with DMA.
3. Bus Architectures
● I/O devices are connected to the CPU via buses, which are pathways that carry data,
addresses, and control signals.
● Common Bus Types:
○ Address Bus: Carries addresses from the CPU to other components.
○ Data Bus: Carries the actual data being transferred.
○ Control Bus: Carries control signals from the CPU to manage operations.
● Different protocols define how data is transmitted over I/O interfaces, including timing
and signaling standards.
● Examples:
○ Serial Protocols (e.g., UART, SPI, I2C): Transfer data one bit at a time over a
single channel.
○ Parallel Protocols: Transfer multiple bits simultaneously over multiple channels.
5. I/O Ports
● Each peripheral device is typically assigned an I/O port or address in memory, allowing
the CPU to communicate with it.
● Memory-Mapped I/O: I/O devices are treated as memory locations, allowing the same
instructions used for memory access to be used for I/O.
● Port-Mapped I/O: Uses special instructions to access I/O devices via specific ports.
1. I/O Interfaces
These are the physical and logical connections between the CPU and peripheral devices,
facilitating data transfer. Common interfaces include:
● Serial Ports: Used for devices like keyboards and mice (e.g., RS-232, USB).
● Parallel Ports: Used for printers and scanners.
● Memory-Mapped I/O: Devices are mapped to specific addresses in memory, allowing
the CPU to use standard memory access instructions for I/O operations.
● Port-Mapped I/O: Uses specific I/O instructions to access device registers.
Control signals orchestrate the interaction between the CPU and peripheral devices:
● Read/Write Signals: Indicate whether data is being read from or written to a device.
● Select Signals: Specify which device is being communicated with, especially when
multiple devices are connected.
● Acknowledgment Signals: Used by devices to indicate they are ready for
communication or have completed a task.
3. Data Buses
Data buses are used for transferring data between the CPU and peripheral devices. They
include:
● Data Bus: Carries the actual data being transmitted.
● Address Bus: Carries the address of the I/O device or memory location being accessed.
● Control Bus: Carries control signals that manage the operation of the bus system.
4. I/O Controllers
● Peripheral Interface Controllers: Manage data transfer between the CPU and
peripherals, often handling specific communication protocols.
● DMA Controllers: Allow peripherals to transfer data directly to and from memory without
continuous CPU involvement, improving efficiency.
5. Interrupt Handling
Interrupts are signals that indicate that an I/O device needs attention:
● Interrupt Request (IRQ): A device sends an interrupt request to the CPU when it is
ready to send or receive data.
● Interrupt Service Routine (ISR): A special function that the CPU executes in response
to an interrupt, handling the I/O operation.
● Polling: The CPU continuously checks the status of I/O devices to see if they need
servicing. This is simpler but can waste CPU resources.
● Interrupts: More efficient, as the CPU can perform other tasks until a device signals that
it requires attention.
7. Control Registers
Peripheral devices often have control registers that the CPU writes to or reads from to manage
their operation:
1. Initialization: The CPU initializes the I/O device by writing configuration settings to
control registers.
2. Data Transfer:
○ Polling: The CPU checks the status register to see if the device is ready. If
ready, it reads/writes data.
○ Interrupt: The device interrupts the CPU when it is ready. The CPU pauses its
current task, executes the ISR, and handles the data transfer.
3. Completion: After data transfer, the CPU may read the status register again to confirm
the operation's success and may send further commands as necessary.
Instruction set
Instruction Set
The instruction set is a collection of machine-level commands that a processor can execute. It
defines the operations, data types, registers, addressing modes, and the methods for interacting
with memory and I/O devices. This foundational element of computer architecture allows
software to communicate effectively with hardware, enabling a wide range of applications.
The Data Transfer Control Group is responsible for moving data between various components
of the computer, such as registers, memory, and input/output devices. Instructions in this group
facilitate operations like loading data into registers, storing data from registers to memory, and
transferring data between different hardware peripherals. This group ensures that data is
efficiently and accurately communicated throughout the system.
Logic Group
The Logic Group executes logical operations essential for decision-making and data
manipulation. It includes operations such as AND, OR, NOT, and XOR, allowing the processor
to perform bitwise operations and comparisons. This group is critical for tasks that involve
conditional logic, enabling programs to respond dynamically to different inputs and states.
Branch Group
The Branch Group controls the flow of execution within a program by enabling jumps to different
instruction addresses based on specified conditions. This group handles both conditional
branches, which depend on the results of prior operations, and unconditional branches, which
allow for jumps regardless of conditions. This capability is vital for implementing loops, function
calls, and complex program logic.
The Stack and Machine Control Group manages the stack memory used for function calls, local
variable storage, and context switching. It oversees operations like pushing and popping data to
and from the stack, ensuring that the program maintains the correct execution context.
Additionally, this group handles machine-level controls, such as interrupts and system state
management, which are essential for multitasking and resource allocation.
Arithmetic Group
8085 Microprocessor
8086 Microprocessor
The 8086 microprocessor, also developed by Intel and introduced in 1978, is a 16-bit
microprocessor. It has a 20-bit address bus, enabling it to address up to 1 MB of memory. The
8086 features a 16-bit data bus, allowing it to process larger chunks of data simultaneously. It
includes a more complex and powerful instruction set compared to the 8085, supporting
advanced operations and memory segmentation. The 8086 can operate in minimum and
maximum modes, making it versatile for use in both single-processor and multi-processor
sysThe 8085 and 8086 microprocessors, both developed by Intel, have distinct architectures
and features that define their capabilities. Here’s a comparison of their architectures along with
key differences:
Architecture
8085 Microprocessor:
8086 Microprocessor:
Diagram Differences
● 8085 Diagram: Typically features a simpler block diagram, highlighting the CPU,
memory (RAM and ROM), and I/O interfaces. It includes basic functional units like the
ALU, control unit, and registers.
● 8086 Diagram: The block diagram is more complex, showing the CPU divided into two
main units: the Bus Interface Unit (BIU) and the Execution Unit (EU). The BIU handles
data and address bus control, while the EU manages instruction execution and
arithmetic operations. It also illustrates the segmented memory architecture.
Microcontroller
The 8051 microcontroller, introduced by Intel in 1980, is one of the most popular
microcontrollers used in embedded systems. It features:
The PIC microcontroller family, developed by Microchip Technology, consists of various 8-bit,
16-bit, and 32-bit microcontrollers. Key features include: