Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
61 views

Microprocessor Introduction

The document provides information about microprocessors including: 1. It defines a microprocessor as an integrated circuit containing logic and control circuits capable of processing data based on input and producing output. 2. It describes the basic components of a microprocessor including the arithmetic logic unit (ALU), control unit, and registers. 3. It discusses the history of microprocessors from early 4-bit and 8-bit designs to modern 64-bit processors and how characteristics like word length, clock speed, and instruction sets have evolved.

Uploaded by

vshlvvk
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Microprocessor Introduction

The document provides information about microprocessors including: 1. It defines a microprocessor as an integrated circuit containing logic and control circuits capable of processing data based on input and producing output. 2. It describes the basic components of a microprocessor including the arithmetic logic unit (ALU), control unit, and registers. 3. It discusses the history of microprocessors from early 4-bit and 8-bit designs to modern 64-bit processors and how characteristics like word length, clock speed, and instruction sets have evolved.

Uploaded by

vshlvvk
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Microprocessor and Interfacing

Microprocessor and Interfacing


Text Book Microprocessor and Interfacing: Douglas V. Hall
For lab: Microprocessor x86 Programming: K.R. Venugopal, Raj Kumar (BPB Publication)

KIIT

Microprocessor
Microprocessor is the chip containing some control and logic circuits that is capable of making arithmetic and logical decisions based on input data and produces the corresponding arithmetic or logical output. The word processor is the derivative of the word process that means to carry out systematic operations on data. A microprocessor is also known as a CPU or central processing unit, which is a complete computational engine that is fabricated on a single chip.
Sometimes, microprocessor is written as P. ( is pronounced as Mu)

Basic Concepts of Microprocessors


Differences between:
Microcomputer a computer with a microprocessor as its CPU. Includes memory, I/O etc.
Microprocessor silicon chip which includes ALU, register circuits & control circuits Microcontroller silicon chip which includes microprocessor, memory & I/O in a single package.

Definition of the Microprocessor


The microprocessor is a programmable device that takes in numbers, performs on them arithmetic or logical operations according to the program stored in memory and then produces other numbers as a result.

Microprocessor
Block diagram to represent a microprocessor-based system:

Internally, the microprocessor is made up of 3 main units.


The Arithmetic/Logic Unit (ALU) The Control Unit. An array of registers for holding data while it is being manipulated

Memory
Memory stores information such as instructions and data in binary format (0 and 1). It provides this information to the microprocessor whenever it is needed. Usually, there is a memory sub-system in a microprocessor-based system. This sub-system includes: The registers inside the microprocessor Read Only Memory (ROM)used to store information that does not change. Random Access Memory (RAM) (also known as Read/Write Memory) used to store information supplied by the user. Such as programs and data.

The three cycle instruction execution model


To execute a program, the microprocessor reads each instruction from memory, interprets it, then executes it.

To use the right names for the cycles:


The microprocessor fetches each instruction, Decodes it, Then executes it.

This sequence is continued until all instructions are performed.

History
A microprocessor is also known as a CPU or central processing unit, which is a complete computational engine that is fabricated on a single chip. 4 - bit Microprocessor:
Introduced in 1971. It was the first microprocessor by Intel. It was a 4-bit P. Its clock speed was 740KHz. It had 2,300 transistors. It could execute around 60,000 instructions per second.

History
8 Bit Microprocessor: (8008)
Introduced in 1972. It was first 8-bit P. Its clock speed was 500 KHz. Could execute 50,000 instructions per second.

8085 Microprocessor
Introduced in 1976. It was also 8-bit P. Its clock speed was 3 MHz. Its data bus is 8-bit and address bus is 16-bit. It had 6,500 transistors. Could execute 7,69,230 instructions per second. It could access 64 KB of memory. It had 246 instructions.

History
16 Bit Microprocessor: (8086)
It was first 16-bit P. Its clock speed is 4.77 MHz, 8 MHz and 10 MHz, depending on the version. Its data bus is 16-bit and address bus is 20-bit. It had 29,000 transistors. Could execute 2.5 million instructions per second. It could access 1 MB of memory. It had 22,000 instructions. It had Multiply and Divide instructions.

History
16 Bit Microprocessor: INTEL 80186 & 80188
They had additional components like: Interrupt Controller Clock Generator Local Bus Controller Counters. 32 Bit Microprocessor: INTEL 80386
It was first 32-bit P. Its data bus is 32-bit and address bus is 32-bit. It could address 4 GB of memory. It had 2,75,000 transistors.

History
64 Bit Microprocessor:
Intel Core 2 Intel Core i7

Intel Core i5
Intel Core i3
It is a 64-bit P. It has 2 physical cores. Its clock speed is from 2.93 GHz to 3.33 GHz. It has 781 million transistors. It has 64 KB of L1 cache per core, 512 KB of L2 cache and 4 MB of L3 cache.

Microprocessor Characteristics
Instruction Set:
The set of instructions that a microprocessor can understand. Ex: PUSH- To bring the data at the top of the stack.

Bandwidth:
The number of bits processed in a single instruction. Ex: 8085 processes 8 bit of data in a single instruction.

