KEMBAR78
Microprocessor Unit 1 & 2 | PDF | Central Processing Unit | Microcontroller
0% found this document useful (0 votes)
21 views57 pages

Microprocessor Unit 1 & 2

Uploaded by

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

Microprocessor Unit 1 & 2

Uploaded by

dhananjay1592
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 57

MICROPROCESSOR

AND
MICROONTROLLER
Microprocessor:
• Microprocessor is small sized electronic component inside a computer that carries out
various tasks involved in data processing as well as arithmetic and logic operations.
• Microprocessor is built over an integrated circuit comprising millions of small components
like resisters, transistors, and diodes.
Basics of Microprocessor –
A Microprocessor takes a bunch of instructions in machine language and executes them,
telling the processor what it has to do. Microprocessor performs three basic things while
executing the instruction:
• It performs some basic operations like addition, subtraction, multiplication, division, and
some logical operations using its Arithmetic and Logical Unit (ALU). New Microprocessors
also perform operations on floating-point numbers also.
• Data in microprocessors can move from one location to another.
• It has a Program Counter (PC) register that stores the address of the next
instruction based on the value of the PC, Microprocessor jumps from one
location to another and takes decisions.

Microprocessor structure
Block Diagram of a Microcomputer
• A microprocessor consists of an ALU, control unit and register array.
Where ALU performs arithmetic and logical operations on the data
received from an input device or memory. Control unit controls the
instructions and flow of data within the computer. And, register
array consists of registers identified by letters like B, C, D, E, H, L, and
accumulator.
Evolution of Microprocessors
We can categorize the microprocessor according to the generations or according to the size of
the microprocessor:
First Generation (4 - bit Microprocessors)
• The first generation microprocessors were introduced in the year 1971-1972 by Intel
Corporation. It was named Intel 4004 since it was a 4-bit processor.
• It was a processor on a single chip. It could perform simple arithmetic and logical operations
such as addition, subtraction, Boolean OR and Boolean AND.
• I had a control unit capable of performing control functions like fetching an instruction from
storage memory, decoding it, and then generating control pulses to execute it.
Second Generation (8 - bit Microprocessor)
• The second generation microprocessors were introduced in 1973 again by Intel. It was a first
8 - bit microprocessor which could perform arithmetic and logic operations on 8-bit words.
It was Intel 8008, and another improved version was Intel 8088.
Third Generation (16 - bit Microprocessor)
• The third generation microprocessors, introduced in 1978 were represented
by Intel's 8086, Zilog Z800 and 80286, which were 16 - bit processors with a
performance like minicomputers.
Fourth Generation (32 - bit Microprocessors)
• Several different companies introduced the 32-bit microprocessors, but the
most popular one is the Intel 80386.
Fifth Generation (64 - bit Microprocessors)
• From 1995 to now we are in the fifth generation. After 80856, Intel came out
with a new processor namely Pentium processor followed by Pentium Pro
CPU, which allows multiple CPUs in a single system to achieve multiprocessing.
• Other improved 64-bit processors are Celeron, Dual, Quad, Octa Core
processors.
Microcontroller
• A microcontroller (MCU) is a small computer on a single integrated circuit that is designed to
control specific tasks within electronic systems. It combines the functions of a central
processing unit (CPU), memory, and input/output interfaces, all on a single chip.
• Microcontrollers are widely used in embedded systems, such as home appliances, automotive
systems, medical devices, and industrial control systems. They are also used in consumer
electronics products, such as gaming systems, digital cameras, and audio players.
• A typical microcontroller consists of a processor core, volatile and non-volatile memory,
input/output peripherals, and various communication interfaces. The processor core is
responsible for executing instructions and controlling the other components of the
microcontroller. The memory is used to store data and program code, while the
input/output peripherals are used to interact with the external environment
The microcontroller used in Embedded System. for example:-

• Security Systems
• Laser Printers
• Automation System
Working of Microcontroller:

• A microcontroller’s major role is that it can be thought of as a self-contained system with a


