CH-1 INTRODUCTION TO MICROPROCESSOR AND ORGANIZATION
by Shivajirao Jadhav , Mumbai
Marks: 12 (18)
Introduction:
A microprocessor is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together.
It is an electronic component that is used by a computer to do its work. Microprocessor also named as µP (mu-p). It is small but extremely complex LSI device. It acts as the brain of the computer system. There are many companies manufacturing µP. Most popular companies are INTEL, MOTOROLA, Zilog, Toshiba. Microprocessors were invented in the 1970s.
Definition: It is a programmable device. It takes data, performs arithmetic and logical operations on it according to program stored in memory and produces a result.
Evolution of microprocessor:
First Generation (4-bit microprocessor): The first microprocessor was introduced in 1971 by Intel Corp. It was named Intel 4004 as it was a 4 bit processor. It was a processor on a single chip. It could perform simple arithmetic and logic operations such as addition, subtraction. In 1972 INTEL introduced the 8-bit 8080 µP with 45 instructions. Simultaneously MOTOROLA introduced the 6800.
Second Generation (8-bit microprocessor): The first 8 bit microprocessor which could perform arithmetic and logic operations on 8 bit words was introduced in 1976 by Intel. It was Intel 8085. Some other 8 bit processors are Zilog-80 and Motorola M6800. The difference between the first generation microprocessor and second generation microprocessors was mainly the use of new semiconductor technologies to manufacture the chips.
Third Generation (16-bit Microprocessor): The third generation microprocessors were introduced in the year 1978, was denoted by Intel’s 8086 and the Zilog Z8000. These were 16-bit processors. This third generation memory space was 64KB. They have higher efficient language level. INTEL 8086, 8088, Zilog’s Z8000, MOTOROLA 68000 are 16-bit processors.
Fourth Generation (32-bit Microprocessor): Fourth generation microprocessors are entered with outstanding design with a million transistors. The 32 bit microprocessors were introduced by several companies but the most popular one is Intel 80386.
Fifth Generation (64-bit Microprocessor): Intel made a drastic improvement in microprocessor design to provide greatest speed. The processor in this generation is 80586 called by the name Pentium. It is followed by Pentium II, III, IV etc. Intel developed so many processors with additional facilities like low operating voltage, processors handing mobile techniques. Celeron, Xenon, i3, i4 are dual core processors. Intel quad core processors are with greater speed and additional features. The low cost version of Pentium II is celeron.
Functions of Microprocessor:
Among various functions of microprocessor some are as follows-
Controlling all other parts of the machine and sending timing signals.
Transferring data between memory and I/O devices
Fetching data and instructions from memory
Decoding instruction
Performing arithmetical and logical operations
Executing programs stored in memory
Performing communication among the I/O devices etc.
Basic blocks of Microprocessor (Generic microprocessor):
A basic microprocessor requires certain elements to perform some operation. To perform an operation microprocessor requires following blocks-
1. Arithmetic and logic unit (ALU): It is 8-bit unit where arithmetic and logical operations are carried out. Whenever there is a need to perform an operation on a data then the data is sent to ALU to perform the necessary function. After performing operation it sets flags according to nature of answer.
2. Registers: Registers are the important section of microprocessor chip. Registers are primarily used to store the data temporarily during the execution/runtime of the program. The registers are basically 8bit, 16bit or 32 bit. They are:
a. Accumulator-A (b-bit).
b. General purpose registers-B, C, D, E, H, L (8-bit)
c. Temporary register (8-bit)
d. Status register (8-bit)
e. Program counter (16-bit)
f. Stack pointer (16-bit)
g. Instruction register (8-bit)
3. Instruction decoder: It takes instruction from instruction register and decodes it.
4. Timing and control unit: It tells the computer's memory, arithmetic/logic unit and input and output devices how to respond to a program's instructions. It controls the flow of data and signals in the microprocessor. It generates the necessary control signals for various data that are fed to microprocessor.
5. Interrupt control: Interrupt is an essential process in microprocessor. It executes certain steps when interrupt occurs.
6. System bus: A system bus is a flat cable with numerous parallel wires. It allows the simultaneous transmission of information from one component to another
a. Control bus: It control bus is used to transfer the control signals and timing signals (clock pulses) between microprocessor and other peripheral components.
b. Data Bus: Data bus is used to transmit data between the microprocessor and peripherals devices.
c. Address Bus: Address bus is used to send the address of a peripheral from microprocessor to the peripheral device.
The 8085 microprocessor:
8085 microprocessor was introduced by Intel in the year 1976. It is NMOS chip with 40 pin package. It is 8-bit microprocessor suitable for wide range of applications and it is ideal microprocessor. Because its basic architecture is used in more advanced microprocessors.
The microprocessor having 8-bit data bus is called 8-bit microprocessor.
Features of 8085 microprocessor:
It is an 8-bit microprocessor It has 8-bit data bus. It means 1 byte data can transferred on this bus.
8085 chip is available in 40 pin plastic dual in line (DIP) package.
The address and data bus are multiplexed in this processor which helps in providing more control signals. It has 16-bit address bus.
This microprocessor is capable of addressing 64KB of memory.
The instruction set of 8085 consists of 74 instructions.
It requires 5V supply to operate.
Clock frequency is from 500KHz to 3MHz.
Architecture of 8085 microprocessor (Internal block diagram):
8085 consists of following blocks/units-
Accumulator
Arithmetic and logic Unit (ALU)
General purpose register
Program counter (PC)
Stack pointer (SP)
Temporary register
Flags
Instruction register and Decoder
Timing and Control unit
Interrupt control
Serial Input/output control
Address buffer and Address-Data buffer
Address bus and Data bus
1. Accumulator:
It is an 8-bit register used to perform arithmetic and logical operations like addition, subtraction, AND, OR operations. It is connected to internal data bus & ALU. One of operand is stores in accumulator. Final result is also stored in accumulator.
2. Arithmetic and logic Unit (ALU):
As the name suggests, it performs arithmetic and logical operations like Addition, Subtraction, AND, OR, etc. on 8-bit data. ALU gets its Input from accumulator and temporary register. After processing the necessary operations, the result is stored back in accumulator. It consists of binary adder for addition and subtraction by 2’s complement method.
3. General purpose register:
There are 6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L. Each register can hold 8-bit data.
These registers can work in pair to hold 16-bit data and their pairing combination is like B-C, D-E & H-L. The H-L pair works as a memory pointer.
4. Program counter (PC):
It is a 16-bit register used to store the memory address location of the next memory location. Microprocessor increments the program counter whenever an instruction is being executed. So that the program counter points to the memory address of the next instruction that is going to be executed. In other words the program counter keeps track of the memory address of the instructions that are being executed by the microprocessor.
5. Stack pointer (SP):
It is also a 16 bit register used as memory pointer. It points to the memory location called stack. Generally stack is a reserved portion of memory where information can be stores or taken back together. It is also a 16-bit register works like stack, which is always incremented/decremented by 2 during push & pop operations. Each time when the data is loaded into stack, Stack pointer gets decremented. Conversely it is incremented when data is retrieved from stack.
6. Temporary register:
It is an 8-bit register, which holds the temporary data of arithmetic and logical operations. Temporary register can only be accessed by the microprocessor and it is completely inaccessible to programmers. It is used to store operands of arithmetic and logical operations.
7. Flags:
These are single bit status registers (Flip-flops) operated by ALU. The flags are either set or reset according to the answer produced by ALU.
There are five flip-flops in the flag register are as follows:
Sign Flag (S): Used for indicating the sign of the data in the accumulator. The sign flag is set if answer is negative (1 –negative). The sign flag is reset if answer is positive (0 –positive).
Zero Flag (Z): Is set if result obtained after an operation is 0.
Carry Flag (C): Is set if there is a carry out of the 7th-bit (MSB).
Auxiliary Carry Flag (AC): Is set if there is carry out from 3rd-bit (D3) to 4th-bit (D4).
Parity Flag (P): Is set if the result contains even number of 1s.
8. Instruction register and Decoder:
It is an 8-bit register. When an instruction is fetched from memory then it is stored in the Instruction register. Instruction decoder decodes the information present in the Instruction register.
9. Timing and Control unit:
It provides timing and control signal to the microprocessor to perform operations. It synchronizes the registers and flow of data through various registers and other units It controls all external and internal circuits. It operates with reference to clock signal. It synchronizes all the data transfers.
10. Interrupt control:
As the name suggests it controls the interrupts during a process. When a microprocessor is executing a main program and whenever an interrupt/request from peripherals (keyboard, printer etc) occurs, the microprocessor shifts the control from the main program to process the incoming request. After the request is completed, the control goes back to the main program.
For example an Input/output device may send an interrupt signal to notify that the data is ready for input. The microprocessor temporarily stops the execution of main program and transfers control to I/O device. After collecting the input data the control is transferred back to main program.
11. Serial Input/output control:
It controls the serial data communication by using these two instructions: SID (Serial input data) and SOD (Serial output data).
12. Address buffer and Address-Data buffer:
The content stored in the stack pointer and program counter is loaded into the address buffer and address-data buffer to communicate with the CPU. The memory and I/O chips are connected to these buses; the CPU can exchange the desired data with the memory and I/O chips.
13. Address bus and data bus:
Data bus carries the data to be stored. It is bidirectional, whereas address bus carries the location to where it should be stored and it is unidirectional. It is used to transfer the data & Address I/O devices.
Functional pin diagram of 8085:
1. AD0 - AD7: As shown in pin diagram of 8085 has address/data multiplexed bus pins AD0 - AD7 and other address bus pins are A8 – A15.
2. +Vcc and Vss: Supply connections are given across pins =Vcc and Vss ground +5V fixed.
3. X1 – X2: 8085 microprocessor has its own built in oscillator (clock) circuit inside it to which externally crystal is connected across pins X1 and X2.
4. RD and WR: These are active low pins. A low level RD signal indicates the selected memory/IO to be read and data bus is available for data transfer. Similarly, a low level WR signal indicates that on data bus is to be written into selected memory/IO location.
5. RESET IN and RESET OUT: These pins are used to make program counter of 8085 reset to 0000H. After program counter is reset by peripherals through RESET IN pin, microprocessor sends signal through output pin RESET OUT that the program counter is reset to inform peripheral.
6. Interrupt pins ( pins 6 to 11): Microprocessor 8085 has five interrupt pins through which 8085 is interrupted.
7. SID/SOD: For serial data transmission SID and SOD pins are used. FOR this type of transmission RIM and SIM instructions are used.
8. READY: The pin READY input from peripheral device informs the microprocessor that the peripheral device is ready to receive or send the data.
9. HOLD/HLDA: input pin is required during direct memory access (DMA) operation that is HOLD signal informs microprocessor that another device requires to use address and data bus. After receiving the signal HOLD request has been received on the pin HLDA (hold acknowledge).
10. CLOCK OUT: It is output pin. Signal generated by microprocessor can be used as clock for other device.
11. ALE (Address Latch Enable): This signal is a pulse which becomes 1 when Ado –AD7 have address on them.
12. S1 and S0: These are status signal used to indicate kind of internal operation of microprocessor.
13. IO/M (input-output/memory): This signal specifies whether the operation is memory operation (=0) or IO operation (=1)
Introduction to advance microprocessor:
In 1978 Intel introduced the microprocessor 8088 and 8086. These are 16-bit microprocessors use for microcomputers. They have powerful instructions. Intel started this family by means of advance versions such as 80186, 80286, 80386, 80486 working as a powerful microprocessors. Intel continued development of new latest microprocessors, Pentium (80586), Pentium II, Pentium III, Pentium IV, Celeron core. These microprocessors developed by Intel are known as X-80 family.
Features of Intel 8086/8088:
It is 16-bit microprocessor
40 pin DIP package
Maximum memory space 1MB
8-bit external data bus
Clock speed 2MHz
16-bit internal registers
Comparison of major features/attributes of different Processors
Questions
Marks wise Questions: 1M(2), 3M(2), 4M(1), 6M(1)
1. Fill in the blanks with given alternatives.
Microprocessor 8085 is manufactured by -----------.
(a) Intel (b) Motorola (c) Zilog
Intel 8086 is -------bit processor.
(a) 8 (b) 16 (c) 32
--------- is used for arithmetic and logic operations
(a) Program counter (b) Stack pointer (c) Accumulator
There are ------flip-flops in the flag register of 8085 microprocessor.
(a) 3 (b) 5 (c) 8
ALU is ------- bit unit in 8085 microprocessor.
(a) 8 (b) 16 (c) 32
80386 is a ------- bit processor.
(a) 8 (b) 16 (c) 32
In 8085 microprocessor, serial data from external device is received at ----------pin.
(a) SID (b)SOD (c) HOLD
The program counter is a 16-bit storage unit reserved for -------------.
(a) Addresses (b) Instructions (c) Data
The first microprocessor was Intel ----------.
(a) 4004 (b) 8080 (c) 8085
Stack pointer holds -------.
(a) 16-bit data (b) 16-bit address (c) 8-bit address
8085 is -------- pin IC
(a) 45 (b) 40 (c) 20
The address/data bus in 8085 is-------
(a) Multiplexed (b) Demultplexed (c) Decoded
8085 uses---------V power supply.
(i)+5 (ii) +12 (iii) -5 (iv) -12
2. Answer the following.
What is microprocessor?
Which was the first microprocessor?
Name different generations of computer.
Write the features of 8085 microprocessor.
How much memory can be addressed by 8085?
Draw block diagram of microprocessor 8085.
Draw labeled block diagram of basic/generic microprocessor.
Name six functional units of basic microprocessor.
What is the purpose of’ Interrupts’ in microprocessor.
Write the function of pins-(i) SOD (ii) ALE (iii) RESET IN (iv) CLK
Write a note on (i) Program counter (ii) Stack pointer (iii) ALU
What is the function of following registers in 8085 processor
(i) Accumulator (ii) Program counter (iii) Flag register (iv) instruction decoder
Write a short note on ‘Evolution of Microprocessor’. OR Explain different generations of microprocessors.
What is flag? List flags for 8085?
Draw pattern of flag register and explain significance of each flag bit.
Write in brief the function of following pins in 8085 microprocessor.
(i) X1 – X2 (ii) AD0 – AD1 (iii) A8 – A15
In case of microprocessor architecture, explain following-
(i) Address bus (ii) Data bus (iii) Control bus
Write features of 8086 microprocessor.
What is bus? State different types of buses in generic microprocessor.
Compare any four features/attributes of 80286 and 80486 microprocessors.