Capability:
It depends upon the number of instructions and capability of each instruction.
KIIT

Microprocessor Characteristics
Clock Speed:
The clock speed determines how many operations per second the processor can perform.
It is also called Clock Rate. Every computer contains an internal clock that regulates the rate at which instructions are executed and synchronizes the various computer components. The faster the clock, the more instructions the CPU can execute per second. Clock speeds are expressed in megahertz (MHz) or gigahertz (GHz). The microprocessors of personal computers have clock speeds of any where from 300 MHz to over 3.8 GHz.
KIIT

Microprocessor Characteristics
Word Length:
It depends upon the width of internal data bus, registers, ALU etc. An 8-bit microprocessor can process 8 bit data at a time. A processor with longer word length is more powerful and can process data at a faster speed as compared to processor with shorter word length. The word length ranges from 4 bits for small microprocessor, to 64 bits for high-end microcomputers.
KIIT

Microprocessor Characteristics
Width of Data Bus:
This is the size of the data bus. It defines the number of bits that can be transferred through data bus.

Width of Address Bus:


This parameter decides the memory addressing capability of the microprocessor. The maximum size of the memory unit is decided by this parameter.

Data Types:
The microprocessor handles various types of data formats like binary, BCD, ASCII, signed and unsigned numbers.
KIIT

Microprocessor-Functioning
Microprocessors have two major components The Execution unit (EU) The Bus interface unit (BIU) (EU) is used mainly to execute instructions. It contains a circuit called the arithmetic and logic unit (ALU). The ALU performs arithmetic ( + , - , * , / ) and logic (AND, OR, NOT) operations.

Microprocessor
The EU and the BIU : are connected via an internal bus and they work together. While the EU is executing an instruction, the BIU fetches up to six bytes of the next instruction and places them in the instruction queue. This operation is called Instruction prefetch.

The purpose is to speed up the processor.

Microprocessor
I/O Ports : I/O devices are connected to the computer through I/O circuits.
Each of these circuits contains several register called I/O Ports. Some are used for data while others are used control commands.

Like memory locations, the I/O ports have address and they are connected to the bus system. These addresses are known as I/O address and can only be use in input (IN) or output (OUT) instructions.

Microprocessor
Serial and Parallel Interface: The data transfer between two digital systems can be achieved using single bit at a time (serial), or using 8 bit, 16 bit, etc. at a time (parallel).
The parallel interface requires more wiring connections, while serial port tends to be slower.
Slow devices, like the keyboard, or remote interface like internet are always connected via serial interface, while fast devices and directly interfaced devices like the disk drive, always connect via parallel port. But some devices like printers can be connected via either serial or parallel interface.

Microprocessor-Functioning
Instruction Execution: To understand how the CPU operates, lets look at how an instruction is executed. The machine instruction has two major parts: an opcode and operands. The opcode specifics the type of operation and operands are often given as memory address to the data to be manipulated. Ex: add A and B; where A and B are operands and add is opcode

Microprocessor-Functioning
The two operation cycles of the microprocessor are: (Fetch - Execute cycle)
Fetch: 1. Fetch an instruction from memory 2. Decode the instruction to determine the operation 3. Fetch data from memory if necessary. Execute: 1. Perform the operation on the data 2. Store the result in memory if needed.

Assembly Language Tools


Software tools are used for editing, assembling, linking, and debugging assembly language programming.

Assembler : An assembler is a program that converts source-code programs written in assembly language into object files in machine language. The assembler generates two files on hard disk. Object File and Assembler list file. .OBJ file contains the binary codes for the instructions and information about the address of the instruction.
.LST contains assembly language statements, binary codes for each instruction.

MASM (Macro Assembler from Microsoft), TASM (Turbo Assembler from Borland), NASM (Netwide Assembler for both Windows and Linux), and GNU assembler available free.

Assembly Language Tools


Linker : A linker is a program that combines your program's object file created by the assembler with other object files and link libraries, and produces a single executable program. The linker file which comes with TASM assembler produce link files with .EXE extension. Debugger: A debugger is a program that allows you to trace the execution of a program and examine the content of registers and memory. Editor : A text editor to create assembly language source files. You can use NotePad , or any other editor that produces plain ASCII text files.

Microprocessor-Functioning
The data for operations are stored in circuit called Registers. A register is like a memory location except that we normally refer to it by a name rather than address. The EU has eight registers for storing data; their names are

AX-(accumulator), termed as General Purpose Registers BX-(base), CX-(count), DX-(data),


SI-(source), termed as Special Purpose Registers DI-(destination), BP-(base pointer), SP-(stack pointer) and FLAGS register.

Flag register determines the current state of the processor.

Microprocessor-Functioning
Bus interface unit (BIU) communication between the EU and memory or I/O circuits. It is responsible for transmitting address, data, and control signals on the buses. Its registers are named
CS- Code Segment, DS- Data segment, ES- Extra Segment, SS- Stack Segment, IP- Instruction Pointer; they hold addresses of memory locations.

The IP contains the address of next instruction to be executed by the EU.

You might also like