processor memory. Its peripherals can be used in the same way that an 8051 microcontroller
can. The bulk of microcontrollers in use today are embedded in other types of machinery such as
telephones, appliances, vehicles, and computer system peripherals.

Types of Microcontroller:
Here are some of the most common types of microcontrollers:
• 8-bit Microcontrollers: These are the most basic type of microcontrollers, typically used in
simple applications such as toys, small appliances, and remote controls. They have a limited
processing power and memory capacity, but they are easy to use and cost-effective.
• 16-bit Microcontrollers: These are more advanced than 8-bit microcontrollers and are capable of
performing more complex tasks. They are commonly used in applications such as medical
devices, automotive systems, and industrial control systems.
• 32-bit Microcontrollers: These are the most powerful and feature-rich microcontrollers, capable
of handling large amounts of data and performing high-speed processing. They are used in
applications such as gaming systems, multimedia devices, and high-end industrial automation.
• ARM Microcontrollers: These microcontrollers are based on the ARM architecture and are
widely used in a variety of applications, including mobile devices, automotive systems, and
industrial control systems.
• PIC Microcontrollers: These microcontrollers are manufactured by Microchip Technology and
are commonly used in a wide range of applications, including home appliances, automotive
systems, and medical devices.
• AVR Microcontrollers: These microcontrollers are manufactured by Atmel Corporation and are
commonly used in applications such as robotics, industrial control systems, and consumer
electronics.
• FPGA-based Microcontrollers: These microcontrollers use field-programmable gate arrays
(FPGAs) to provide highly customizable and flexible processing capabilities. They are commonly
used in applications such as digital signal processing, video processing, and high-speed
networking.
• CPU: The microcontroller is referred to as a CPU device since it is utilized to carry and decode
data before effectively completing the assigned duty. All microcontroller components are
connected to a specific system utilizing a central processing unit. The CPU can decode
instructions retrieved from the programmable memory.
• Memory: The memory chip of a microcontroller functions similarly to a microprocessor in that
• Input and Output ports: In general, these ports are used to interface or otherwise drive
various appliances like LEDs, LCDs, printers, and so on.
• Serial Ports: Serial ports are used to offer serial interfaces between the microcontroller and
a range of additional peripherals, such as the parallel port.
• Timers: Timers and counters are included in a microcontroller. In a microcontroller, they are
used to manage all timing and counting activities. The fundamental function of a counter is
to count external pulses, whereas timers conduct clock tasks, pulse production,
modulations, frequency measurement, and oscillations, among other things.
• ADC (Analog to Digital Converter): ADC is an acronym for Automated Data Collection
(Analog to Digital Converter). Analog to digital converter is abbreviated as ADC. The primary
function of an ADC is to convert analog signals to digital signals. The required input signals
for ADC are analog, and the resulting digital signal is employed in a variety of digital
applications such as measurement equipment.
• Control Interpretation: This controller is used to provide delayed control to a running
application, with internal or external interpretation.
• Block with Special Functions: A specific function block is included in some special
microcontrollers built for particular devices such as robots and space systems. This block has
additional ports for doing specific tasks.
Applications of Microcontroller :
• In contrast to microprocessors, which are used in personal computers and other devices,
microcontrollers are mostly employed in embedded devices. These are mostly uti lized in a variety of
products such as implantable medical devices, machine tools, automotive engine control systems,
office equipment, remote-controlled appliances, and so on. The following are some of the most
common uses for microcontrollers.

