LLP "Tornado Modular Systems",
Russia, Novosibirsk, 1995
- Selection process
- Criterias of choice
- System requirements
- The main features of the microcontroller
- Microcontroller features
- Microcontroller command set
- Microcontroller Interrupts
- Characteristics of your company
- Characteristics of the supplier
- Manufacturer Characteristics
- Manufacturer support
- Literary support
- Finishing choice
- Team work
Perhaps it is the choice of the microcontroller that is one of the most important decisions on which the success or failure of the planned project depends. When choosing a microcontroller, it is necessary to take into account and evaluate a large number of factors. The basis for the sequence of thoughtful actions leading to a final decision can be considered the plan considered in this article. By combining their own knowledge and requirements with the information presented in this article, the reader must evaluate everything as a whole in order to make the right decision.
The main goal is to choose the least expensive microcontroller (to reduce the overall cost of the system), but at the same time satisfying the system specifications, i.e. performance requirements, reliability, application conditions, etc. The total cost of the system includes everything: engineering research and development, manufacturing (components and labor), warranty repair, further improvement, maintenance, compatibility, ease of handling, etc.
Starting the choice, the developer must first ask the question: "What should the microcontroller do in my system?" The answer to this simple question determines the characteristics of the microcontroller required for the system being developed and, thus, is the determining factor in the selection process.
The second step is to search for microcontrollers that meet all system requirements. It usually includes the selection of literature, technical descriptions and technical journals, as well as consultations. At present, information has become quite accessible on the proposed microcontrollers, both traditional, industry standard microcontrollers, and the latest microcontrollers. It’s good if the system requirements are met by a well-known microcontroller, otherwise a secondary search should be conducted to find the microcontroller that most fully meets the requirements, has a minimum of external components and is suitable for cost and size. It is clear that a single-chip microcontroller is preferable because of the price and reliability.
The last stage of selection consists of several stages, the purpose of which is to narrow the list of acceptable microcontrollers to one. These steps include the analysis of price, availability, development tools, manufacturer support, production stability of specific microcontrollers, and the presence of other manufacturers or suppliers. To come to the optimal solution, you may have to repeat the whole process several times.
CRITERIAS OF CHOICE
The main selection criteria for the microcontroller are presented below in order of importance. Each criterion is explained in detail later.
- Suitability for the application system. Can it be made on a single-chip microcontroller or can it be implemented on the basis of any specialized chip?
- Does the microcontroller have the required number of pins / I / O ports, since in case of their lack, he will not be able to do the work, and in case of excess the price will be too high?
- Does it have all the required peripherals, such as serial I / O, RAM, ROM, A / D, D / A, etc.?
- Does it have other peripherals that are not needed in the system?
- Does the processor core provide the necessary performance, i.e. computing power that allows you to process system requests for the entire life of the system in the selected application language? Too much wasteful, too little will not work.
- Is there enough funds in the project budget to afford to use this microcontroller? To answer this question, supplier fees are usually required. If this microcontroller is not acceptable for a project, all other questions become irrelevant, and you should start looking for another microcontroller.
- Is there a device in sufficient quantities?
- Is it produced now?
- What is expected in the future?
- Developer support.
- Debugging Tools
- Evaluation Module (EVM).
- In-circuit emulators.
- Nozzles for logic analyzers.
- Debug monitors.
- Debuggers programs in source code.
- Information support
- Examples of application.
- Error messages
- Utilities, including "free" assemblers.
- Source code examples.
- Supplier support.
- Is there a dedicated group that only supports application support?
- Are there any engineers, technicians or vendors?
- How qualified are the support staff, is he really interested in helping you solve your problem?
- Is there telephone and / or FAX communication?
- Reliability of the manufacturer.
- Competence, confirmed by development.
- Production reliability, i.e. product quality.
- Hours in this area.
Conducting a system analysis of your project will determine the requirements for the microcontroller. What peripherals are required? Are bit operations or numeric only? How much manipulation is required to process the data? Should the system be controlled by interrupt, by readiness or by human commands? How many devices (I / O bits) need to be controlled? Which devices from among the many possible types of I / O devices should be controlled are controlled: terminals, switches, relays, keys, sensors (temperature, light, voltage, etc.), sound devices, visual indicators (LCD displays, LEDs), analog-digital ( A / D), digital to analog (D / A) converters? Is one or more supply voltages required for the system? How resilient power supply? Will the device work at the voltage of your power supply? Should the voltages be kept in a narrow fixed range of changes, or can the system work with high volatility? What is the working current? Does the product have to work from the network or from batteries? If on batteries, should rechargeable batteries be used and if so, what is the operating time without recharging, and how long does it take? Are there any restrictions on size, weight, aesthetic parameters, such as shape and / or color? Are there any specific requirements for environmental conditions, such as military conditions, temperature, humidity, atmosphere (explosive, corrosive, etc.), pressure / altitude? Should user software be based on disks or ROM? Does the product work in real time, and if so, are you going to create or purchase a core of real-time programs, or perhaps a fairly widely used version will be used? Is there enough staff and time to develop your own core of programs? How will copyright and software be paid? To solve real-time problems, a lot of research work is required to meet their special requirements.
THE MAIN FEATURES OF THE MICROCONTROLLER
Microcontrollers as a whole can be divided into groups of 8, 16, and 32-bit arithmetic and index registers by the size, although some developers believe that the 8/16/32-bit architecture determines the bus width. Is a cheap microcontroller able to meet the requirements of the system or is an expensive 16 or 32-bit required? Can an 8-bit software emulation of a 16/32-bit microcontroller allow for the use of a cheap 8-bit by sacrificing executable code and speed? For example, can an 8-bit microcontroller be used with a software macro to emulate a 16-bit battery and index operations? The choice of an application language (high level instead of assembler) can greatly affect the performance of the system, which can then dictate the choice of 8/16/32 bit architecture, but the price limit may override this choice.
The clock frequency or, more precisely, the bus speed determines how many calculations can be performed per unit of time. Some microcontrollers, mostly of early development, have a narrow range of permissible clock frequency, while others can work up to zero frequency. Sometimes a specific clock frequency is chosen to generate another clock frequency required by the system, for example, to set the serial rates. Basically, the computational power, power consumption and cost of the system increase with increasing clock frequency. The cost of the system increases with increasing frequency due to the cost of not only the microcontroller, but also all the additional chips required, such as RAM, ROM, PLD and bus controllers.
Consider the technology with which the microprocessor was manufactured: N channel metal semiconductor (NMOS), which was used in early-stage microcontrollers, comparable to modern CMOS technology with a high level of integration (HCMOS). Unlike early NMOS processors, in HCMOS the signal levels vary from 0 to the supply voltage level. In connection with this circumstance, preference is given to HCMOS processors. In addition, HCMOS consume less power and, therefore, less heat. The geometrical dimensions of the elements in HCMOS are smaller, which makes it possible to have more dense schemes and, thus, work at higher speeds. A denser design also reduces the cost of an individual microcontroller, since on a silicon wafer of the same size, more chips can be obtained. For these reasons, today the vast majority of microcontrollers are manufactured using HCMOS technology.
OPPORTUNITIES OF THE MICROCONTROLLER
By achieving a higher level of integration and reliability while maintaining a low price, all microcontrollers are equipped with built-in additional devices. These devices under the control of the microprocessor core of the microcontroller perform certain functions. Built-in devices have increased reliability, since they do not require any external electrical circuits. The most well-known embedded devices include memory devices and input / output (I / O) ports, timers, and a system clock / generator. Memory devices include random access memory (RAM), read-only memory (ROM), reprogrammable ROM (EPROM), electrically reprogrammable ROM (EEPROM). Timers include both real time clock and interrupt timers. The range and resolution of the timer should be taken into account, as well as other subfunctions, such as the comparison and / or capture functions of the input lines when measuring the signal duration. I / O facilities include serial communication ports, parallel ports (I / O lines), analog-to-digital converters (A / D), digital-to-analog converters (D / A), liquid crystal display (LCD) drivers, or vacuum fluorescent display (VFD) drivers.
Other, less commonly used, built-in resources are an internal / external bus, a watchdog watchdog for the normal operation of the system, a clock generator failure detection system, a choice of memory configuration, and a system integration module (SIM). SIM usually replaces the external “gluing” logic that is necessary for organizing the interaction of the microcontroller with external devices through the specified contacts of the chip.
In most microcontrollers with in-circuit resources, a block of configuration registers is included to control these resources. Sometimes this block itself can be reflected in different places of the memory card. Sometimes there is a user and / or factory test register indicating the value the manufacturer attaches to quality. The presence of configuration registers leads to the problem of accidentally changing the desired configuration with a "roaming" code. To prevent such an accidental possibility, a “blocking” mechanism is used, i.e. Before the configuration register can be changed, the bits in the other register must be changed in a certain sequence. Although configuration registers may be frightening at first, they are extremely valuable because they provide high configuration flexibility at low cost, so that a variety of applications can be found for one microcontroller.
SET OF COMMANDS MICROCONTROLLER
It is necessary to carefully study the set of commands and registers of each microcontroller, since they play a crucial role in determining the capabilities of the system as a whole. Have your programmers studied the indexed addressing modes for the intended needs of your system? Are there any special commands that will be used on your system, such as multiplication, division, and table interpolation? Are there any power saving modes to save battery power, such as stop, stop, low power consumption and / or standby? Are there any bit manipulation commands (setting a bit, clearing a bit, testing a bit, changing a bit, moving commands on a set / cleared bit) to make it easier to use a microcontroller, or to manipulate bit fields?
Be careful with great teams that perform many actions on the same team. The real performance criterion is the number of clock cycles required to complete the task, not the number of commands executed. For a fair comparison, it is better to encode the same program and compare the total number of clock cycles performed and the bytes used. Are there any unimplemented instructions in the operational codes map and what happens if they happen to be executed by chance? Will the system handle such a situation correctly by the handler of "exceptional" events or will it lead to system failure?
Interrupt pattern checking is always needed when a real-time system is created. How many lines or interrupt levels are there and how many are required for your system? Is there a mask for interrupt levels? When the interrupt level is confirmed, are there individual vectors for the interrupt handler program, or should all possible interrupt sources be queried to determine the source? In speed-critical applications, such as printer control, the criterion for selecting an appropriate microcontroller can be the response time to an interrupt, i.e. the time from the start of the interrupt (in the worst case, phased relative to the microcontroller's clock generator) to the execution of the first command of the corresponding interrupt handler.
CHARACTERISTICS OF YOUR COMPANY
Critically analyze the property status of your company. Does your company have sufficient funds to train personnel in the subtleties of manufacturing systems based on microcontrollers and using the means to develop them? Does your company already have sufficient development tools, or will you buy or rent them? If you are considering a new microcontroller, are there any available development tools, such as high-level language compilers, assemblers / linkers, prototype modules, and debuggers / emulators? Are your existing development tools for new microcontrollers easily expanding? Do I need to hire and train additional staff for this project? Can you get an expert to train the rest of your team? Does the budget allow you to hire additional permanent staff and / or contract workers? Is your company satisfied with the microcontrollers currently on the market, as well as the service?
The third step in reducing the list of technically acceptable microcontrollers is checking the manufacturers and suppliers of microcontrollers, i.e. companies with which you are planning to enter into long-term relationships on a mutually beneficial basis. A supplier may be a manufacturer of microcontrollers, or it may be a dealer who is an authorized representative of several manufacturers. Your supplier will best meet your needs with a wider range of products and a reputation for high quality, reliability, service and timely delivery at a fair price. In addition, the more products you buy from one supplier, the more benefits you will get in terms of price, services and support. Always keep in mind that although the dollar amount of your purchase may seem high to you, it is always a relative value to the total sales of the supplier. Suppliers that supply not only microcontrollers, but also memory (RAM, ROM), discrete devices (transistors, diodes, etc.), standard digital logic devices (7400, 74HC00, etc.), special chips, custom devices (CSIC), Specialized Chips (ASIC) and Programmable Logic Devices (PLD), can better meet your growing needs. Does the manufacturer and / or supplier have any awards for quality, reliability, service and / or delivery? Do not trust too much self-awarded rewards.
DESCRIPTION OF THE MANUFACTURER
Other criteria in the choice of the manufacturer / supplier of the microcontroller are stability, its monopoly position, information from the literature and support. Stability can be reliably verified by establishing the manufacturer's experience in this area and its achievements. Your company's supply department and credit department can help you with these issues. The monopolistic position of the supplier, unfortunately, is usually the norm, since Most manufacturers of microcontrollers rarely intersect in production with other manufacturers. If the manufacturer has good performance in supply, delivery and price, then its monopoly position should not be an obstacle.
SUPPORT FOR THE MANUFACTURER
Direct manufacturer support includes marketing / sales and application engineering support. When you call for help, can you directly contact someone you need, or do you have to play a “deaf phone”? Are calls transferred immediately? Is there a fax number? How many telephone lines are available? Are telephone lines always busy? Do they have a switching system or a secretary forwards your messages to the support person? What time does the support staff work? Do they have other responsibilities than support? What is the number of staff? Will the factory staff, namely, specialists in finished products, production, quality, electronics engineers, programmers, help him with readiness? Are factory engineers friendly with staff support? Does the support staff know, have the necessary skills, and do they fulfill in a timely manner what they promised, for example, to solve your problem or send you something? Does it come by regular mail, do you pay for fast delivery? Does the manufacturer have a bulletin board (BBS) or a page on the Internet where you can get information such as application programs, product news, fresh programs, source code, error messages, email, conferences? What are supported transfer rates? How many phone lines are available? What are the opening hours? Do you need a special brand of computer and / or modem to access? Is there a system operator (sysop)?
The literature covers a wide range of printed materials that can help you make the right choice. It includes the manufacturer’s editions, such as technical descriptions and application guidelines, as well as publications available at the local bookstore and / or library. Publications from the local store and / or library not only indicate the popularity of the manufacturer / microcontroller, but also offer impartial opinions if they are expressed by authors independent of the manufacturer.
For the final step in the selection process, build a table containing the microcontrollers in question in one column, and their important characteristics in another. Then attach the manufacturer datasheets to get a fair visual comparison. Some manufacturers have previously made comparative descriptions of their microcontrollers that will simplify your task, but check with the technical descriptions if all the latest products are presented. Among the possible characteristics of the price (on the expected volume of production, including the prediction of future prices, ie, will the price decrease if you join production?), RAM, ROM, EPROM, EEPROM, timer (s), A / D, D / A, serial ports, parallel ports, bus speed (minimum / maximum), special commands (multiply, divide, etc.), number of interrupts available, interrupt response time (time from the start of the interrupt to the execution of the first command controlled by the interrupt), case size / type (ceramic DIP or LCC, plastic 0.3 "DIP or 0.6" DIP, compressed DIP (distance yanie contacts between .071 "), PLCC, PQFP, EIAJQFP, SOIC; some of them use surface mount technology), power requirements, and other details that are important for your system devices.
If, after all this, you still have more than one microcontroller in the list, consider the possibilities of expanding the system and the cost. What extensions, in your opinion, may be needed in future versions of this product? Finally, consider the price because If two microcontrollers cost the same, but one offers a bit more options that are not required today, but would make future extensions available without additional costs, choose this microcontroller.
As a project leader, you can do all the research work alone, or you can start engaging your team by assigning research tasks to its members, such as evaluating the set of commands of each microcontroller under consideration by programmers. Involving your team in the selection process in the early stages will not only create team spirit, but also receive individual commitments to the project through active participation in it. This approach undoubtedly leads to some conflicts, since Everyone has their own opinion, but your task as a project leader is to mediate. After listening to all opinions, you still choose. As in political elections, as soon as the winner appears in the primary elections, all party members are ready for the full support of the leader, so the project team must support the leader’s decisions to achieve success in project implementation.
The final choice of a suitable microcontroller for your project is not an easy decision. Microcontrollers have become more complex devices since in-circuit resources were added. And since the process moves in the direction of an increasingly in-circuit integration of external resources to reduce the cost of the system, the solution has become increasingly complex. This article does not impose any choice on the developer; its purpose is to indicate all possible selection criteria that should be taken into account in the decision-making process.