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
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.