Uses of Microcontroller :
• Microcontrollers are used in a wide range of electronic devices and systems, including:
• Home Appliances: Many home appliances, such as washing machines, refrigerators, and air
conditioners, use microcontrollers to perform various functions, such as temperature control, timing,
and monitoring.
• Automotive Systems: Microcontrollers are used in automotive systems, such as engine control units,
anti-lock braking systems, and airbag systems, to control various functions and ensure safe and efficient
operation.
• Medical Devices: Medical devices, such as insulin pumps, heart monitors, and blood glucose meters,
use microcontrollers to perform various functions and provide accurate and reliable results.
• Embedded devices. These are mostly utilized in a variety of products such as implantable medical
devices, machine tools, automotive engine control systems, office equipment, remote-controlled
• IOT Devices: Internet of Things (IoT) devices, such as smart home systems, wearables, and environmental sensors,
use microcontrollers to connect to the internet and perform various functions.
• Aerospace and Defense Systems: Microcontrollers are used in aerospace and defense systems, such as satellites,
avionics, and missiles, to control and monitor various functions and ensure safe and efficient operation.
⮚ Issues in Microcontroller :
• some of the most common issues that can arise with microcontrollers:
• Timing Issues: Microcontrollers rely on precise timing to execute instructions and perform tasks. Any issues with
timing can cause errors and malfunctions, which can be difficult to diagnose and fix.
• Power Issues: Microcontrollers require a stable and consistent power supply to operate correctly. Any fluctuations
or disruptions in the power supply can cause the microcontroller to malfunction or fail.
• Heat Issues: Microcontrollers generate heat during operation, and excessive heat can damage the device or cause
it to malfunction. Heat issues can be caused by poor design, inadequate cooling, or high ambient temperatures.
• Noise Issues: Microcontrollers can be affected by electromagnetic interference (EMI) and radio frequency
interference (RFI) from other electronic devices, which can cause errors and malfunctions.
• Code Issues: The programming code used to control the microcontroller can contain errors and bugs, which can
cause the device to malfunction or fail.
• Security Issues: Microcontrollers can be vulnerable to security breaches, including unauthorized access, data
theft, and malware attacks.
❑What is Digital Signal Processor :
• “A Digital signal processor is a special type of microprocessor which is fabricated
on metal oxide semiconductor integrated circuits”. DSPs are extensively used in
different applications like digital image processing, telecommunications, audio
signal processing, speech recognition systems, sonar, radar, etc, and also used in
consumer electronics like mobile phones, HDTV (high-definition television)
products, disk drives, etc.

• The processor is a simple chip or logic circuit that responds to basic instructions
as well as input processes to control the processing unit.
• The processor is an essential component in electronic systems like smartphones,
embedded systems, laptops, computers, etc.
• The two essential components of a processor are ALU and the control unit.
• There are different types of processors available in the market which is used
based on the requirement like microcontroller, microprocessor, digital signal
❑How Does Digital Signal Processor Work?
The digital signal processor mainly works by using real-world signals like audio, voice
& after that mathematically manipulating them. A DSP performs different mathemati
subtract, multiply & divide.

Digital Signal Processor

• A digital signal processorProgram memory is used to store the programs to process data.
• Data Memory is used to store the data to be processed.
• Compute engine executes the mathematical operations, access the data from the data memory & program from the program me
includes main components like program memory, data memory, compute engine, and Input/Output.
•A microphone is used as a transducer which changes the sound signal into an electrical signal.
•After that, an analog electrical signal which is generated from a microphone is given to an op-amp to
condition the analog signal.
•An anti-aliasing filter is an LPF (low pass filter) that is located on the input of an ADC. This filter is used to
band-limit wideband signals.
•After that, a simple ADC converter unit uses analog signals & outputs as binary digits streams.
•In this block diagram, the DSP is the heart of the system. At present, CMOS ICs are used to make DSPs
that have high data throughputs, dedicated instruction sets & high speed.
•After that DAC converts digital to an analog signal. The smoothing filter is another LPF used to smoothen
the output by eliminating unnecessary high-frequency components.
•Here, a speaker is the output transducer.

Digital Signal Processor Block Diagram


What is Register
• The Registers are very fast computer memory which are used to execute programs and
operations efficiently. This does by giving access to commonly used values, i.e., the values
which are in the point of operation/execution at that time. So, for this purpose, there are
several different classes of CPU registers which works in coordination with the computer
memory to run operations efficiently.
• So, for this purpose, there are several different classes of CPU registers which works in
coordination with the computer memory to run operations efficiently.
• The sole purpose of having register is fast retrieval of data for processing by CPU. Though
accessing instructions from RAM is comparatively faster with hard drive, it still isn’t enough for
CPU. For even better processing, there are memories in CPU which can get data from RAM
which are about to be executed beforehand. After registers we have cache memory, which are
faster but less faster than registers.
• Memory Data Registers (MDR):
It contains data to be written into or to be read out from the addressed location.

