Home |
By Tom Allen This is Part 1 of a 2-part article exploring the changes in electronics troubleshooting brought about by the growing popularity of microprocessor-based products. In this first segment, we'll discuss how analog, digital and microprocessor-based systems differ; why traditional troubleshooting equipment isn't sufficient for microprocessor-based products; and what new types of equipment have emerged to fill the gap. Next month, we'll explore the techniques needed to troubleshoot microprocessor based systems effectively and show how these techniques, together with an inexpensive digital tester, can significantly simplify the process of troubleshooting microprocessor-based products. The past 25 years have witnessed a technology explosion that has completely changed the nature of consumer electronics, causing the familiar analog circuitry of the past to be replaced first with digital and then with microprocessor-based circuits. Although the new microprocessor-based systems may have simplified the lives of consumers, they have made the job of the service technician a great deal more complicated than in the past. Take the case of a simple wall thermostat, for example. Once thermostats consisted simply of a bimetal bar and a pair of contacts. Now they have liquid crystal displays and keypads. Today's automobiles make heavy use of micro systems for purposes ranging from emission control to mileage and gas calculation. Even the cash registers at the supermarket checkout line are heavily computerized. Allen is product specialist, Service Equipment Group, at John Fluke Manufacturing Company, Everett, WA. Two key events played a key role in creating this technology explosion. The first, the development of the integrated circuit (IC), sparked the move from analog to digital circuitry. The second, the development of the microprocessor, opened the door for microprocessor based electronics. Analog to digital circuitry The appearance of the first ICs in the early 1960s was a direct result of the efforts that were then being made to put a man on the moon. Computer technology was a necessity if the expedition was to succeed, but computers were far too large at that time to fit inside a space capsule. It was this need for smaller computers that led to the development of the first IC. As the price of ICs decreased, they began to appear in other applications, including a variety of consumer electronics products. Digital circuitry began to replace analog circuitry in products ranging from clocks and watches to microwave ovens and TV tuning systems. Without ICs, this transition from analog to digital circuitry simply would not have been possible: The digital electronics would have taken up far too much space to be practical. Digital to microprocessor-based circuits In 1974, Intel Corporation developed the world's first microprocessor, the 4004. Use of the technology originally was limited to military and industrial applications, such as instrumentation, communications equipment and data processing equipment. As with ICs, however, continued development of the technology, together with significant price reductions, soon led to the increasing appearance of microprocessor-based circuitry in consumer electronics products. Figure 1 demonstrates this growing trend, showing how the number of microprocessor-based boards in production has increased from 1980 to 1985. Microprocessors vs. microcontrollers It should be noted that the term microprocessor may be used in both a generic and a specific sense. In a generic sense, a microprocessor is any chip sized device capable of making decisions and sending out instructions based on values entered into it. In a more technical sense, however, the term microprocessor refers only to those chip-sized computing devices that do not contain their own built-in control program. Instead, the microprocessor's control program is built into a separate chip known as read-only memory (ROM). Microprocessors also make use of another chip, known as random-access memory (RAM), as a temporary holding area for data. Personal computers are a good example of a system based on a true microprocessor. --------------
MICROPROCESSOR BASED BOARDS IN PRODUCTION Percent of Total Boards 18% 1980 1985 Fastest growing board type Most difficult to test --------------- Less sophisticated microsystems, in contrast, have a built-in control program and little, if any, RAM. Technically speaking, these microsystems are based on microcontrollers, not microprocessors. Microcontrollers are typically found in products such as microwave ovens, VCRs and CD players. In this article, we will be focusing on microsystems based on true microprocessors, not microcontrollers, although the two share many of the same characteristics. How the circuitry differs There are certain elements that are common to all types of circuitry, such as the presence of some type of power supply (even if only a battery) and some type of human interface for control purposes, display purposes or both. Beyond these few elements of commonality, however, the three types of circuitry are characterized more by differences than by similarities. The key differences among the three types of circuits are outlined below. Analog circuitry: The primary characteristic of analog circuitry is that it provides an infinite number of values between 0 and the specified ceiling level of a signal. Consequently, analog circuitry uses control and display devices such as volume knobs and clock dials, which move in continuous increments rather than in discrete steps. The continuous nature of these control and display devices, however, makes analog signals highly susceptible to distortion. That is, even slight distortions in reading or controlling a signal's amplitude can result in distorted information, because the exact amplitude of the signal is significant in interpreting its value. Similarly, the polarity of an analog signal conveys significant information. Analog signals may be either static, as is the case with bias levels on an amplifier, or dynamic, as is the case with a local oscillator in a stereo system or a color-burst oscillator in a television. However, the dynamic signals always change in a repeatable manner, making them relatively easy to measure during troubleshooting. Figure 2 shows an example of a typical analog waveform. Digital circuitry: Unlike the continuously variable values found in analog circuitry, digital circuitry is based on discrete values. These values are developed using a binary numerical system in which a signal can have only one or two values-on or off (represented as 1 and 0). Figure 3 shows a typical digital waveform. In digital circuitry, a signal of +3.5Vdc or higher is typically considered to be on, and one of +0.7Vdc or lower is considered to be off. Because the voltage level indicates only whether the signal is on or off, as opposed to its exact value, small changes in voltage will not affect the accuracy of the information being conveyed by the signal. Similarly, the polarity of the signal is not significant in interpreting its meaning: It is simply there (on) or not there (off). As with analog circuitry, digital signals may be static or dynamic and those that are dynamic are generally repeatable. For example, the signal generated by pressing a key on a thermostat or microwave is dynamic in that it is there only when you press the key. But it is repeatable in that the same logic level is generated each time you press the key. Therefore, digital and analog signals are both relatively easy to measure with traditional test equipment. A final characteristic of digital circuitry is that it contains one or more digital logic devices. On the low end, these may be as simple as a few AND, and OR gates, as shown in Figure 4. On the high end, the circuit may include programmable logic devices (PLDs) or other application-specific ICs (ASICs). Digital circuits may also include analog to-digital converters to convert analog values, such as temperature, into digital representation. Microprocessor-based circuitry: Microprocessor-based circuits are significantly more complex than either analog or digital circuits. Like digital circuits, they are based on a binary numerical system, in which a signal is either on or off. However, they go beyond digital circuits in that the microprocessor is more than just an IC: It is a tiny computer. Under the control of a program, it can accept user-entered data and then make decisions and take actions based on that data. Figure 3. Digital information is coded in terms of values that assume one of two distinctly different values. Digital waveforms are, therefore, characterized by abrupt changes from one value to another, as shown here. Figure 4. Two of the basic building blocks of digital circuits are the AND gate and the OR gate. These circuit segments will be found in digital circuits from the simplest to the most complex. Because the operations performed by a microprocessor are determined by software instructions rather than being built into the circuitry, you can change the function of a circuit without rewiring it. All you need to do is switch to a different set of software instructions. These instructions may be stored in some form of programmable storage medium, such as a floppy or hard disk, or they may be built into the unit's ROM (in which case they are technically known as firmware). In the latter case, you would need to replace the existing ROM chip with a new one, but this is still much easier than designing and rewiring the entire circuit. Like analog and digital systems, microprocessor-based systems contain a power supply of some sort and a human interface of some sort. In addition to these elements shared with all circuitry, however, microprocessor-based systems contain several components that are unique to this type of circuitry alone.
These components include the microprocessor itself, ROM, RAM, an input/ output (I/O) interface, buffers, buses (signal lines) of various sorts, address decoders and a clock. Some microprocessor-based systems also include a DMA (direct memory access) controller. Each of these components is illustrated in Figure 5 and described in the sidebar. How troubleshooting equipment has evolved As electronics products have evolved from analog to digital to microprocessor-based systems, the equipment required to troubleshoot these products has gone through a corresponding evolution. The traditional multimeters and oscilloscopes are still useful, but they are no longer sufficient to do the job: The complexity of microprocessor based systems requires the use of newer, more sophisticated tools. For evidence of the difficulty of isolating faults on microprocessor-based boards using traditional test equipment, look at the repair statistics: Some 40% to 60% of the microprocessor-based boards sent back for repair are found to have no defects. Their operation simply couldn't be verified properly using traditional test equipment. In this section we'll take a look at the evolution of test instrumentation, explaining the benefits and limitations of five types of instruments: multimeters, oscilloscopes, logic analyzers, signature analyzers and emulative testers. Multimeters: Multimeters, capable of measuring voltage, current and resistance, traditionally have been one of the most useful tools for electronics troubleshooting. Although the original multimeters were analog devices, most service technicians today use digital multi meters, which are more rugged and more accurate than their analog counterparts. Multimeters work best for measuring static signals-those signals that don't change over time. However, there are few such signals in microprocessor based circuitry. Multimeters can be used for such purposes as determining whether the power supply is putting out the proper voltage or whether a particular bus is shorted to ground. But most microprocessor signals are dynamic, changing millions of times per second as data is moved on and off the bus. Because a multimeter has no way of measuring time, it can't be synchronized to the microprocessor clock. Therefore, it has limited usefulness in a microprocessor-based environment. Oscilloscopes: The oscilloscope-the other traditional tool of the service technician--is better than the multimeter for measuring dynamic signals because its trigger mechanism allows the technician to select a particular time window for measuring a signal. However, it works best for those dynamic signals that are repeated in a predictable manner, and microprocessor signals tend to be non repetitive. This characteristic, together with the high speed of microprocessor signals, makes them hard to capture on an oscilloscope. The result may be a jittery display, with multiple signals appearing superimposed on one another as in a double-exposed photograph. Using a high-frequency digital storage oscilloscope will alleviate this problem, but such instruments may be too expensive for a service operation to afford. Another drawback: Oscilloscopes can display measurements for only one or two bus lines at a time. In microprocessor-based systems, the timing relationships between events on different lines is important, so the usefulness of oscilloscopes for microsystem troubleshooting is limited. A third problem is that the oscilloscope's measurements may be difficult to interpret. To know what its findings mean, a technician needs a detailed knowledge of the circuitry of the unit under test. This fact alone makes the oscilloscope an impractical solution for shops that handle a variety of microprocessor-based boards. Logic analyzers: Logic analyzers are more sophisticated than oscilloscopes because they can display data streams for several lines at a time, allowing the technician to examine all data lines-or even all data and address lines-simultaneously. However, there are several drawbacks to using logic analyzers for microsystem troubleshooting. First, their high price may put them outside the reach of many service operations. Second, they take a long time to set up, making them expensive to operate. Finally, like oscilloscopes, they provide no help in interpreting the results, so the technician must have a detailed knowledge of the circuitry of the unit under test to understand what the measurements mean. All of these characteristics make the logic analyzer more useful in a design environment than in a service operation. Signature analyzers: Signature analyzers are used in conjunction with a special diagnostic program located in the board's ROM. The program stimulates the board, causing a data stream to appear at different points in the circuitry (nodes). The signature analyzer then interprets this data stream as output by particular ICs on the board, timing this interpretation to occur between a specified START and STOP signal. The interpretation step involves a special algorithm that translates the data stream into an abbreviated code, or signature. (Continued after sidebar.) ---------------- Components of microprocessor-based systems Microprocessor: The "brains" of a microprocessor-based circuit reside in the microprocessor itself. That is, everything that happens in the circuit is initiated by the microprocessor. Although the microprocessor is a tiny computer, it is really not that complicated a device. It can do only one thing at a time, and then only under the direction of the control program. And the operations it performs consist primarily of data reads, data writes and basic arithmetic operations. In other words, in response to instructions contained in the control program, the microprocessor orders data to be placed on the databus, reads it, performs arithmetic operations on it as required and writes (sends) the resulting data out to specific circuit elements over the same bus. Even the most complex program instructions can be reduced to these few simple operations. ROM: The ROM contains built-in instructions for the microprocessor. These instructions are specific to a particular type of microprocessor and are known as its instruction set. Of course, many types of microprocessor-based systems, such as personal computers, obtain additional instructions through software programs. But all microprocessor-based systems need ROM instructions to get them started when the system is first powered up to tell them what to do and where to find the data they need. Without these ROM instructions, they would be unable to load and read other software instructions. In effect, the ROM instructions allow the system to pull itself up by its bootstraps, which is why the process of turning a computer on is known as booting. RAM: RAM consists of one or more integrated circuit memories. It serves as a temporary storage area for data, holding it where it will be readily accessible when needed. There are two key differences between RAM and ROM: RAM can be written to and read from, whereas ROM can only be read; RAM serves only as a temporary data storage area, whereas ROM stores data permanently. This means that data can be moved in and out of RAM as needed. It also means that once the power is turned off, all the data in RAM is lost. In effect, RAM serves as scratch pad for the microprocessor, keeping data handy while it is needed and replacing it with new data when a new operation is begun. Input/output interface: The I/O interface allows the microprocessor "kernel" (consisting of the microprocessor itself, ROM, RAM, buses, address decoders and clock) to communicate with the system's input/output devices (keyboard, video display and printer). These I/O devices are also known as peripherals, because they lie outside the microprocessor kernel. Unlike the components of the microprocessor kernel, I/O devices are not always governed by the microprocessor clock. This is why the peripheral portions of a microprocessor-based system are often said to be asynchronous-their timing is not synchronized to the microprocessor clock. Buffers: The I/O section of the circuitry typically includes various buffers that serve as temporary holding points for data on its way to or from the kernel. For data going to the kernel (i.e., input), these buffers hold the data until the microprocessor is ready to read it. For data that the microprocessor is sending to a peripheral device (i.e., output), the buffers hold the data until the device is ready to receive it. Buses: Buses are communication paths: They conduct information from one place to another. A microprocessor-based system has three types of buses: Databus: The databus carries information to and from the microprocessor, connecting it with every part of the system that handles data: RAM, ROM, I/O devices and, if present, DMA controller and mass storage (floppy or hard disk). The number of databus lines in a system is equal to the number of bits its microprocessor can handle at a time, because each bit requires its own line. Thus, an 8-bit microprocessor needs eight databus lines; a 16-bit microprocessor needs 16. Address bus: The address bus carries information about where a particular piece of data is to be found or sent. Each device in the system (ROM, RAM, I/O, etc.) has a specific range of addresses unique to that device. The data and address buses work together to respond to the microprocessor's read and write requests-one specifying the data origin (or destination), the other providing a path on which the data can travel. Control and status bus: The microprocessor is also connected to the other kernel devices with control and status lines. These lines allow the microprocessor to specify whether it wants to read data from a particular device or write data to it. They also provide a means for the device to notify the microprocessor when it has data for it. Thus, when the RAM chip, for example, sees that READ is enabled on the control/status line, it takes the data that is stored at the address currently on the address bus, places it on the databus and notifies the microprocessor that the data it wants is on the bus. When the RAM chip sees that WRITE is enabled, in contrast, it copies the data pattern that is on the databus and stores it at the address specified on the address bus. Both the databus and the address bus typically have buffers located at the outer boundary of the kernel. These isolate the buses from other circuits on the board, protecting them from effects such as noise or loading. Address decoders: Address decoders on the address bus notify each device (RAM, ROM, etc.) when the address placed on the bus by the microprocessor is within the address range of that particular device. This notification is performed by turning the device's chip select (CS) pin on or off. Because a device can respond to a microprocessor request only when its CS pin is on, this approach prevents the wrong device from responding. Clock: The rate at which the microprocessor executes instructions is determined by the system clock, which sends pulses to the microprocessor millions of times per second. (In a system running at 8MHz, for example, the clock is emitting 8 million pulses per second.) All data movement within the kernel is synchronized to these pulses. A key function of the clock is to make sure that data placed on the bus has time to stabilize before a read or write operation takes place. That is, the clock's pulses define the valid "window" or time period for data reads and writes. DMA controller: Some microprocessor based systems also have a device known as a DMA (direct memory access) controller, which can move data to and from memory without going through the microprocessor. As a device whose sole function is to perform data transfers, the DMA controller can move more data in less time than the microprocessor, which also has internal operations to perform. Consequently, it is typically used for data transfers involving high-speed devices, such as hard disks. Like the other devices in the system, the DMA controller operates only in response to instructions from the microprocessor. However, to perform its work, it needs to "borrow" the data, address and control lines from the microprocessor. The process by which this is done is know as cycle stealing. For one or more clock pulses (cycles), the DMA chip takes over the data buses and the microprocessor restricts itself to internal work (such as performing arithmetic operations on the data already in its registers). Because the microprocessor won't let go of the buses for more than a few cycles at a time, however, the DMA controller and microprocessor may pass control of the buses back and forth several times before the DMA controller completes a task. ---------------------- In a properly functioning micro-system, a given node will always produce the same signature in response to the same stimulus when measured within a particular time window. Therefore, by comparing the actual signature of a node with the correct signature for that node, the technician can determine whether the output at a particular node is good or bad. Once a node is found to have a faulty signature, the technician traces back through the circuitry from that point looking for a device that has bad output but good input (one where the signature of the preceding device was correct). This device is likely to be the source of the fault. Signature analysis is well-suited to troubleshooting microprocessor-based systems: It is fast, it allows the measurement to be timed to particular events, and it simplifies interpretation of the results. The technician does not need detailed knowledge of a specific board's circuitry. Whether a node is good or faulty can be determined by simply comparing its signature to that of the same node on a known-good board. However, signature analysis does have its limitations. First, it can be used only on boards that were designed specifically for this technique-boards for which the manufacturer has included a special diagnostics program in the unit's ROM and specified the required START and STOP signals. Also, the manufacturer must provide the correct signature for each node, or the technician must collect these signatures from a known good board. Finally, because actual signature of a node is created by an algorithm specific to the signature analyzer, the technician's signature analyzer must be compatible with the one used by the manufacturer or the signature won't match. Emulative testers: One of the most effective instruments for troubleshooting microprocessor-based systems is the emulative tester, because this type of instrument tests the board from the inside out. The tester copies, or emulates, the functions of one of the kernel devices that is capable of reading and writing data to other devices on the board. By sending out a known stimulus to each device and measuring its response, the emulative tester is able to verify that each device in the kernel is operating properly. There are three types of emulative testers: microprocessor emulators, ROM emulators and the recently introduced DMA emulators. All three types are quick and easy to set up, because they connect to the board at a single point. All are well-suited to measuring the dynamic, nonrepetitive signals that characterize microprocessor-based circuitry, because they are capable of synchronizing their measurements to the cycle of the microprocessor clock. (Some also include a logic probe that can be synchronized to events other than the microprocessor clock, allowing them to be used to measure events that occur more intermittently.) Finally, all three are easy to use because they perform many of their tests automatically. Also, emulative testers provide the technician with an interpretation of the test results, making them ideal for those who do not have a detailed knowledge of a specific board's circuitry. Microprocessor emulators: Microprocessor emulators either clip over the microprocessor or plug into its socket. Like the microprocessor itself, microprocessor emulators can read and write data to any addressable device or memory location, allowing the technician to thoroughly exercise every node on the board. Because they replace the board's microprocessor with their own, they are effective even when one or more of the kernel components is completely dead. Because each type of microprocessor has its own characteristics, a microprocessor emulator needs some way of being tailored to the characteristics of the particular microprocessor it is emulating. This is achieved through special hardware modules, called pods, which contain microprocessor-specific information. ROM emulators: ROM emulators plug into the ROM socket, taking control of the board by replacing the ROM control program with diagnostic software that exercises all parts of the board. They are more limited than microprocessor emulators because they can only be used on boards that have a properly functioning microprocessor and ROM address decoder as well as no stuck or shorted bus lines. They are also limited to testing systems that have a removable control program-that is, systems where the control program is located in a separate and unsoldered ROM rather than in the processor itself. Because of this limitation, they can be used only to troubleshoot true microprocessor-based systems as opposed to systems that are based on microcontrollers. ROM emulators have the advantage of not requiring a specific hardware interface unit for each type of microprocessor, because they use the board's own microprocessor to perform the data reads and writes. They do, however, require a software interface for each type of microprocessor to be able to communicate with it during data reads and writes. DMA emulators: DMA emulators clip over the board's microprocessor. Like the DMA controller they emulate, these test instruments steal cycles from the microprocessor and use them to read and write to memory directly. DMA emulators are similar to microprocessor emulators in that they do not require the kernel to be fault-free in order to conduct full sets of tests. They are unlike both microprocessor and ROM emulators, however, in that they do not take complete control of the unit under test. Instead, they take their measurements while the board is operating in its normal environment. This approach makes them useful for testing boards that exhibit problems when running their own control software. These emulators are also ideal for testing boards with solder-in components because they do not require removal of either the microprocessor or the ROM chip. As the preceding discussion has shown, microprocessor-based systems are much more complex than traditional analog, or even digital, circuitry. Therefore, attempting to troubleshoot such systems using only the traditional tools of the service technician, such as multimeters and oscilloscopes, is time-consuming and difficult. This type of troubleshooting also requires a detailed knowledge of the circuitry of the unit under test, because traditional instruments provide no assistance with interpreting the results of the measurements they take. Part two of this series will take a closer look at how this new type of equipment works, explaining the general approach for troubleshooting microprocessor-based systems and walking the reader through a specific troubleshooting example. Also see: Break-out boxes: Active vs. passive |
PREV. | | NEXT | Guide Index | HOME |