المحاضرة الاولى.PDF
Document Details
Uploaded by AltruisticSecant
Tags
Full Transcript
College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class 1- Introduction to Intel Microcomputer and Microprocessor families: brief history. 1.1...
College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class 1- Introduction to Intel Microcomputer and Microprocessor families: brief history. 1.1-Microcomputer: The IBM personal computer (the PC), shown in fig 1-1, was IBM's first entry into the microcomputer market, after its introduction in mid-1981, market acceptance of the PC grew by leaps and bounds() م وساق. One of the important keys to its success is that an enormous amount of application software became available for the machine, including business applications, software languages, educational programs, games. Fig 1-1 Original IBM Personal Computer Another reason for the IBM PC's success is the fact that it offers an open system architecture. By open system, we mean that the functionality of the PC expands by simply adding boards into the system. Some examples of add-in hardware features are additional memory, a modem, serial communication interfaces, and a local area network interface. IBM defined an 8- bits expansion bus standard known as the I/O channel and provided its specification to other manufactures so that they could build different types of add – in products for the PC. 1 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class The success of the PC caused IBM to introduced additional family member, IBM's PCXT is shown in Fig. 1-2 and an 80286- based PC/AT is displayed in Fig. 1-3. The PCXT was introduced on March 8, 1983 employed the same system architecture as that of the original PC. It was also designed with the 8088 microprocessor, but one of the floppy disk drives was replaced with a 10M byte (10,000,000-byte) hard disk drive. Fig 1-2 IBM PCXT The original PC/AT was designed in August 1984 with a 6-MHz 80286 microprocessor and defined a new open – system bus architecture called the industry standard architecture (ISA). Which provides a 16-bit, higher performance I/O expansion bus. Fig 1-3 IBM PC/AT 2 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class Today, Pentium IV (introduced by Intel on November 20, 2000) processor- based PCs are the mainstay ( )ع ادof the personal computer marketplace. Systems that are implemented with the Pentium IV processor no longer contain an ISA bus. They employ a new high – speed bud architecture known as the peripheral component interface (PCI) bus. PCI permits connection of high – performance I/O interfaces, such as graphics, videos, and high – speed local area network (LAN). The PCI bus supports 32-bit and 64-bit data transfer, and its data – transfer rate is more than 10 times that of the ISA bus. These modern machines offer a wide variety of computing capabilities, range of performance, and software base for use on business and at home. 1.2- Classes of Computers Let us now look at what a microcomputer is and how it differs from the other classes of computers. Evaluation of the computer marketplace over the past 25 years has taken us from very large mainframe computers to smaller minicomputers and now to even smaller microcomputers. These three classes of computers did not originally replace each other; they all coexisted in the marketplace. Computer users had the opportunity to select the computer that best meet their needs. The mainframe computer was used in an environment where it served a large number of users. For instance, a large university or institution would select a mainframe computer for its data – processing center where it would service hundreds of users. Mainframes are still used today to satisfy very large computer requirements. The minicomputer had been the primary computer solution for the small, multiuser business environment. In this environment, several users connect to the system with terminals and all share the same computer system, with many of them actively working on the computer at the same time. The microcomputer has taken over most of the traditional minicomputer user base. High- feature, high performance microcomputer – based systems have replaced the minicomputer as a file server. Many users have their personal computers attached to the file server through a local area network. 3 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class 1.3-General Architecture of A Microcomputer System The hardware of a microprocessor system can be divided into four functional sections: the input unit, microprocessing unit, memory unit, and output unit. The block diagram in fig 1—4 shows this general microcomputer architecture. Fig. 1-4 General architecture of a microcomputer system The heart of a microcomputer is its microprocessing unit (MPU). The microprocessor or just processor for short is a general purpose processing unit built into a single integrated circuit (IC).Its function is to execute programs stored in the program memory by fetching their instructions, examining them, and then executing one after another. The MPU is composed of several distinct parts. The control unit is responsible for fetching instructions from program memory and determining their type. The Arithmetic Logic Unit performs arithmetic and logical operations. The microprocessor used in the original IBM PC is Intel Corporation's 8088, shown in fig. 1—5. The input unit (IU) is used to input the information to be processer from external input device such as a card reader, keyboard, or switch. The output unit (OU) is used to output the processed results of computer to the external output devices such as a printer, monitor, 7- segment display, and LED. 4 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class The memory unit (MU) is used to store information such as number or character data. By store we mean that the memory has the ability to hold this information for processing or for outputting at a later time. The memory unit is divided into primary storage memory and secondary storage memory. Typically, Primary storage memory is implemented with semiconductor memories: read-only memory (ROM)( nonvolatile ) and random access read/write memory (RAM) (volatile) integrated circuits. Secondary storage memory is used for long-term storage of information that is not currently being used such as hard disk and CD ROM. In addition to the above, there are a collection of wires which connect between these units are called the buses, a bus is used to transmit signals in parallel. According to the purpose, the buses of a microcomputer can be divided into three types : address bus, data bus, and control bus. Address Bus: The unidirectional address bus transmits the address signals emitted from MPU to memory and I/O port. Data Bus: The signal on the bidirectional data bus is the data either from MPU to memory and I/O or from memory and I/O to MPU. Control Bus: The control bus is used to transmit the control signals such as read, write, and interrupt control signal. Fig. 1-5 Intel MPU 8088 5 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class 1.4-EVOLUTION OF THE INTEL MICROPROCESSOR ARCHITICTURE Microprocessor and microcomputer generally are categorized in term of the maximum number of binary bits in the data they process, that is their word length. Over time, five standard data widths have evolved for microprocessor and microcomputers: 4-bit, 8-bit, 16 bit, 32 bit, and 64 bit. The first microprocessor was introduced I 1972, the 4004, was designed to process data arranged as 4-bit words. This organization is also referred to as a nibble of data. The 4004 implemented a very low performance microcomputer by today's standard. Beginning in 1974, a second generation of microprocessors was introduced. These devices, the 8008, 8080, and 8085, were 8-bit microprocessors and were designed to process 8-bit (1 – byte-wide) data instead of 4 bit data. The 8080 was introduced in 1975. In the mid – 1970s, many of the leading semiconductor manufactures announced plans for development of third generation 16 – bit microprocessors, the 8086 became available in 1979 and was followed the next year by its 8-bit bus version , the 8088. This was the birth of Intel's 8086 family architecture. Other family members, such as the 80286, 80186, 80188, were introduced in the years that followed. These 16-bit microprocessors provided higher performance and had ability to satisfy a broad scope of special – purpose microcomputer applications. They all have the ability to handle 8 bit , 16-bit, and special- purpose data types, and their powerful instruction sets are more in line with those provided by a minicomputer. In 1985, Intel introduced its first 32 bit microprocessor, the 80386DX, which brought true minicomputer-level performance to the microprocessor system. This device was followed by a 16-bit external bus version, the 80386SX, in 1988. Intel's second generation of 32 – bit microprocessors, called the 80486DX and 80486SX, became available in 1989 and 1990, respectively. They were followed by a yet higher- performance family, the Pentium processor, in 1993. Then intel was introduced its fourth generation member – the Pentium IV processor. 6 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class Fig. 1-6 Evaluation of Intel MPU 1.5-NUMBER SYSTEMS For microprocessor and microcomputer, information such as instructions, data, and address are described with numbers. The types of numbers used are not normally the decimal numbers we are familiar with; instead, binary and hexadecimal numbers are used. We must understand how numbers are expressed in these number systems and how to convert values between them. 1.5.1- Decimal Number System First we shall use decimal numbers to develop the general characteristics of a number system. Selecting a set of symbols to represent numerical values forms a number system. When doing this, we can select any group of symbols, the number of symbols used is called the base of the number system. For example, let us look at the decimal number system. Symbols 0 through 9 make up the decimal number system. These symbols are shown in fig. 1-7(a). Here we find that 10 different symbols are used, so the base of the decimal number system is 10. Each of these symbols indicates a different numerical quantity –0 representing the smallest quantity and 9 the largest quantity. With just the 10 basic symbols of the decimal number system we cannot form every quantity needed in mathematics and science. For this reason, digit notation is used. An example of a decimal number written in digit notation is : 735.23 Here the same basic symbols are used to form a larger multi digit number. This number has symbols entered into five different digit locations. 7 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class 0123456789 (a) MSD LSD 3 2 1 0 -1 -2 10 10 10 10. 10 10 10-3 Weights 1000 100 10 1. 1/10 1/100 1/1000 (b) Reference digit Fig. 1-7 (a) Decimal number system. (b) Digit notation and weights. 1.5.2- Binary Number System The digital electronics devices and circuits in a microcomputer system operate only in one of two states, on or off. For this reason, binary numbers instead of decimal nmbers are used to describe their operation. The base of binary number system is 2, and fig. 1-8 (a) shows that just two symbols, 0 and 1 are used to form all numbers. From an electronic circuit point of view, binary 1 normally represent a circuit input or output that is turned on. On the other hand, a 0 represent the same input or output when it is turned off. To make a large binary number, many 0s and 1s are grouped together. The location of a symbol in a binary number is called a bit a contraction for "binary digit" as an example, let us take the binary number 1101.0012 01 (a) 23 22 21 20. 2-1 2-2 2-3 8 4 2 1. 1/2 1/4 1/8 (b) Fig. 1-8 (a) Binary number system. (b) bit notation and weights. 8 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class In a binary number, the leftmost bit is referred to as the most significant bit (MSB) and the rightmost bit the least significant bit (LSB). In the number 1101.001, the MSB has a value of 1 and weight 2+3 equals 8. On the other hand, the least significant bit is 1 with a weight of 2-3 or 1/8. 1.5.3- Conversation between decimal and binary numbers All numbers can be expressed in both the decimal and binary number systems. Figure 1— 9 lists the decimal numbers 0 through 15 along with their equivalent binary numbers. Just as one can count consecutive numbers, binary numbers can be counted as 0, 1, 10, 11 and so on. From this list, we find that the binary equivalent of decimal number 0 is just binary 0 on the other hand , decimal 15 is written in binary form as 1111 2 as shown. In microcomputer systems, binary numbers are normally treated in fixed length. For example, the 8088 has the ability to process either 8-bit wide or 16 bit wide data. These width are known as a byte of data and a word of data, respectively. For instance, binary zero expressed as a byte is Byte – wide binary 0 = 000000002 Decimal Number Binary Number 0 0 1 01 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 11 1011 12 1100 13 1101 14 1110 15 1111 Fig. 1-9 (a) Equivalent decimal and binary numbers 9 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class To find the decimal equivalent of a binary number, multiply the value in each bit of the number by the weight of the corresponding bit. After this add the products to get the decimal number. For example: 11002 = 1(23) + 1(22) + 0(21) + 0(20) = 1(8) + 1(4) + 0(2) + 0(1) = 1210 Expressing 1210 as a word – wide binary number gives: 00000000000011002 Example (1): Evaluate the decimal equivalent of binary number 101.01 2 Solution: 101.012 = 1(22) + 0(21) + 1(20) + 0(2-1)+1(2-2) = 1(4)+0+1(1)+0+1(0.25) = 4 + 1 + 0.25 = 5.2510 The other conversation we must be able to perform is to express a decimal number in binary form. The binary equivalent of the integer part of a decimal number is formed by the repeater division method. Using this method, the integer decimal number is divided by 2, the quotient brought down, and the remainder written to the right. This procedure is repeated until the quotient is zero. Example (2): Convert 15510 to binary equivalent using divided method: 10 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class The result is: 100110112 The binary equivalent of the decimal fraction part of a decimal number is found by a repeated multiplication method. Applying this method, the decimal fraction is multiplied by 2 and the integer part of that product is brought out as the binary bit. This first multiplication gives the most significant bit of the equivalent binary number. Example (3): Convert the fraction number 0.8125 to its equivalent binary number: 2 *.8125 1 MSB 2*.625 1 2*.25 0 2*.5 1 LSB 2*0 The result is:.11012 11 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class 1.5.4- Hexadecimal Number System The hexadecimal number system is important for describing microcomputer operation and programing. In fact, machine language program, address and data, which are actually binary information, are normally expressed as hexadecimal numbers. Hexadecimal numbers offers a more compact notation for representing this type of information. The base of the hexadecimal number system is 16, and it uses numerical symbols 0 through 9 followed by letters A through F to form numbers. Letters A through F stand for numerical values equivalent to decimal numbers 10 through 15 respectively. These symbols are listed in Fig 1-10 (a), (b) gives typical hexadecimal weights 0123456789ABCDEF (a) MSD LSD Weights 163 162 161 16 0. 16-1 16-2 4096 256 16 1. 1/16 1/256 (b) Fig (1—10) a hexadecimal number system symbols (b) Digit notation and weights The method used to convert directly between decimal and hexadecimal number is similar to that for converting binary numbers: Example (4): What decimal number does 102A16 represent? Solution: 102A16 = 1(163) + 0 (162) + 2(161)+ A(1) = 1(4096)+0(256)+2(16)+A(1) = 4096+32+10 = 413810 12 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class Example (5): Convert decimal number 413810 to hexadecimal form: Solution: 4138 divided 16 =258 rem =A LSB 258 divided 16 = 16 rem = 2 16 divided 16 =1 rem =0 1 divided 16 –rem =1 MSB The result is: 102A16 1.5.5- Conversation between Hexadecimal and binary numbers Earlier we indicated that the importance of using hexadecimal numbers in study of microcomputer – based system is that they can be used to rewrite information such as data or instructions, in a very compact way. For instance a multibit binary number can be expressed with just a few hexadecimal digits. For this reason it is most important to learn how to directly convert between the binary and hexadecimal number forms. Fig (1—11) lists all 4 bit binary numbers and their equivalent hexadecimal number. Here we see that a 4 bit binary zero is the same as a one digit hexadecimal zero, moreover each binary number that follow up through 11112 is the same as one of the hexadecimal numbers from 116 to F16. In this way we find that 4 binary bits give a single hexadecimal digit. This fact is the basis for converting between binary and hexadecimal digit. Binary number Hexadecimal number 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9 1010 A 1011 B 1100 C 1101 D 1110 E 1111 F Fig. 1-11 Equivalent Hexadecimal and Binary numbers 13 By yazen College of engineering Subject: Microprocessor Electrical department Lecture No.: ( ) 3rd P& M class Example (6): Express the binary number 1111100100001002 Solution: 111110010000100 = 1111 1001 0000 1010 = F 9 0 A 1111100100001002 = F90A16 An H is frequently used instead of subscript 16 to denote that a value is a hexadecimal number. For example: Example (7) : Convert A5H to equivalent binary number: A5H = 1010 0101 = 101001012 14 By yazen