MODULE-1
Syllabus:
Basheer V P
Asst. Professor and PG Coordinator
Al Ameen Engineering College, Shoranur, Palakkad
1.1 Organization of a Microprocessor based System
Figure 1.1
Microprocessor
Arithmetic/Logic Unit:
• This area of the microprocessor consists of various registers. These registers are
primarily used to store data temporarily during the execution of a program.
Control Unit:
• The control unit provides the necessary timing and control signals to all the
operations in the microcomputer.
• It controls the flow of data between the microprocessor and memory and
peripherals.
Memory
• Memory stores binary information such as instructions and data and provides that
information to the microprocessor whenever necessary.
• To execute programs, the microprocessor reads instructions and data from memory and
performs computing operations in its ALU section. Results are either transferred to the
output section to display or stored in the memory for later use.
• The memory block shown in the figure has two sections: Read only Memory (ROM) and
Read/Write Memory (R/W/M).
• The ROM is used to store programs that do not need alterations. Programs stored in the
ROM can only be read; they cannot be altered.
• The Read/Write Memory (R/W/M) is also known as user memory. It is used to store
user programs and data. The information stored in this memory can be easily read and
altered.
I/O (Input/Output)
System Bus
• The system bus is a communication path between the microprocessor and peripherals.
It is nothing but a group of wires to carry bits. All peripherals share the same bus;
however the microprocessor communicates with only one peripheral at a time. The
timing is provided by control unit of the microprocessor.
1.2 Evolution of Microprocessors
The development of microprocessors can be divided as 5 generations.
Intel Corporation introduced 4004, the first microprocessor in 1971. It is evolved from the
development effort while designing a calculator chip.
There were three other microprocessors in the market during the same period:
This technology offered faster speed and higher density than PMOS
• Intel’s 8086/80186/80286
• Motorolla’s 68000/68010
They were designed using HMOS technology
Intel used HMOS technology to recreate 8085A and named it as 8085AH with a higher price tag.
This age the emphasis is on introducing chips that carry on-chip functionalities and
improvements in the speed of memory and I/O devices along with introduction of 64-bit
microprocessors.
Intel leads the show here with Pentium, Celeron and very recently dual and quad core
processors working with up to 3.5GHz speed.
Architecture of 8085
The architecture of 8085 is shown in figure 1.2. The internal architecture of 8085 includes the
ALU, register array, timing and control unit, instruction register and decoder, interrupt control
and serial I/O control.
ALU:
Functions of ALU:
Register Array:
1. General Purpose Registers:
The 8085/8080A has six general-purpose registers to store 8-bit data; these are
identified as B,C,D,E,H, and L .
They can be combined as register pairs - BC, DE, and HL - to perform some 16-bit
operations.
The temporary registers W and Z are intended for internal use of the processor and it
cannot be used by the programmer.
2. Accumulator:
The accumulator is an 8-bit register that is a part of arithmetic/logic unit (ALU). This
register is used to store 8-bit data and to perform arithmetic and logical operations.
The result of an operation is stored in the accumulator.
The accumulator is also identified as register A.
3. Flag Register:
Flag is a flip-flop which changes its status according to the result stored in the
accumulator.
Flag register is also known as status register.
8085 has an 8-bit Flag register with 5 active flags. They are called Zero (Z), Carry
(CY), Sign (S), Parity (P), and Auxiliary Carry (AC) flags.
The bit position of the flip flop in flag register is:
Sign Flag
If the result of an operation is negative then sign flag is set otherwise reset.
If the result stored in an accumulator is zero then this flag is set otherwise it is reset.
Auxiliary carry Flag (AC)
If any carry goes from D3 to D4 in the result, then it is set otherwise it is reset.
If the no of 1's in the result stored in the accumulator is even, then it is set otherwise it is
reset for the odd.
If the result stored in an accumulator generates a carry in its final output then it is set
otherwise it is reset.
Instruction Decoder:
Instruction decoder takes bits stored in the instruction register and decodes it and
tells to CPU what it need to do for it and enable the components for the operation.
Simply, instruction decoder is like a dictionary. It tells the meaning of the
instruction.
There are two pins in this unit. This unit is used for serial data communication.
Interrupt Unit:
Interrupt is a mechanism by which an I/O or an instruction can suspend the normal
execution of processor and get itself serviced.
There are 6 interrupt pins in this unit. Generally an external hardware is connected
to these pins.
These pins provide interrupt signal sent by external hardware to microprocessor
and microprocessor sends acknowledgement for receiving the interrupt signal.
(I/O read and write operations are working with the same procedure. Address generated will be
that of I/O and read/write control signals will be I/O read and I/O write)
1.5 8085 Bus Organization
BUSES:
The buses are group of lines or wires that carries data, address or control signals.
Address Bus:
Data Bus:
Control Bus:
The control bus is comprised of various single lines that carry control signals.
These are not group of lines like address or data buses, but individual lines that provide
a pulse to control a microprocessor operation like Read, Write etc.
The microprocessor generates specific control signals for every operation it performs,
like memory read, write etc.
1.6 Pin Configuration:
All the signals can be classified into seven groups. They are
1. Address bus
2. Data bus
3. Control and status signals
4. Interrupt signals
5. Externally initiated signals
6. Serial I/O signals and
7. Power and frequency signals
1. Address bus:
The 8085 has 8 signal lines A15-A8, which are unidirectional and used as the higher
order address bus.
2. Data Bus:
The signal lines AD7-AD₀ are bidirectional.
They serve as the lower order address bus as well as the data bus.
During the earlier part of cycle, they are used as address bus and later as data bus and
hence these are multiplexed. This is done so as to reduce the number of pins externally.
3. Control and status signals:
This group of signals includes two control signals ( RD and WR ), three status signals (IO/
M , S1 and S0) to identify the nature of the operation and one special signal (ALE) to
indicate the beginning of the operation. These signals are as follows:
i. ALE-Address Latch Enable:
This is a positive going pulse generated every time the 8085 begins as
operation (machine cycle).
It indicates that the bits on AD7-AD0 are address bits.
This signal is primarily used to latch the lower-order address from the
multiplexed bus and generate a separate set of eight address lines A7-A0.
ii. RD -Read:
This is a Read control signal (active low).
This signal indicates that the selected I/O or memory is to be read.
iii. WR -Write:
This is a Write control signal (active low).
This signal indicates that the data on the data bus are to written into a
selected memory or I/O location.
iv. IO/ M :
This is a status signal used to differentiate between I/O and memory
operations.
When it is high, it indicates an I/O operation; when it is low, it indicates a
memory operation.
This signal is combined with RD and WR to generate I/O and memory
control signals.
v. S1 and S0:
These signals, similar to IO/ M , can identify various operations, but they
are rarely used in small systems.
S1 S0 Operation
0 0 HALT
0 1 WRITE
1 0 READ
1 1 FETCH
4. Interrupt Signals:
The 8085 has 5 interrupt signals,
i. INTR (Input): (INTERRUPT REQUEST)
It is used as a general purpose interrupt.
If it is active, the Program Counter (PC) will be inhibited from
incrementing and an INTA will be issued.
a) HOLD (Input):
It indicates that another Master is requesting the use of the Address and
Data buses.
The CPU, upon receiving the Hold request will relinquish the use of buses
as soon as the completion of the current machine cycle. Internal processing
can continue.
The processor can regain the buses only after the Hold is removed. (The
combination of HOLD, HLDA, READY signals are used to implement DMA)
c) READY (Input):
If Ready is high during a read or write cycle, it indicates that the memory
or peripheral is ready to send or receive data.
If Ready is low, the CPU will wait for Ready to go high before completing
the read or write cycle.
d) RESET IN (Input):
When its low, the PC is set to 0, the buses are tri-stated and the
microprocessor is reset.
e) RESETOUT(OUTPUT):
This indicates that microprocessor is being reset. This can be used to reset
other devices.
Figure shows that four different control signals are generated by combining the
control signals RD and WR and status signal IO/ M .
Here OR gates are functionally connected as negative NAND gates.
The signal IO/ M goes low for memory operation. Hence,
o For a memory read operation, both inputs of gate G1 will be low and hence
the signal Memory Read will be generated (low).
o For a memory write operation, both inputs of gate G2 will be low and
hence the signal Memory Write will be generated (low).
The signal IO/ M goes high for I/O operation. So an inverter is used to
complement this signal for only to generate I/O control signals. Hence,
o For an I/O read operation, both inputs of gate G3 will be low and hence the
signal I/O Read will be generated (low).
o For an I/O write operation, both inputs of gate G4 will be low and hence the
signal I/O write will be generated (low).