• General Purpose Registers:


These are numbered as R0, R1, R2….Rn-1, and used to store temporary data during any
•Accumulator:
This is the most frequently used register used to store data taken from memory. It is in
different numbers in different microprocessors.

•Memory Address Registers (MAR):


It holds the address of the location to be accessed from memory. MAR and MDR (Memory
Data Register) together facilitate the communication of the CPU and the main memory
• Program Counter (PC):
Program Counter (PC) is used to keep the track of execution of the program. It contains
the memory address of the next instruction to be fetched. PC points to the address of
the next instruction to be fetched from the main memory when the previous
instruction has been successfully completed.
• Instruction Register (IR):
The IR holds the instruction which is just about to be executed. The instruction from PC
is fetched and stored in IR. As soon as the instruction in placed in IR, the CPU starts
executing the instruction and the PC points to the next instruction to be executed .
• Condition code register ( CCR ) :
Condition code registers contain different flags that indicate the status of any operation
for instance lets suppose an operation caused creation of a negative result or zero.
1. Carry C: Set to 1 if an add operation produces a carry or a subtract operation
produces a borrow; otherwise cleared to 0.
2. Overflow V: Useful only during operations on signed integers.
3. . Zero Z: Set to 1 if the result is 0, otherwise cleared to 0
5. Zero Z: Set to 1 if the result is 0, otherwise cleared to 0
• These are generally decided by ALU.
• So, these are the different registers which are operating for a specific purpose.

❑What is ALU?
• The ALU is a digital circuit that provides arithmetic and logic operations. It is the
fundamental building block of the central processing unit of a computer.
• A modern CPU has a very powerful ALU and it is complex in design. In addition to
ALU modern CPU contains a control unit and a set of registers.
• Most of the operations are performed by one or more ALU’s, which load data
from the input register. Registers are a small amount of storage available to the
CPU. These registers can be accessed very fast.
• The control unit tells ALU what operation to perform on the available data. After
calculation/manipulation, the ALU stores the output in an output register.
The CPU can be divided into two sections: the data section and the control section. The
DATA section is also known as the data path BUS: In early computers “BUS” were parallel
electrical wires with multiple hardware connections.
❑What is Bus?
BUS a bus is a communication system that transfers data between components inside a
computer, or between computers. It includes hardware components like wires, optical fibers,
etc. and software, including communication protocols. The Registers, ALU, and the
interconnecting BUS are collectively referred to as data paths.

⮚ Types of the bus are:

• Address bus: The buses which are used to carry address.

• Data bus: The buses which are used to carry data.

• Control bus: If the bus is carrying control signals.

• Power bus: If it is carrying clock pulse, power signals it is known as a power bus, and so on.

