MICROPROCESSORS
A microprocessor is a multipurpose, programmable logic device that reads binary instructions from a storage device called memory, accepts binary data as input and processes data according to those instructions, and provides results as output . A typical programmable machine can be represented with three components: microprocessor. memory, and 110 as shown in Figure 1. These three components work to ether or interact with each other to perform a given task; thus, they comprise a system .The physical components of this system are called hardware.
A set of instructions written for the microprocessor to perform a task is called a program, and a group of programs is called software, The machine (system) represented in Figure1. can be programmed to turn traffic lights on and off, compute mathematical functions, or keep track of a guidance system. This system may be simple or sophisticated, depending on its applications, and it is recognized by various names depending upon the purpose for which it is designed. The microprocessor applications are classified primarily in two categories: reprogrammable systems and embedded systems. In reprogrammable systems, such as microcomputers the microprocessor is used for computing and data processing. These systems include general-purpose microprocessors capable of handling large data, mass storage devices (disks), and peripherals such as printers; a Personal Computer (PC) is a typical illustration. In embedded stems, the microprocessor is apart of a final product and .is not available for reprogramming the end user.
A copying machine is a typical example of an embedded system . The microprocessors used in these systems are generally categorized as: (1) microcontrollers that include all the components shown in Figure 1. on one chip, (2) integrated microprocessors that include various devices (such as timers and various types of 1/0s)on a chip, and (3) general-purpose microprocessors with discrete components shown in Figure 1. Embedded systems can also be viewed as products that use microprocessors to perform their operations; they are known as microprocessor-based products. Examples include a wide range of products such as washing machines ,dishwashers, automobile dashboard controls, traffic light controllers, and automatic testing instruments.
FIGURE 1. A Programmable Machine
BINARY DIGITS
The microprocessor operates in binary digits, g and I, also known as bits. Bit is an abbreviation for the term binary digit. These digits are represented in terms of electrical voltages in the machine: generally, 0 represents one voltage level, and J represents another. The digits 0 and 1 are also synonymous with low and high, respectively.
Each microprocessor recognizes and processes a group of bits called the word ,and microprocessors are classified according to their word length. For example, a processor with an 8-bit word is known as an 8.bit microprocessor, and a processor with a 16-bit word is known as a 16-bit microprocessor.
A MICROPROCESSOR AS A PROGRAMMABLE DEVICE
The fact that the microprocessor is programmable means it can be instructed to perform given tasks within its capability. A piano is 3 programmable machine; it is capable of generating various kinds of tones based on the number of keys it has. A musician selects keys depending upon the musical score printed on a Sheet. Similarly, today’s microprocessor is designed to understand and execute many binary instructions. It is a multipurpose machine: it can be used to perform various sophisticated computing functions, as well as simple tasks such as turning devices on or off: A programmer can select appropriate instructions and ask: the microprocessor to perform various tasks on a given set of data.
The person who designs a piano determines the frequency. ( tone ) for given key and the scope of the piano music. Similarly, the engineers designing a microprocessor determine a set of tasks the microprocessor; should perform and design the necessary logic circuits. and provide the user with a list of the instructions the ‘processor will understand. For example, an instruction for adding two numbers may look like a group of eight binary digits, such as 1000 QOOQ. These instructions are simply a pattern of Os and I s. The user (programmer) selects instructions from the list and determines the sequence of execution for a given task. These instructions are entered or stored in a storage device called memory, which can be read by the microprocessor.
MEMORY
Memory is like the pages of a notebook with space for a fixed number of binary numbers on each line. However, these pages are generally made of semiconductor material. Typically. each line is an 8-bit register that can store eight binary bits, and several of these registers are arranged in a sequence called memory. These registers are always grouped together in powers of two. For example, a group of 1024 (210) 8-bit registers on a semiconductor chip is known as 1 K byte of memory; 1 K is the closest approximation in thousands. The user writes the necessary. instructions and data in memory through an input device (described below ) and asks the microprocessor to perform the given task and find an answer. The answer is generally displayed at an output device (described below) or stored in memory.
INPUT/OUTPUT
The user can enter instructions and data into memory through devices such as a keyboard or simple switches. These devices are called input devices .The microprocessor reads the instructions from the memory and processes the data according to those instructions. The result can be displayed by a device such as seven segment LEOs (Light Emitting Diodes) or printed by a printer. These devices are called output devices.
MICROPROCESSOR AS A CPU
We can also view the microprocessor as a primary component of a computer. Traditionally, the computer is represented in block diagram as shown in Figure .2(a). The block diagram shows that the computer has four components: Memory, Input, Output ,and the central processing unit (CPU),which consists of the Arithmetic/Logic Unit (ALU) and Control Unit. The CPU contains various registers to store data ,the AL to perform arithmetic and logical operations ,instruction decoders, counters ,and control lines .The CPU reads instructions from the memory and performs tile tasks specified . It communicates with input/output . devices either to accept or to send data .These devices are also known as peripherals . The CPU is the primary and central player in communicating with devices such as memory, input ,and output .However, the timing of the communication process IS controlled by the group of circuits called the control unit.
In the 1960s.,the CPU was designed with discrete component~ on various boards .With the advent of the integrated circuit technology, it became possible to build the CPU on a single chip; this came to be known as a microprocessor, and the traditional block diagram shown in Figure 1.2(a) can be replaced by the block diagram shown in Figure 2(b).
Advances in Semiconductor Technology
In the last forty years, semiconductor technology has undergone unprecedented changes. After the invention of the transistor, integrated circuits (ICs) appeared on the scene at the end of the 1950s; an entire circuit consisting of several transistors, diodes, and resistors could be designed on a single chip. In the early 1960s, logic gates known as the 7400 series were commonly available as ICs, and the technology of integrating the circuits of a logic gate on a single chip became known as Small-Scale Integration (SSI). As semiconductor technology advanced, .more than 100 gates were fabricated on one chip; this was called Medium-Scale Integration (MSI)_ A typical example of MSI is a decade ,counter (7490). Within a few years, it was possible to fabricate more than 1000 gates on a single chip; this came to be known as Large-Scale Integration (LSI). Now we are in the era of Very-Large-Scale Integration (VLSI) and Super-Large-Scale Integration (SLSI). The lines of demarcation between these different scales of integration are rather ill-defined and arbitrary .
FIGURE 2
(a) Traditional Block Diagram of a Computer; (b) Block Diagram of a Computer with the Microprocessor as CPU
As the technology moved from SSl to LSI, more and more logic circuits. wore built on one chip, and they could be programmed to do different functions through hard-wired connections .For example, a counter chip can be programmed to count in Hex or decimal providing logic 0 or 1 through appropriate pin connections . the next step was the idea of providing 0s and 1s through a register. The necessary signal patterns of 0s and 1s were stored in registers and given to the programmable chip at appropriate times; the group of registers used for storage was called memory .Because of the LSI technology, it became possible to build, many computing functions and their related timing on a single chip.
The Intel 4004 was the first 4-bit programmable device that was primarily used in calculators. It was designed by Intel Corporation and became known as the 4-bit microprocessor. It was quickly replaced b the S-bit microprocessor (the Intel 8008), which was in turn superseded by the Intel 8080. In the mid-1970s, the, Intel 8080 was widely used in control applications.. and small computers also were designed using the 8080 as the CPU: these computers became known as microcomputers. Within a few years after the emergence of the 8080, the Motorola 6800 . the Zilog Z80, and the Intel 8085 microprocessors were developed as improvements over the 8080. The 6800 was designed with a different architecture and the instruction set from the 8080. On the other hand, the 8085and the Z80 were designed as upward software compatible with the 8080; that is, they included all the instructions of the 8080 plus additional instructions. In terms of the instruction .set, the 8080 and the 8085 are almost identical; however, the Z80 has a powerful instruction set containing twice as many instruction types as the 8080. As the microprocessors began to acquire more and more computing functions, they were viewed more as CPUs rather than as programmable logic devices. Most microcomputers are now built with 16-and 32-bit microprocessors, and 64-bit microprocessors are also being used in some special-purpose computers. The 8-bit microprocessors are not simply being replaced by more powerful microprocessor~, however; each microprocessor has begun to carve a niche for its own applications. The 8-bit microprocessors are being used as programmable logic devices in control applications, and the 16- and 32-bit microprocessors are being used for mathematical computing (number crunching) and data processing applications. Our focus here is in using 8′:bit microprocessors as programmable devices. .