Staudhammer, J, Chen, S.-L, Windley, P.J., Frenzel, J.F. "Microprocessors The Electrical Engineering Handbook Ed. Richard C. Dorf Boca Raton CRC Press llc. 2000
Staudhammer, J., Chen, S.-L., Windley, P.J., Frenzel, J.F. “Microprocessors” The Electrical Engineering Handbook Ed. Richard C. Dorf Boca Raton: CRC Press LLC, 2000
82 Microprocessors John Staudhammer Office of Naval Research Sue-Ling Chen 82.1 Practical Microprocessors Contractor, Allied signal Types of Microprocessors and Microcontrollers. Software for uP/uC Phillip j. windley Systems. Packaging and Cost. Programming uPs. Development upport. Comparison of uP/uC Chips. Trends in uP/uC Developments James F. Frenzel 82.2 Applications University of idaho Data Collection· Control· Computing 82.1 Practical Microprocessors John Staudhammer and Sue-Ling Chen A microprocessor(uP) is a semiconductor die containing the components of a computer central processor, omplete with instruction processing unit, arithmetic, int and basic communication facilities. Such devices have been around since the early 1970s and have greatly benefitted from the continuing improvements in electronics. As microelectronic technology allows the feature sizes of components to be shrunk, more powerful uP systems are being put on single dies. One of the early microprocessors, the Intel 8080, is still a widely used controller; its understanding and study are recommended for all designers of microprocessor systems [see Gaonkar, 1984]. Early processors contained a few thousands of transistors, while the top-end microprocessor has over 1.5 million. The early processors were 4-bit machines, initially intended for hand-held calculator use; the largest chips today are intended for use as full central processing units of large computers. What makes these devices micro is that they are microelectronic devices. These devices are typically built of NMOS(N-type metal-oxide semiconductoror CMOS(complementary metal-oxide semiconductor)circuits; the CMOS version is typically a bit more expensive and requires less power. An excellent overview of micro- processors and systems using them is found in Raffiquzzaman [1990] Application of a microprocessor involves adding memory for program and data, and input/output circuitry which may involve analog/digital and digital/analog converters As feature sizes of electronic components shrink, the manufacturer of the chip has three options: 1. Reduce the chip size(the die size)-this may result in a cheaper device of the same capability 2. Increase the processing power at the same cost. 3. Add peripheral circuits to the processor, thus putting on-chip devices normally added to the uP. Adding t combination of peripherals has the greatest benefit for system cost. A microcontroller (uC) is a microprocessor with peripherals on the same chip. These include various types of memory, interrupt structures, communication means, timing and data acquisition circuits. All three chip developments listed above occur simultaneously, thus keeping a successful product line going for many years. For example, the Motorola 6800 processor was introduced over 20 years ago; today it is still available, but the manufacturer steers designers to the successor chips, the 6809 uP and the 68HC1l uo A uP chip communicates to its peripherals by means of three sets of lines: the bidirectional data bus, memory address bus, and the control bus. In addition, the up will also send/receive data on communication c 2000 by CRC Press LLC
© 2000 by CRC Press LLC 82 Microprocessors 82.1 Practical Microprocessors Types of Microprocessors and Microcontrollers • Software for mP/mC Systems • Packaging and Cost • Programming of mPs • Development Support • Comparison of mP/mC Chips • Trends in mP/mC Developments 82.2 Applications Data Collection • Control • Computing 82.1 Practical Microprocessors John Staudhammer and Sue-Ling Chen A microprocessor (mP) is a semiconductor die containing the components of a computer central processor, complete with instruction processing unit, arithmetic, interrupt , and basic communication facilities. Such devices have been around since the early 1970s and have greatly benefitted from the continuing improvements in electronics. As microelectronic technology allows the feature sizes of components to be shrunk, more powerful mP systems are being put on single dies. One of the early microprocessors, the Intel 8080, is still a widely used controller; its understanding and study are recommended for all designers of microprocessor systems [see Gaonkar, 1984]. Early processors contained a few thousands of transistors, while the top-end microprocessor has over 1.5 million. The early processors were 4-bit machines, initially intended for hand-held calculator use; the largest chips today are intended for use as full central processing units of large computers. What makes these devices micro is that they are microelectronic devices. These devices are typically built of NMOS (N-type metal-oxide semiconductor) or CMOS (complementary metal-oxide semiconductor) circuits; the CMOS version is typically a bit more expensive and requires less power. An excellent overview of microprocessors and systems using them is found in Raffiquzzaman [1990]. Application of a microprocessor involves adding memory for program and data, and input/output circuitry, which may involve analog/digital and digital/analog converters.As feature sizes of electronic components shrink, the manufacturer of the chip has three options: 1. Reduce the chip size (the die size)—this may result in a cheaper device of the same capability. 2. Increase the processing power at the same cost. 3. Add peripheral circuits to the processor, thus putting on-chip devices normally added to the mP. Adding the right combination of peripherals has the greatest benefit for system cost. A microcontroller (mC) is a microprocessor with peripherals on the same chip. These include various types of memory, interrupt structures, communication means, timing and data acquisition circuits. All three chip developments listed above occur simultaneously, thus keeping a successful product line going for many years. For example, the Motorola 6800 processor was introduced over 20 years ago; today it is still available, but the manufacturer steers designers to the successor chips, the 6809 mP and the 68HC11 mC. A mP chip communicates to its peripherals by means of three sets of lines: the bidirectional data bus, the memory address bus, and the control bus. In addition, the mP will also send/receive data on communication John Staudhammer University of Florida and Office of Naval Research Sue-Ling Chen Contractor, Allied Signal Phillip J. Windley Brigham Young University James F. Frenzel University of Idaho
ines; the number and types of these vary greatly among chips. a uc will have on the same chip a number of memory elements, timers, communication ports and buffers, counters, and analog/digital converters in addition to a processor; communication to the peripheral circuits is through ports assigned to these devices, as well as any needed external memories. A discussion of general uC systems is given in Clements [1987], while Myers and Budde[ 1988] present the details of a very-high-performance Ho processors require an external clock, typically a crystal. The processor internal circuits run at this speed, but external devices usually use a submultiple of this rate, the bus clock, which is usually 2 to 4 times slower. The advertised clock rate is usually the external clock rate, not the bus cycle speed. There are well over a hundred different uP systems on the market. They each have peculiarities and may have me advantages. They differ by the kind of data they handle, the amount of processing they do, and the software apport they enjoy. What makes uP practical is not so much its claimed prowess, typically stated in peak instruction execution capability(MIPS, millions of instructions per second), but rather its ease of use in a given applicatio determined to a large degree by the kind and amount of support software available from the manufacturer. Types of Microprocessors and Microcontrollers The yearly compendium of uP/uC chips [Markowitz, 1997] categorizes these chips by the width of the data path: 4, 8, 16, 32, and 64 bits. In addition, high-performance chips include bit/word slice chips--these are meant to implement the functions of a central processing unit for a limited number of bits(4 or 8 bits)and re meant to be concatenated for handling an entire computer word. For a discussion of these chips and their uses, see Mick and Brick [1980] The most precious resource in a uP chip is the number of connection pins. Great efforts are made to utilize the ones used by various control lines and mode selections for the processor. Hence, a given uP chip may have four or more modes of operation: it is simply cheaper to build a flexible system, rather than several different ones. The vast majority of uPs possess a richness of data access (addressing modes ) they support mai ifferent ways of working with memory and external data items. They are complex instruction set computers (CISC). A prime example is the Motorola 68000 with five data groupings and nine addressing modes Even the simplest 4-bit processor in wide use(National Semiconductor COP400)has a 10-bit address bus (and a 4-bit data bus). The device can have up to l K words(1024 bytes)of memory on the chip, which is often enough for a simple dedicated task. Thus, these chips often appear as single items in simple computer controlled devices. Most of these chips are found in embedded applications, in kitchen appliances, and in toys By far the largest volume of uPs are 8-bit devices; they use 8-bit-wide(1 byte)data paths, but have address busses usually 16(or more)bits. Often the data bus is time-multiplexed with the lower byte of the address bus These types of devices can access as much as 65 K memory locations. The typical instruction execution time is 3 to 7 bus cycles. a widely used 8-bit processor is the Zilog Z-80 The 16-bit uP chips have 16 data and address lines. The typical execution time is 2 to 5 bus cycles. The 32-bit and 64-bit uP chips are the high end of these devices and find application in advanced personal computers, high-performance workstations, and digital controllers. They are characterized by high cost(com- pared to most uC chips) and extensive support circuitry. The typical execution time is 1 to 2 bus cycles. They represent the developing efforts in up technology. Microcontroller chips contain a uP and various items that make up a up-based system: there is usually some random access memory(RAM)for holding volatile data, at least one kind of read only memory(roM) for holding the control program, communication peripherals, including parallel interface(s), serial communication dapter(s), various counting and timing circuits for measuring input pulses, and analog/digital converters Because each processor has an external clock, usually a crystal clock, timing intervals can be determined to great precision. Many procedures have been developed to take advantage of this precision: voltage-to-frequency converters are used externally to bring pulses to the uP system, which then proceeds to accurately count them. The timing and counting capabilities of uP systems gives them their ubiquitous applicability. Software for uP/uC Systems Manufacturers of up/uc devices have gone to extraordinary efforts to make their devices attractive to system designers. Much software is offered for use with the chips and to support the design effort. ROM-based monitor e 2000 by CRC Press LLC
© 2000 by CRC Press LLC lines; the number and types of these vary greatly among chips. A mC will have on the same chip a number of memory elements, timers, communication ports and buffers, counters, and analog/digital converters in addition to a processor; communication to the peripheral circuits is through ports assigned to these devices, as well as any needed external memories. A discussion of general mC systems is given in Clements [1987], while Myers and Budde [1988] present the details of a very-high-performance mC. All processors require an external clock, typically a crystal. The processor internal circuits run at this speed, but external devices usually use a submultiple of this rate, the bus clock, which is usually 2 to 4 times slower. The advertised clock rate is usually the external clock rate, not the bus cycle speed. There are well over a hundred different mP systems on the market. They each have peculiarities and may have some advantages. They differ by the kind of data they handle, the amount of processing they do, and the software support they enjoy. What makes mP practical is not so much its claimed prowess, typically stated in peak instruction execution capability (MIPS, millions of instructions per second), but rather its ease of use in a given application, determined to a large degree by the kind and amount of support software available from the manufacturer. Types of Microprocessors and Microcontrollers The yearly compendium of mP/mC chips [Markowitz, 1997] categorizes these chips by the width of the data path: 4, 8, 16, 32, and 64 bits. In addition, high-performance chips include bit/word slice chips—these are meant to implement the functions of a central processing unit for a limited number of bits (4 or 8 bits) and are meant to be concatenated for handling an entire computer word. For a discussion of these chips and their uses, see Mick and Brick [1980]. The most precious resource in a mP chip is the number of connection pins. Great efforts are made to utilize the ones used by various control lines and mode selections for the processor. Hence, a given mP chip may have four or more modes of operation: it is simply cheaper to build a flexible system, rather than several different ones. The vast majority of mPs possess a richness of data access means (addressing modes); they support many different ways of working with memory and external data items. They are complex instruction set computers (CISC). A prime example is the Motorola 68000 with five data groupings and nine addressing modes. Even the simplest 4-bit processor in wide use (National Semiconductor COP400) has a 10-bit address bus (and a 4-bit data bus). The device can have up to 1 K words (1024 bytes) of memory on the chip, which is often enough for a simple dedicated task. Thus, these chips often appear as single items in simple computercontrolled devices. Most of these chips are found in embedded applications, in kitchen appliances, and in toys. By far the largest volume of mPs are 8-bit devices; they use 8-bit-wide (1 byte) data paths, but have address busses usually 16 (or more) bits. Often the data bus is time-multiplexed with the lower byte of the address bus. These types of devices can access as much as 65 K memory locations. The typical instruction execution time is 3 to 7 bus cycles. A widely used 8-bit processor is the Zilog Z-80. The 16-bit mP chips have 16 data and address lines. The typical execution time is 2 to 5 bus cycles. The 32-bit and 64-bit mP chips are the high end of these devices and find application in advanced personal computers, high-performance workstations, and digital controllers. They are characterized by high cost (compared to most mC chips) and extensive support circuitry. The typical execution time is 1 to 2 bus cycles. They represent the developing efforts in mP technology. Microcontroller chips contain a mP and various items that make up a mP-based system: there is usually some random access memory (RAM) for holding volatile data, at least one kind of read only memory (ROM) for holding the control program, communication peripherals, including parallel interface(s), serial communication adapter(s), various counting and timing circuits for measuring input pulses, and analog/digital converters. Because each processor has an external clock, usually a crystal clock, timing intervals can be determined to great precision. Many procedures have been developed to take advantage of this precision: voltage-to-frequency converters are used externally to bring pulses to the mP system, which then proceeds to accurately count them. The timing and counting capabilities of mP systems gives them their ubiquitous applicability. Software for mP/mC Systems Manufacturers of mP/mC devices have gone to extraordinary efforts to make their devices attractive to system designers. Much software is offered for use with the chips and to support the design effort. ROM-based monitor
THE INTEGRATED CIRCUIT M icroelectronics has been the most significant area of development in Ia electrical technology in recent years 1 and has had a profound effect on the course of electrical engineering. The integrated circuit was one of the major developments of its time The increasing complexity of electronic devices meant that even transistorized circuits ould be too large and heavy, especially for aero- space applications. In addition, the reliability of uch circuits was limited by the ever-increasing number of interconnections. The integrated cir- uit was a solution to both of these problems They actually changed the way electrical circuits The Intel 4004, the first commercial microprocessor, was were designed. Engineers had grown accus- originally designed for a programmable calculator. It repre- tomed to creating circuits with a minimum of sented the first consolidation of the arithmetic and logic active components, since transistors and diodes functions of several chips onto a single integrated circuit were relatively more expensive than resistors(Photo courtesy of the IEEE Center for the History of Elec- and capacitors. However, active components are trical Engineering. both smaller and easier to put on a silicon chip than inactive ones. Thus, the circuits most adaptable to integration are digital circuits, with many active components performing"yes-no"logic functions. Since these are the types of circuits used in computers it actually encouraged engineers to look for digital solutions to design problems. The blending of microelectronics and computers has produced the microprocessor, the computer on a chip. This has made possible tremendous reductions in computer size and cost, and consequently has made computers far more available for previously undreamed-of applications. Not since the develop- ment of electric power systems began over one hundred years ago have engineers produced such a fundamental and far-reaching tool for change. Courtesy of the IEEE Center for the History of Electrical Engineering. programs are available in most chips so that normal communication tasks can be accomplished easily; programs usual input/output tasks, data acquisition, timing, and program examples are distributed so that(relatively) error-free software is available for the designers. Most of these are distributed through public-access dial-up bulletin boards. Programming then becomes largely an adaptation of these programs to the tasks that the system is to perform. Of course, the system task analysis and program system design are still the designer's responsi bilities. as is the conduct of a software validation. The uP receives instructions, from its internal or external memory, and data, as a combination of zeros and ones; it is this machine code instruction that controls the operation of the system. The writing of such machine code is far too tedious. An English-like language, machine mnemonics, is used to describe each machine operation and this is then translated to the 0s and 1s which are stored in the memory. For example ADD 123 may stand for the machine code necessary to perform the addition of the number contained in memory location 123 to the content of the computers arithmetic register, leaving the result in the arithmetic register. The manufacturers supply assemblers to accomplish the mnemonic language assembly into code that may be loaded into the uP memory. These assemblers typically will run on personal computers and various minicomputer systems. Pro- e 2000 by CRC Press LLC
© 2000 by CRC Press LLC programs are available in most chips so that normal communication tasks can be accomplished easily; programs for usual input/output tasks, data acquisition, timing, and program examples are distributed so that (relatively) error-free software is available for the designers. Most of these are distributed through public-access dial-up bulletin boards. Programming then becomes largely an adaptation of these programs to the tasks that the system is to perform. Of course, the system task analysis and program system design are still the designer’s responsibilities, as is the conduct of a software validation. The mP receives instructions, from its internal or external memory, and data, as a combination of zeros and ones; it is this machine code instruction that controls the operation of the system. The writing of such machine code is far too tedious. An English-like language, machine mnemonics, is used to describe each machine operation and this is then translated to the 0’s and 1’s which are stored in the memory. For example ADD 123 may stand for the machine code necessary to perform the addition of the number contained in memory location 123 to the content of the computer’s arithmetic register, leaving the result in the arithmetic register. The manufacturers supply assemblers to accomplish the mnemonic language assembly into code that may be loaded into the mP memory. These assemblers typically will run on personal computers and various minicomputer systems. Programs that monitor the operation of an actual chip through the mP serial port(s) are effective development tools. THE INTEGRATED CIRCUIT icroelectronics has been the most significant area of development in electrical technology in recent years and has had a profound effect on the course of electrical engineering. The integrated circuit was one of the major developments of its time. The increasing complexity of electronic devices meant that even transistorized circuits could be too large and heavy, especially for aerospace applications. In addition, the reliability of such circuits was limited by the ever-increasing number of interconnections. The integrated circuit was a solution to both of these problems. They actually changed the way electrical circuits were designed. Engineers had grown accustomed to creating circuits with a minimum of active components, since transistors and diodes were relatively more expensive than resistors and capacitors. However, active components are both smaller and easier to put on a silicon chip than inactive ones. Thus, the circuits most adaptable to integration are digital circuits, with many active components performing “yes-no” logic functions. Since these are the types of circuits used in computers, it actually encouraged engineers to look for digital solutions to design problems. The blending of microelectronics and computers has produced the microprocessor, the computer on a chip. This has made possible tremendous reductions in computer size and cost, and consequently has made computers far more available for previously undreamed-of applications. Not since the development of electric power systems began over one hundred years ago have engineers produced such a fundamental and far-reaching tool for change. (Courtesy of the IEEE Center for the History of Electrical Engineering.) The Intel 4004, the first commercial microprocessor, was originally designed for a programmable calculator. It represented the first consolidation of the arithmetic and logic functions of several chips onto a single integrated circuit. (Photo courtesy of the IEEE Center for the History of Electrical Engineering.) M
Hence, the typical software includes an assembler, a loader, and a monitor. More these tasks is available from third-party vendors; many of these extra-cost software packages are highly cost effective. Interactive assemblers and debugging tools are particularly good investments. nd Cost The simplest processors are housed in normal dual in-line packages(DIP)of 16 pins or more, spaced 0.3 inches wide. Thus, they resemble conventional transistor-transistor logic (TTL) packages. The mid-range ones are usually in large DIP packages, 0.8 inches wide, with 40 to 68 pins(2 to 4 inches long. The high-performance ones come in multirow pin packages and may require 200 connections and may use unusual chip sockets. The high performance chips may require special cooling Virtually all processors are multisource, i. e, they are available from more than one manufacturer. This n important consideration for continued product support. The processors come in various speed grades; the higher speed ones may be 3 to 5 times as costly as the slow-speed versions. The low-end processors, with no memory and a few communication ports, cost less than Sl in quantity. The widely used Z-80, developed about 20 years ago, costs about $1, while the high-end processors(860, Pentium Pro)cost around s1000, in low q ramming of uPs Most uP systems are programmed in assembly language. Each of the instructions that the processor can execute given an English-like name (i.e, ADD for the instruction to add two numbers )and translator programs are available from the uP manufacturers to translate the English-like statements(the source code) into the machine codes(which are streams of zeros/ones that the uP interprets). Such assemblers are available from public-acce bulletin boards maintained by several vendors; however, convenient assemblers for specific uP systems are usually bought from third-party vendors. Almost all uP assemblers are meant to be used on personal computers ome are available for minicomputer systems. One should check with the chip manufacturer for current software High-level language compilers are also available for most uPs, typically from third-party vendors. These are sually C-language compilers, but Pascal compilers also may be available. Here again, the best guide is the chip The programming of uP systems usually involves carefully tailored code to control signals that interact with the processor chip. Usually the functions that are required of the processor are time-critical real-time control actions. Programs for such applications can easily become highly intricate and require detailed knowledge of all the functions of the processor chip. For a discussion of these problems, see Chapters 3 and 4 of Peatman [ 1988] Development Support Complex uP/uC systems are designed top-down: the task statements are successively refined to a set of smaller tasks, until they can be implemented in relatively short subroutines. The design approach for micro-based systems is described and illustrated in Peatman [ 1988] The most important support software for a designer is programs for checking the system, both for logical flow and for cycle-by-cycle activity Often subtle errors and data dependencies will occur; finding them may be a daunting task. Simulators are the first-level checkout tools for programs. Simulators do not use the actual hardware; rather they use a software model of it. They calculate and show the contents of all computer registers, of ports and selected memory locations, so that an effective check of the internal operations can be made. Most simulators are from third-party vendors The actual operation of the uP/uC system may be checked with an in-circuit emulator(ICE), an expensive but effective tool that replaces the up or uc pin-for-pin in the actual circuit. The ICE typically powerful computer to mimic the performance of the uP/uC being developed. The ICE tracks signals(including many transients)and can be used to effectively show the behavior of the system, as well as the expected response from the uP and its associated software. e 2000 by CRC Press LLC
© 2000 by CRC Press LLC Hence, the typical software includes an assembler, a loader, and a monitor. More user-oriented software for these tasks is available from third-party vendors; many of these extra-cost software packages are highly cost effective. Interactive assemblers and debugging tools are particularly good investments. Packaging and Cost The simplest processors are housed in normal dual in-line packages (DIP) of 16 pins or more, spaced 0.3 inches wide. Thus, they resemble conventional transistor-transistor logic (TTL) packages. The mid-range ones are usually in large DIP packages, 0.8 inches wide, with 40 to 68 pins (2 to 4 inches long.) The high-performance ones come in multirow pin packages and may require 200 connections and may use unusual chip sockets. The high performance chips may require special cooling. Virtually all processors are multisourced, i.e., they are available from more than one manufacturer. This is an important consideration for continued product support. The processors come in various speed grades; the higher speed ones may be 3 to 5 times as costly as the slow-speed versions. The low-end processors, with no memory and a few communication ports, cost less than $1 in quantity. The widely used Z-80, developed about 20 years ago, costs about $1, while the high-end processors (i860, Pentium Pro) cost around $1000, in low quantities. Programming of mPs Most mP systems are programmed in assembly language. Each of the instructions that the processor can execute is given an English-like name (i.e., ADD for the instruction to add two numbers) and translator programs are available from the mP manufacturers to translate the English-like statements (the source code) into the machine codes (which are streams of zeros/ones that the mP interprets). Such assemblers are available from public-access bulletin boards maintained by several vendors; however, convenient assemblers for specific mP systems are usually bought from third-party vendors. Almost all mP assemblers are meant to be used on personal computers; some are available for minicomputer systems. One should check with the chip manufacturer for current software. High-level language compilers are also available for most mPs, typically from third-party vendors. These are usually C-language compilers, but Pascal compilers also may be available. Here again, the best guide is the chip manufacturer. The programming of mP systems usually involves carefully tailored code to control signals that interact with the processor chip. Usually the functions that are required of the processor are time-critical real-time control actions. Programs for such applications can easily become highly intricate and require detailed knowledge of all the functions of the processor chip. For a discussion of these problems, see Chapters 3 and 4 of Peatman [1988]. Development Support Complex mP/mC systems are designed top-down: the task statements are successively refined to a set of smaller tasks, until they can be implemented in relatively short subroutines. The design approach for micro-based systems is described and illustrated in Peatman [1988]. The most important support software for a designer is programs for checking the system, both for logical flow and for cycle-by-cycle activity. Often subtle errors and data dependencies will occur; finding them may be a daunting task. Simulators are the first-level checkout tools for programs. Simulators do not use the actual hardware; rather they use a software model of it. They calculate and show the contents of all computer registers, of ports and selected memory locations, so that an effective check of the internal operations can be made. Most simulators are from third-party vendors. The actual operation of the mP/mC system may be checked with an in-circuit emulator (ICE), an expensive but effective tool that replaces the mP or mC pin-for-pin in the actual circuit. The ICE typically uses a more powerful computer to mimic the performance of the mP/mC being developed. The ICE tracks signals (including many transients) and can be used to effectively show the behavior of the system, as well as the expected response from the mP and its associated software