❖The bus can be dedicated, i.e., it can be used for a single purpose or it can be multiplexed, i.e., it
can be used for multiple purposes. When we would have different kinds of buses, different types
of bus organizations will take place.
⮚ In one bus organization, a single bus is used for multiple purposes. A set of general-
purpose registers, program counters, instruction registers, memory address registers
(MAR), memory data registers (MDR) are connected with the single bus. Memory
read/write can be done with MAR and MDR. The program counterpoints to the memory
location from where the next instruction is to be fetched. Instruction register is that
very register will hold the copy of the curre At the same time a disadvantage lies that
it has only one bus and this “one bus” is accessed by all general-purpose registers,
program counter, instruction register, MAR, MDR making each and every operation
sequential. nt instruction. In the case of one bus organization, at a time only one
operand can be read from the bus.
⮚ TWO BUS ORGANISATION
• To overcome the disadvantage of one bus organization another architecture was
developed known as two bus organization. In two bus organizations, there are two buses.
The general-purpose register can read/write from both the buses. In this case, two
operands can be fetched at the same time because of the two buses. One bus fetch
operand for ALU and another bus fetch for register. The situation arises when both buses
are busy fetching operands, the output can be stored in a temporary register and when the
buses are free, the particular output can be dumped on the buses.
• There are two versions of two bus organizations, i.e., in-bus and out-bus. From in-bus, the
general-purpose register can read data and to the out bus, the general-purpose registers
can write data. Here buses get dedicated.
⮚ Three Bus organization –
In three bus organizations we have three buses, OUT bus1, OUT bus2, and an IN bus. From the
out buses, we can get the operand which can come from the general-purpose register and
evaluated in ALU and the output is dropped on In Bus so it can be sent to respective registers.
This implementation is a bit complex but faster in nature because in parallel two operands can
flow into ALU and out of ALU. It was developed to overcome the “busy waiting” problem of two
bus organizations. In this structure after execution, the output can be dropped on the bus
without waiting because of the presence of an extra bus.
The main advantages of multiple bus organizations over the single bus are as given below.

• Increase in size of the registers.


• Reduction in the number of cycles for execution.
• Increase the sped of execution.
Timing and Control of microprocessor

⮚ What is timing in CPU?


• CPU time (or process time) is the amount of time for which a central processing
unit (CPU) was used for processing instructions of a computer program or
operating system, as opposed to elapsed time, which includes for example,
waiting for input/output (I/O) operations or entering low-power (idle) mode
• All sequential circuits in the Basic Computer CPU are driven by a master clock,
with the exception of the INPR register. At each clock pulse, the control unit.
• Ands control signals to control inputs of the bus, the registers, and the ALU.
⮚ What is the use of timing and control?
• It provides timing and control signal to the microprocessor to perform the
various operation It has three control signal. It controls all external and internal
circuits.
• It operates with reference to clock signal it synchronizes all the data transfers.
⮚ What controls the timing of a computer?
• The timing for all registers in the basic computer is controlled by a master clock
generator. The clock pulses are applied to all flip-flops and registers in the system,
including the flip-flops and registers in the control unit.
⮚ Why do we use timing and controlling unit in 8085?
• We use Timing and Controlling unit in 8085 for the generation of timing signals
and the signals to control. All the operations and functions both interior and
exterior of a microprocessor are controlled by this unit.
⮚ How often does the clock strike in the 8085?
• Moreover, the 8085 clock strikes once in every 333nS but our watch strikes once
in a second. The cycle of the clock of 8085 microprocessor is termed as a T state,
where t stands for timing. The minimum frequency required for the operation of
8085 internally is 500 KHz i.e. 1 MHZ.
UNIT-2
Architecture of 8085 microprocessor
● The 8085 microprocessor is an 8-bit microprocessor that was
developed by Intel in the mid-1970s.

● It was widely used in the early days of personal computing and was
a popular choice for hobbyists and enthusiasts due to its simplicity
and ease of use.

● The architecture of the 8085 microprocessor consists of several key


components, including the accumulator, registers, program counter,
stack pointer, instruction register, flags register, data bus, address
bus, and control bus.
It has following configuration:

● Intel 8085?s clock speed is about 3 MHz; the clock cycle is of


320ns.
● 8 ?bit data bus.
● Address bus is of 16-bit, which can address up to 64KB
● 16-bit stack pointer
● 16 bit PC (Program Counter)
● Six 8-bit registers are arranged in pairs :BC, DE, HL
Intel 8085 is used in mobile phones, microwave ovens, washing machines
etc.
Timing and Control Unit
The timing and control unit is the section of the CPU.

❏ It is used to generate timing and control signals which are necessary for
the execution of instructions.
❏ It is used to control data flow between CPU and peripherals (including
memory).
❏ It is used to provide status, control and timing signals which are required
for the operation of memory and I/O devices.
❏ It is used to control the entire operations of the microprocessor and
peripherals connected to it.
Thus we can see that the control unit of the CPU acts as the brain of the
computer system.
ALU
The Arithmetic and Logic Unit, ALU performs the arithmetic and logical
operations:

