Author Topic: Microprocessor  (Read 2103 times)

Offline ashiqbest012

  • Hero Member
  • *****
  • Posts: 1186
  • I love my University
    • View Profile
Microprocessor
« on: March 25, 2011, 09:17:47 PM »
Microprocessor with assembly language


Bit: A bit is the abbreviation of the term binary digit. A Binary digit can only have two values, represented by the symbols 0 and 1, whereas a decimal digit can have 10 values. Represented by the symbols 0 through 9.

Bit size: bit size is actually the number of bits which can be accessed at a time by the arithmetic circuits of microprocessor.

Representation of different Bit size:
-          A 4 bit wide memory location is often called a nibble. It is used in world’s first microprocessor the Intel 4004 introduced in 1971.
-          An 8-bit wide memory location is referred to as a byte, It is first used in intel 8008 microprocessor.
-          A 16 bit wide memory location is often called a word. It is used in 8086 and 8088 microprocessor.

Arithmetic and logic unit: An arithmetic and logic unit (ALU) is a digital circuit that performs arithmetic and logic operations. The size of alu defines the size of the microprocessor. For example: the Motorola 680000is a 16 bit microprocessor since its ALU is 16 bits wide.

Microprocessor: The microprocessor sometimes referred to as the CPU (Central Processing Unit is the controlling element in a computer system. The microprocessor controls memory and I/O through a series of connections called as buses. In general microprocessor contains the ALU. Control units and registers.

Three main task performed by microprocessor:

   1. Data transfer between itself and the memory.
   2. simple arithmetic and logic operations and
   3. Program flow via simple decisions.


Rom (Read Only memory): ROM is a storage medium for the groups if bits and its content cannot be altered once programmed, A rom is a nonvolatile storage device which means that its contents are retained in the event of a loss of power to the ROM chip. Exception-PROM,EPROM etc.

RAM ( Random access memory):
RAM is a storage medium whose contents can be not only be read but also dynamically altered at specific addresses. Unlike ROM,RAM provides volatile storage i.e its contents are lost in the event of a power failure,

Register: A register is a volatile storage medium which can store a number of bits. The main characteristic of register is that, it can operate very fast.

Instruction Set: The instruction set of a microprocessor is the list of commands that the microprocessor is designed to execute.

Bus: A bus is a common group of wires that interconnect components in a computer system, A microprocessor has normally an address bus, a data bus and a control bus.

Microprocessor Programming language: MPL can be divided into three main types.

   1. Machine language: A machine language program consist of either binary or hexadecimal Operation code. Machine language is unique for each microprocessor. For example: Intel 8085 uses the code 100011102 for its addition instruction.
   2. Assembly Language: Assembly language program uses some common English-language –type statements, which is convenient to understand and focus the real world communication. It is generally composed of four filed.

I.            Label filed
II.          Instruction mnemonic or operation code field.
III.        Operand filed
IV.         Comment field.

Example- START:
MOV AX 10H: Initialize AX with 10,
INC CX : Increment CX
NOP : No Operation

   3. High Level language: High level language is a problem oriented language. The programmer does not have to know the details of the architecture of the microprocessor and instructions set.


Practical Application of microprocessor :  The application area of microprocessor is large as it is well suited to dedicated controllers, personal computers, automobiles etc.. some of them are—
i.              Furnace temperature control,
ii.             Personal computers
iii.            Real time robotic control

Name: Ashiq Hossain
ID: 121-14-696 & 083-11-558
Faculty of Business & Economics
Daffodil International University
Cell:01674-566806

Offline ashiqbest012

  • Hero Member
  • *****
  • Posts: 1186
  • I love my University
    • View Profile
Re: Microprocessor
« Reply #1 on: March 25, 2011, 09:20:03 PM »
Microprocessor (Chapter-2)


Basic Block of Microcomputer

A microprocessor has three basic blocks : A central processing Unit, 2: A Memory Unit and 3: A  I/O Input Output Unit .

Central processing Unit: The cpu executes all the instructions. The cpu of the computer is called the microprocessor.

Memory unit: The memory unit stores both data and instruction. The memory section typically contains ROM and RAM chips.

Input Output: An I/O transfer data between the microcomputer and the external device. The transfer involves data status and control signals.

Micro computer bus: The microcomputer bus contains three busses. Which carry all the address data and control information involved in program execution.
Address bus
Data bus
Control Bus
 
Address Bus : Address Bus is unidirectional information transfer takes place in only one direction, from the microprocessor to the memory or I/O elements. Fro 8-bit
Microprocessor, this bus typically 16 bits long, The CPU can generate 2 16 = 65,536
Different possible address,

Data Bus : In this bus data can flow in both direction to or from the microprocessor. Therefore this is a bi-directional bus
Control Bus: This bus consist of a number of signals that are used to synchronize the operations of the individual microcomputer elements, the microprocessor sends some of these control signals to the other elements to indicate the type of operation being performed.

Clock Signal: The system clock signal are continued in the control bus, these signals generate the appropriate  clock periods during which instruction are carried out by the microprocessor the clock signals vary from one microprocessor to another.  

Resisters of Microprocessor: While number, size and types of registers vary from one microprocessor to another the various registers in all microprocessors carry out similar operations, the most basic types of microprocessor register are as follows:

Instruction register (IR): The instruction register store an instruction. The content of an instruction register are always decoded by the microprocessor as an instruction,

Program counter: The program counter contains the address of the instruction or operation code, The PC usually points to the next location, that is it normally contains the address of the next instruction to be execute,

Memory address register : The memory address register  or data counter contains the address of data. The microprocessor uses the address which is stored in the memory address register, as a direct pointer to memory.

General Purpose Register: The 8086 microprocessor uses four general propose registers of data register. They are as follows

AH
   
AL
AX
AX (Accumulator) Register: AX is the preferred register to use in arithmetic logic and data transfer instructions because its use generates the shortest machine code, In multiplication and division operations one of the numbers involved must be in AX or AL . Input and out put operations also require the use of AL/AH/AX.

BX (BASE) Register: BX also serves as an address register an example is a table look up instruction called XLAT it is also useful in case of string operation.

CX Counter Register:
program loop constructions are facilitated by the use of CX, which serves ad a loop counter, CL is used instructions that shift and rotate bits.

DX Data Register : DX is used in multiplication and division it is also used in I/O operations,

Segment register: segment registers generate memory address when combined with other registers in the Microprocessor. There are four segment register in thr microprocessor.

CS Code segment: The code segment is a section of memory that holds the code used by the microprocessor. The code segment register defines the starting address of the section of memory holding the code.

DS Data segment : The data segment is a section of memory that contains most data used by a program. Data are accessed in the data segment by an offset address or the contents of other registers that hold the offset address.

ES Extra Segment: The extra segment is an additional data segment that is used by some of the string instruction to hold destination data.

SS Stack Register:
The stack segment defines the area of memory used for the stack, the stack entry point is determined by the stack segment and stack pointer register.

FS and GS: FS and GS register are available in the 80386, 486 and Pentium through Pentium 4 microprocessor to allow two additional memory segments for access by programs.

Pointer and index registers: Pointer and index registers unlike segment register. The pointer and index registers can be used in arithmetic and other register.

SP stack pointer register: The sp register is used in conjunction with Stack segment for accessing the stack segment, the access scheme can be defined and SS:SP.

BP Base Pointer Register: The BP register is used primarily to access data on the stack however. Unlike SP . we can use BP to access data in the other segments.

SI Source index Register: The SI register is used to point to memory locations in the data segment addresses by DS , By incrementing the contents of SI , we can easily access consecutive memory location.

DI (Destination index):
The DI register performs the same function as SI. There is a class of instructions called string operations.


FLAGS REGISTER: The propose of flags register is to indicate the status of the microprocessor. It does this by the setting of individual bits called flags. There are two kinds of flags 1. status flags & 2. control flags.

Source: http://www.netcomm1.blogspot.com/
Name: Ashiq Hossain
ID: 121-14-696 & 083-11-558
Faculty of Business & Economics
Daffodil International University
Cell:01674-566806