Файл: Embedded Controller Hardware Design (Ken Arnold, 2001).pdf
ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 13.06.2025
Просмотров: 2653
Скачиваний: 0
202EMBEDDED CONTROLLER
Hardware Design
Active tools include:
•In-circuit emulators (ICE) for HW/SW integration are plugged into the application circuit (the “target” system) in place of the CPU, allowing the designer to “see inside” the microcontroller, download, and execute programs selectively.
•ROM emulators (ROM ICE) allow the designer to reduce the time it takes to edit-compile-load-debug programs by replacing the program EPROM with a RAM that can be loaded quickly and easily from the host computer.
Instrumentation Issues
One of the most significant, but often ignored, problems designers must address is the proper selection and use of test instrumentation. Improper selection and application of these tools are frequently the source of much wasted time and confusion for the designer. Two common usage problems relate to the use of oscilloscope and logic analyzer probes.
A typical scope or logic analyzer is supplied with probes that might not be expected to have an effect on the observed signal or distort the data gathered. With input impedances in the megohm range and parasitic capacitances of tens of picofarads, it might seem that the test equipment would have little or no effect on the measurement, but this is definitely not the case.
There are two common causes for measurement problems: excessive ground lead inductance, and excessive capacitive loading. These things cause at the least a potential for erroneous measurements, or at worst, they can cause the circuit under test to behave differently. Two things can be done to mitigate these problems:
1)Use the shortest possible test leads, especially for the ground connection on fast logic.
2)Use high impedance probes, especially designed for high speed applications, such as high-speed FET input scope probes.
Other instrumentation problems can be caused by misinterpretation of the sampling effects in digital scopes, the lack of glitch detection in logic analyzers, and other obscure but potentially painful “learning experiences.” These can
203CHAPTER TEN
Other Useful Stuff
only be avoided with a good understanding of the operation of the equipment in use and some practical experience.
Software Development Tools
Most of the software development tools available to the embedded system designer fall into one of the three categories: language translator, debugger, and utility programs that generally run on the host computer. Most of the available tools have been designed to run on the x86 architecture PC, and many are available as freeware, shareware, or low cost commercial products for the more common target processor architecture.
Translators:
Assembler
Compiler
Linker
Interpreter
Debugging:
Software/firmware monitors
Processor In-Circuit Emulator (ICE)
ROM ICE
Utility:
PROM Programming
Performance measurement
Execution frequency histograms
Other Specialized Design Considerations
There are several other characteristics that the embedded system designer should become at least somewhat familiar with. These include the thermal characteristics of a system and the concept of thermal resistance, power dissipation, and the effects on device temperature and reliability. Another issue of importance in portable, hand held, and remotely located systems is the application of battery power storage.
204EMBEDDED CONTROLLER
Hardware Design
Thermal Analysis and Design
The temperature of a semiconductor device, such as a voltage regulator or even a CPU chip, is a critical system operating parameter. The reliability of these devices is also closely related to temperature, so much so because the device’s reliability drops exponentially with increasing temperature. Fortu nately, calculating the operating temperature of a device is not too difficult, as there is a simple electrical circuit analogy that is most often used to compute temperature of a device. The temperature is analogous to voltage, the power dissipated is equivalent to current, and the thermal resistance is equivalent to electrical resistance. In other words:
Temperature rise (°C) = power (watts) * thermal resistance (°C/watt)
The thermal resistance of multiple mechanical components stacked one upon the other add, just as series resistors are equivalent to a single resistor equal to the sum of the individual values.
For example: Given a 5 volt linear voltage regulator with a 9 volt input providing 1 ampere of load current, the regulator will dissipate:
P = V*I = (9–5 volts) *1 amp or 4 watts of power.
If the regulator is specified with a thermal resistance between the semicon ductor junction and case of 1°C/watt (signified as Θjc), and the heat sink the regulator is mounted to has a thermal resistance from the regulator mounting surface to still ambient air of 10°C/watt (signified as Θca), then the total ther mal resistance between the semiconductor junction and ambient air is:
Θja = Θjc + Θca = 1 + 10 = 11 °C/watt
The temperature rise of the junction above that of the air surrounding the regulator will then be given by:
T = P * Θja = 4 watts * 11 °C/watt = 44 °C above ambient.
If the regulator was specified to operate at a maximum junction temperature of 85°C, then the device should not be operated in ambient air of temperature higher than 85 – 44 = 41 °C, or the regulator will fail prematurely. If this is not acceptable, then the designer must reduce the input voltage to reduce the power dissipated, reduce the thermal resistance by forced air flow, or change the design to another type (e.g. a switch mode regulator) so as to keep the regulator junction within operating constraints.
205CHAPTER TEN
Other Useful Stuff
Battery Powered System Design Considerations
The rapid increase in the use of portable, battery operated electronic devices has spurred the development of new battery technologies for these applica tions. The older single-use and rechargeable battery chemistries have been supplanted by newer ones, providing improved power densities, operating life, and other enhancements. Unfortunately, these new energy storage devices come with new and different characteristics and limitations when compared to the older energy storage devices.
Batteries are generally divided into two common groups: primary (one time discharge and discard), and secondary (rechargeable) batteries. Primary memo ries include the non-rechargeable alkaline and lithium cells sold commercially, and secondary cells include the older lead-acid and nickel-cadmium (NiCd) chemistries, as well as the newer nickel metal hydride (NiMH) and rechargeable alkaline and lithium ion chemistry products. There is also a wide range of special purpose batteries that are optimized for some specific characteristic, such as the zinc-air primary cell, which uses atmospheric air as an “electrode” to provide very high energy density at low operating current.
Primary batteries, such as alkalines and lithium coin cells, are relatively simple to use, but are often limited to one to three years of operation. This is primarily due to the shelf life limit imposed by internal leakage current that discharges the battery slowly over time, especially at high temperatures.
The secondary, rechargeable battery types each have slightly differing chargedischarge requirements and limitations which must be considered for effective application in a battery powered system. There are special algorithms to opti mize the performance and service life of the batteries, and there are even chips which are design specifically to manage the charge and discharge of common secondary battery types.
Many embedded devices must be designed to operate for long periods of time with very little power obtained from solar cells, batteries, and other limited power sources. As a result, there are CMOS processors and memories which have been designed with very low power consumption operating modes, frequently referred to as “sleep,” “power down” or “idle” modes that consume current in the A range.
206EMBEDDED CONTROLLER
Hardware Design
Processor Performance Metrics
In an effort to compare different types of computers, manufacturers have come up with a host of metrics to quantify processor performance. These metrics include:
The successful application of these devices in an embedded system usually hinges on the following characteristics:
•IPS (instructions per second)
•OPS (operations per second)
•FLOPS (floating point OPS)
•Benchmarks (standardized and proprietary “sample programs”) that are short samples indicative of processor performance in small application programs
IPS
IPS, or the more common forms, MIPS (millions of IPS) and BIPS (billions of IPS) are commonly thrown about, but are essentially worthless marketing hype because they only describe the rate at which the fastest instruction executes on a machine. Often that instruction is the NOP instruction, so 500 MIPS may mean that the processor can do nothing 500 million times per second!
OPS
In response to the weakness in the IPS measurement, OPS (as well as MOPS and BOPS, which sound fun at least) are instruction execution times based on a mix of different instructions. The intent is to use a standard execution frequency weighted instruction mix that more accurately represents the “nominal” instruc tion execution time. FLOPS (megaFLOPS, gigaFLOPS, etc.) are similar, except that they weight floating-point instructions heavily to represent heavy compu tational applications, such as continuous simulations and finite element analysis. The problem with the OPS metric is that the resulting number is heavily dependent upon the instruction mix that is used to compute it, which may not accurately represent the intended application instruction execution frequency.
207CHAPTER TEN
Other Useful Stuff
Benchmarks
Benchmarks are short, self-contained programs which perform a critical part of an application—such as a sorting algorithm—that are used to compare functionally equivalent code on different machine. The programs are run for some number of iterations, and the time is measured and compared with that of other CPUs. The weakness here is that the benchmark is not only a measure of the processor, but also of the programmer and the tools used to implement the program. As a result, the best benchmark is the one you write yourself, since it allows you to discover how efficiently the code you write will execute on a given processor with the tools available. That’s as close to the real appli cation performance as you’re likely to get, short of fully implementing the application on each processor under evaluation.
Device Selection Process
In selecting a device from a field of several devices, there is more to be consid ered than just the speed of the processor. Some factors, such as the availability of secondary suppliers may be an absolute requirement in some applications. In order to make a systematic evaluation and selection of the best alternative, the following method has proved to be valuable, particularly when the selec tion process must be documented and justified. The process consists of three major steps: eliminating the alternatives that are completely inappropriate, ranking the remaining options, and evaluating the adverse consequences of a catastrophic event.
The three decision matrices are:
1)Pass/fail criteria for elimination of non-conforming alternative.
2)Weighted scoring of parametric values to rank options.
3)Consideration of adverse consequences, including their probability and severity
The first matrix consists of a table with all the options on one axis and all the “must have” criteria on the other axis. Each criterion is checked off for each option. The second matrix consists of the surviving options from the first matrix on one axis of a table, and a list of quantitative measures on the other
208EMBEDDED CONTROLLER
Hardware Design
axis, along with a weighting factor for each measure, indicating its relative importance. Each option receives a weighted score allowing them to be ranked. Finally, each of the top ranking options is evaluated with respect to probability of occurrence. For instance, a dual source part that both manufacturers produce in the Silicon Valley could become totally unavailable from either source in the event of a major earthquake in that region. In that case, even though the prob ability of occurrence is very low, the consequences are very severe; production could be interrupted for a very long time from both sources simultaneously, causing the product they’re designed into to stop shipping for an indefinite period of time.