❏ Addition
❏ Subtraction
❏ Logical AND
❏ Logical OR
❏ Logical EXCLUSIVE OR
❏ Complement (Logical NOT)
❏ Increment (add 1)
❏ Decrement (subtract 1)
❏ Left shift, Rotate left, Rotate right
Flag Register:
❏ It is an 8-bit register that stores either 0 or 1 depending upon
which value is stored in the accumulator.
❏ Flag Register contains 8-bit out of which 5-bits are important and
the rest of 3-bits are “don’t Care conditions”.
❏ The flag register is a dynamic register because after each
operation to check whether the result is zero, positive or
negative, whether there is any overflow occurred or not, or for
comparison of two 8-bit numbers carry flag is checked.
a. Accumulator (ACC):

The accumulator is an 8-bit register associated with the ALU. The register 'A' is an
accumulator in the 8085. It is used to hold one of the operands of an arithmetic and
logical operation.
The final result of an arithmetic or logical operation is also placed in the accumulator.

b. General-Purpose Registers:

The 8085 microprocessor contains six 8-bit general purpose registers. They are: B, D,
C, E, H and L register.
To hold data of 16-bit a combination of two 8-bit registers can be employed.
The combination of two 8-bit registers is called register pair. The valid register pairs in
the 8085 are: D-E, B-C and H-L. The H-L pair is used to act as a memory pointer.
Pin Diagram of 8085 Microprocessor
❑ The signals of this 40 pin IC is grouped into 7 categories, which are
given below:
• Power supply and clock signals
• Data bus
• Address bus
• Serial I/O ports
• Control and status signals
• Interrupts and externally generated signals
• Direct memory access
Pin Description of 8085 Microprocessor
1. Power supply and clock signals:
• In 40 pin configuration, 4 pins are allotted to this particular category.
• VCC – Pin number 40 denotes VCC, and an external power supply of + 5 V is provided
at this pin.
• VSS – Its pin number is 20. This pin shows the grounded connection of the
microprocessor.
• X1 and X2 – These are represented by pin number 1 and 2 respectively in the pin
configuration. These 2 pins are connected with a crystal or LC network to maintain
the internal frequency of the clock generator.
• CLK (OUT) – It is the 37th pin of the 8085 IC and acts as the system clock that keeps
the record of time duration required by each operation to get completed.
2. Address Bus – This category contains 8 pins.
• The address bus has 16 lines i.e.; it can carry 16 bits at a time.
However, out of 16, 8 are multiplexed with the data bus and the
leftover 8 are separately shown by pin number 21 to 28 in the pin
configuration.
• These are used to carry the address of data and instruction from the
processor to the memory location and is unidirectional in nature.
These are denoted by A8 to A15 that represents the 8 MSB of the
memory location or input-output address.
3.Data Bus with multiplexed address bus – This
category also contains 8 pins.
• The size of the data bus of the 8085 microprocessor is 8 bits.
However, to reduce the number of bus lines these 8-bit data bus
lines are multiplexed with the 8-bit address bus.
• These are shown by pin number 12 to 19. The address bus is
denoted by A whereas the data bus is denoted by D. The pin
configuration denotes the lower order multiplexed address and data
bus bits from AD0 to AD7.
4. Serial I/O ports :
• It has basically 2 pins.
• SID – SID denotes serial input data pin and its pin is numbered as 5.
With this pin, data is serially fed to the processor directly through
the input devices.
• SOD – SOD denotes serial output data pin and its pin number is 4,
in the pin configuration of 8085. Once the data is processed in the
microprocessor then this pin represents bit by bit results at the
output devices.
• RD’ – It is a signal to control READ operation. When it is low the selected
memory or input-output device is read.
• WR’ – It is a signal to control WRITE operation. When it goes low the data on
the data bus is written into the selected memory or I/O location.
• READY – It senses whether a peripheral is ready to transfer data or not. If
READY is high(1) the peripheral is ready. If it is low(0) the microprocessor
waits till it goes high. It is useful for interfacing low speed devices.
5. Interrupts and Peripheral Initiated Signals:
The 8085 has five interrupt signals that can be used to interrupt a program
execution.
• (i) INTR
(ii) RST 7.5
(iii) RST 6.5
(iv) RST 5.5
(v) TRAP
• The microprocessor acknowledges Interrupt Request by INTA’ signal. In
addition to Interrupts, there are three externally initiated signals namely
RESET, HOLD and READY. To respond to HOLD request, it has one signal
called HLDA.
• INTR – It is an interrupt request signal.

• INTA’ – It is an interrupt acknowledgement sent by the microprocessor after


INTR is received.
6. Reset Signals:

• RESET IN’ – When the signal on this pin is low(0), the program-
counter is set to zero, the buses are tristated and the
microprocessor unit is reset.
• RESET OUT – This signal indicates that the MPU is being reset. The
signal can be used to reset other devices.
7. DMA Signals:

• HOLD – It indicates that another device is requesting the use of the


address and data bus. Having received HOLD request the
microprocessor relinquishes the use of the buses as soon as the
current machine cycle is completed. Internal processing may
continue. After the removal of the HOLD signal the processor
regains the bus.
• HLDA – It is a signal which indicates that the hold request has been
received after the removal of a HOLD request, the HLDA goes low.
❑ Advantages of the 8085 microprocessor pin diagram:
• The pin diagram is easy to understand and remember because of its
logical and systematic arrangement.

• It has a simple structure with fewer pins compared to other


microprocessors, making it easy to design and implement in
electronic circuits.

• It has a dedicated pin for interrupt handling, which makes it easy to


interface with external devices that require interrupt-driven
communication.
❑ Disadvantages of the 8085 microprocessor pin diagram:
• It has limited addressing capability due to its 8-bit architecture, which
can limit its use in applications that require large amounts of memory.

• It has a limited number of pins, which can be a constraint in designing


complex systems that require more input/output devices or
peripherals.

• It has separate pins for input/output and memory access, which can
make it more difficult to design memory-mapped input/output
circuits.
Memory Interfacing in 8085
Memory is an integral part of a microprocessor system, and in this section, we will discuss
how to interface a memory device with the microprocessor.
Memory interfacing in the Intel 8085 microprocessor involves connecting external memory
devices, like RAM or ROM, to expand its memory capacity. Key aspects include connecting the
address and data buses, using memory decoding to select specific memory locations, and
controlling access with signals like Read (RD) and Write (WR). This allows the 8085 to access
a larger memory space.
• Here are the key aspects of memory interfacing in the 8085 microprocessor:
1. Address Bus: The 8085 microprocessor has a 16-bit address bus, allowing it to access a
total of 64KB (64 kilobytes) of memory. This means it can directly address 2^16 = 65,536
memory locations.
2. Data Bus: The 8085 has an 8-bit data bus, which means it can transfer 8 bits of data at a
time.
3. Memory Mapping: Memory interfacing involves connecting external memory devices to
the microprocessor's address and data buses. These devices can include RAM chips,
ROM chips, and other memory-mapped I/O devices.
4. Memory Decoding: To select a specific memory location within the connected memory
devices, memory decoding is necessary. This is typically done using address decoder
Assembly Language programming in 8085
• Assembly language programming for the 8085 microprocessor involves
writing low-level instructions in a human-readable format that the 8085 can
understand and execute. The 8085 is an 8-bit microprocessor that was
popular in the late 1970s and early 1980s. Here's a basic overview of how to
write assembly language programs for the 8085:
1. Understanding the 8085 Architecture: Before you can start programming in
assembly language for the 8085, you need to have a good understanding of
its architecture. Key components include the Accumulator (A), various
registers (B, C, D, E, H, and L), the program counter (PC), the stack pointer
(SP), and various flags (carry, zero, sign, etc.).
2. Mnemonics and Opcode:
• The 8085 assembly language uses mnemonics to represent instructions. Each
mnemonic corresponds to a specific opcode, which is a hexadecimal code
representing the instruction. For example, MOV A, B is a mnemonic that corresponds
to the opcode 78.
3. Writing Simple Programs:
• Start with simple programs to get a feel for assembly language. For example,
you can write a program to load data into registers and perform basic
arithmetic operations.

4. Programming Tools:
• To write and test 8085 assembly programs, you can use an emulator or
simulator like "SIM8085" or "GNUSim8085." These tools provide a virtual
environment to run your programs and observe the results.

5. Writing Assembly Code:


• Here is a basic template for an 8085 assembly language program that adds two
numbers and stores the result in the accumulator:
8085 Assembly Program to Add Two Numbers
Initialize Data
MVI A, 05 ; Load value 5 into accumulator A
MVI B, 07 ; Load value 7 into register B
; Add B to A
ADD B ; Add the value in B to A
Store the Result
STA 2000H ; Store the result in memory location 2000H
Halt the Program
HLT ; Halt the processor
Data Section
ORG 2000H ; Origin address for program execution
DB 05 ; Data to be added
DB 07 ; Data to be added
7. Assemble and Run: Use an assembler to convert your
assembly code into machine code (hexadecimal). Then, load
the machine code into the emulator or 8085 hardware and run
the program
8. Debugging: Debugging in assembly language can be challenging. You
can use the emulator's debugging features to step through the code
and monitor the values of registers and memory.
Programming model in 8085 microprocessor
• The 8085 microprocessor operates by fetching instructions from
memory using the program counter, decoding the instructions,
executing them, and updating the flags and registers accordingly. It
supports a variety of instructions for arithmetic, logic, data transfer,
branching, and I/O operations.

• Programs for the 8085 microprocessor are written in assembly


language, which is then assembled into machine code that the
microprocessor can execute. Assembly language programs use
mnemonics to represent instructions and operands.

• Overall, understanding the programming model of the 8085


microprocessor is crucial for writing efficient and effective assembly
language programs for this architecture.
Addressing modes in 8085 microprocessor

• The 8085 microprocessor, which was developed by Intel in the late


1970s, uses various addressing modes to access data and instructions
in memory. Addressing modes define how the microprocessor interprets
the address provided to access data or instructions. The 8085
microprocessor supports several addressing modes, including:
1. Immediate Addressing Mode: In immediate addressing mode, the
operand is specified directly as a data value in the instruction itself. For
example:
MVI A, 42 ; Load the accumulator (A) with the immediate value 42.
2. Register Addressing Mode:
In register addressing mode, data is accessed from or stored into one of
the CPU registers. For example:
MOV B, A ; Copy the content of the accumulator (A) into register B.
3. Direct Addressing Mode:
In direct addressing mode, the instruction specifies a memory address directly, and the
data is accessed from or stored into that memory location. For example:
LXI H, 2050H ; Load the HL register pair with the address 2050H.
4. Indirect Addressing Mode:
In indirect addressing mode, the instruction specifies a register pair (usually HL) whose
content points to the memory location that holds the data. For example:
LXI H, 2050H ; Load the HL register pair with the address 2050H.
5. Immediate Indirect Addressing Mode:
In this mode, an immediate value is added to the contents of a register pair to form an
address. The data is then accessed from or stored into that memory location. For example:
LHLD 2050H ; Load the HL register pair with the data at address 2050H.
6.Register Indirect Addressing Mode:
In this mode, a register pair (usually BC, DE, or HL) is used as a pointer to access data in
memory. For example:
MOV A, M ; Load the accumulator with the data pointed to by HL.
INX H ; Increment the HL register pair to point to the next memory location.

7.Implicit Addressing Mode:


Some instructions in the 8085 microprocessor have implicit operands or addresses,
meaning that the address is determined by the instruction itself and does not need to be
explicitly specified. For example, the INR A instruction increments the accumulator, and
no address is needed.

These addressing modes allow the 8085 microprocessor to perform various operations
on data and control program flow efficiently. The choice of addressing mode depends on
the specific task and the data manipulation requirements of the program being executed.

You might also like