This page has been robot translated, sorry for typos if any. Original content here.

Microcontroller selection

Transfer
Tornado Modular Systems LLP,
Russia, Novosibirsk, 1995

INTRODUCTION

Perhaps, it is the choice of the microcontroller that is one of the most important decisions on which the success or failure of a planned project depends. When choosing a microcontroller, it is necessary to consider and evaluate a large number of factors. The plan considered in this article can be taken as the basis for the sequence of thoughtful actions leading to a final decision. By combining his 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.

PURPOSE

The main goal is to choose the least expensive microcontroller (to reduce the total cost of the system), but at the same time satisfying the specifications of the system, i.e. performance requirements, reliability, application conditions, etc. The total cost of the system includes everything: engineering research and development, production (components and labor), warranty repair, further improvement, maintenance, compatibility, ease of use, etc.

SELECTION PROCESS

Getting to 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 the search for microcontrollers that satisfy all system requirements. It usually includes a selection of literature, technical descriptions and technical journals, as well as consultations. Nowadays, information on the proposed both traditional, industry standard microcontrollers and the latest microcontrollers has become quite accessible. Well, if the well-known microcontroller will satisfy the system requirements, otherwise a secondary search should be carried out to find the microcontroller that most fully meets the requirements, has a minimum of external mounted components and is suitable in terms of cost and dimensions. Clearly, a single-chip microcontroller is preferable because of price and reliability.
The last stage of the selection consists of several stages, the purpose of which is to narrow the list of acceptable microcontrollers to one. These steps include analysis of price, availability, development tools, manufacturer support, production stability of specific microcontrollers, and the availability of other manufacturers or suppliers. In order to arrive at an optimal solution, you may have to repeat the whole process several times.

CRITERIAS OF CHOICE

The main criteria for selecting a microcontroller are presented below in order of importance. Each criterion is explained in detail later.

  • Suitability for application system. Can it be made on a single-chip microcontroller or can it be implemented on the basis of any specialized microcircuit?
    • Does the microcontroller have the required number of contacts / input / output ports, as if there is a shortage, he will not be able to do the work, and if there is an excess, will the price be too high?
    • Does it have all the required peripherals, such as serial I / O ports, 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. processing power that allows you to process system requests throughout the life of the system in the selected application language? Too much wasteful, too little will not work.
    • Have enough funds been allocated in the project budget to allow yourself to use this microcontroller. To answer this question, supplier rates are usually required. If this microcontroller is not acceptable for the project, all other questions become irrelevant, and you should start looking for another microcontroller.
  • Availability.
    • Is the device in sufficient quantities?
    • Is it being produced now?
    • What is expected in the future?
  • Developer Support
    • Assemblers.
    • Compilers
    • Debugging tools.
      • Evaluation Module (EVM).
      • In-circuit emulators.
      • Nozzles for logic analyzers.
      • Debug monitors.
      • Program debuggers in source code.
  • Information support
    • Application examples.
    • Error messages.
    • Utilities, including "free" assemblers.
    • Source code examples.
  • Supplier Application Support.
    • Is there a special group that deals only with application support?
    • Are there any engineers, technicians or sellers?
    • How qualified is the support staff, is it really interested in helping you solve your problem?
    • Is there a telephone and / or FAX connection?
  • Reliability of the manufacturer.
    • Development-proven competency.
    • Production reliability, i.e. product quality.
    • Work time in this area.

SYSTEM REQUIREMENTS

Carrying out a system analysis of your project will also determine the requirements for the microcontroller. What peripherals are required? Are bit operations applied or only numerical? How much manipulation is required to process the data? Should the system be controlled by interruptions, by availability, 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: 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 fault tolerant is the power supply? Will the device work with your mains voltage? Should the voltages be held in a narrow fixed range of changes, or can the system work with great instability? What is the working current? Should the product be powered by mains or battery? If from batteries, should rechargeable batteries be used, and if so, what is the operating time without recharging, and what is the time it takes? Are there 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 / height? Should user software be disk or ROM based? The product works in real time, and if so, are you going to create or purchase a kernel of real-time programs, or, perhaps, the usual widely used version will be enough? Is there enough staff and time to develop your own core program? How will copyright and software be paid? Solving real-time problems requires a lot of research to satisfy their special requirements.

KEY FEATURES OF THE MICROCONTROLLER

Microcontrollers as a whole can be divided into groups of 8, 16, and 32-bit arithmetic and index registers in terms of size, although some developers believe that the 8/16/32-bit architecture determines the bus width. Is a cheap microcontroller capable of satisfying the requirements of the system or is an expensive 16 or 32 bit required? Can an 8-bit software emulation of the features of a 16/32-bit microcontroller allow the use of a cheap 8-bit, sacrificing the size of the executable code and speed? For example, can an 8-bit microcontroller be used with a software macro to emulate a 16-bit battery and indexing operations? Choosing an application language (high-level instead of assembler) can greatly affect system performance, which can then be dictated by the choice of an 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 frequencies, while others can operate up to zero frequency. Sometimes a specific clock frequency is selected to generate another clock frequency required in the system, for example, to specify serial transmission speeds. Basically, computing power, power consumption and system cost increase with increasing clock frequency. The price of the system increases with increasing frequency due to the cost not only of the microcontroller, but also of all the required additional microcircuits, such as RAM, ROM, PLD and bus controllers.
Consider the technology with which the microprocessor was manufactured: N-channel metal-semiconductor semiconductor (NMOS), which was used in microcontrollers of early development, comparable to modern CMOS technology with a high level of integration (HCMOS). Unlike early NMOS processors, in HCMOS signal levels range from 0 to the supply voltage level. In this regard, preference is given to HCMOS processors. In addition, HCMOS consume less power and therefore heat less. The geometric dimensions of the elements in HCMOS are smaller, which allows you to have denser schemes and, thus, work at higher speeds. A denser design also reduces the cost of an individual microcontroller, as on a silicon wafer of the same size, you can get more chips. For these reasons, today the vast majority of microcontrollers are manufactured using HCMOS technology.

MICROCONTROLLER FEATURES

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. Embedded devices are highly reliable 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, system clock / generator. Memory devices include random access memory (RAM), read-only memory (ROM), flash ROM (EPROM), electrically flash ROM (EEPROM). Timers include both real-time clocks and interrupt timers. The range and resolution of the timer should be taken into account, as well as other sub-functions, such as the functions of comparing and / or capturing input lines when measuring signal duration. I / O tools 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 internal / external bus, a watchdog timer for the normal operation of the system, a watchdog, a clock generator failure detection system, a memory configuration option, and a system integration module (SIM). SIM usually replaces the external “sticking” logic needed to organize the interaction of the microcontroller with external devices through the specified contacts of the chip.
Most microcontrollers with in-circuit resources include a block of configuration registers for managing these resources. Sometimes this block itself can be reflected in various places on the memory card. Sometimes there is a user and / or factory test register indicating what value the manufacturer attaches to quality. The presence of configuration registers leads to the problem of accidentally changing the desired configuration with "wandering" code. To prevent such an accidental possibility, a "blocking" mechanism is used, i.e. before the configuration register can be changed, the bits in another register must be changed in a specific sequence. Although configuration registers may initially be intimidating in their complexity, they are extremely valuable because they provide high configuration flexibility at a low cost, so a wide variety of applications can be found with one microcontroller.

MICROCONTROLLER COMMANDS

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 index addressing modes in relation to the anticipated 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 with low power consumption and / or standby? Are there any bit-manipulation commands (setting a bit, clearing a bit, testing a bit, changing a bit, transition instructions for a set / cleared bit) that facilitate the use of a microcontroller, or bit-field manipulation commands?
Be careful with great teams that perform many actions in one team. The real performance criterion is the number of clock cycles required to complete the task, and 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 bytes used. Are there any unrealized instructions in the card of operating codes and what happens if they are accidentally executed? Will the system handle this situation correctly with the "exceptional" event handler or will this lead to the system crashing?

MICROCONTROLLER INTERRUPTIONS

Verification of the interrupt structure is always necessary 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 an interrupt level mask? When the interrupt level is confirmed, are there individual vectors for the interrupt handler program, or should all possible interrupt sources be polled to determine the source? In speed-critical applications, such as printer control, the criterion for choosing a suitable microcontroller may be the response time to an interrupt, i.e. the time from the beginning of the interrupt (in the worst case, phased with respect to the clock of the microcontroller) 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 means to train personnel in the intricacies of manufacturing systems based on microcontrollers and using development tools? Does your company already have sufficient development tools, or will you buy or rent them? If a new microcontroller is being considered, are there development tools available, such as high-level language compilers, assemblers / linkers, prototype modules, and debuggers / emulators? Are your development tools for new microcontrollers easily expanded enough? Do I need to hire and train additional staff for this project? Can you bring in 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 and with service?

SUPPLIER CHARACTERISTIC

The third step in reducing the list of technically acceptable microcontrollers is checking manufacturers and suppliers of microcontrollers, i.e. companies with whom you plan to enter into long-term relationships on a mutually beneficial basis. A supplier may be a microcontroller manufacturer, or it may be a dealer who is an authorized representative of several manufacturers. A supplier with a wider range of products and a reputation for high quality, reliability, service and timely delivery at a fair price will best satisfy your needs. In addition, the more products you buy from a single supplier, the greater the benefits you 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 volume of the supplier. Suppliers who supply not only microcontrollers, but also memory (RAM, ROM), discrete devices (transistors, diodes, etc.), standard digital logic devices (7400, 74HC00, etc.), special microcircuits, custom devices (CSIC), Application Specific Chips (ASICs), and Programmable Logic Devices (PLDs) can better meet your growing demands. Does the manufacturer and / or supplier have any awards for quality, reliability, service and / or supply? Do not trust too much self-rewarding rewards.

PRODUCT CHARACTERISTICS

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 checked by establishing the experience of the manufacturer in this area and its achievements. The procurement and credit departments of your company can help you with these issues. The monopoly position of the supplier, unfortunately, is usually the norm, because most microcontroller manufacturers rarely overlap 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.

MANUFACTURER SUPPORT

Manufacturer's direct support includes marketing / sales and applied engineering support. When you call, asking for help, can you directly contact the one you need, or do you have to play the “dead 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 does the secretary send your messages to the support person? What hours does support staff work? Do they have responsibilities other than support? What is the number of staff? Will the factory personnel, namely, specialists in finished products, production, quality, electronic engineers, programmers, help him readily? Are factory engineers friendly with support staff? Does the support staff know whether they 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 an electronic bulletin board (BBS) or a page on the Internet where you can get information such as applications, product news, latest programs, sources, error messages, e-mails, conferences? What baud rates are supported? How many telephone lines are available? What are the hours of work? Do you need a special brand of computer and / or modem for access? Is there a system operator (sysop)?

LITERARY SUPPORT

Literature covers a wide range of printed materials that can help you make the right choice. It includes manufacturer's publications, such as technical descriptions and recommendations for use, as well as publications available at your local bookstore and / or library. Publications from a local store and / or library not only indicate the popularity of the manufacturer / microcontroller, but also offer unbiased opinions if they are expressed by authors independent of the manufacturer.

FINISHING A CHOICE

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 manufacturers' technical specifications to get a fair visual comparison. Some manufacturers have pre-made comparative descriptions of their microcontrollers that will simplify your task, but check the technical descriptions to see if all the latest products are presented. Among the possible characteristics are the price (for the expected volume of production, including predicting the future price, i.e. will the price decrease if you join the production?), RAM, ROM, EPROM, EEPROM, timer (s), A / D, D / A, serial ports, parallel ports, bus speed (minimum / maximum), special commands (multiplication, division, etc.), the number of available interrupts, 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 on your list, consider expanding your system and cost. What extensions do you think may be needed in future versions of this product? Finally, consider the price, as if two microcontrollers are the same, but one offers a bit more features that are not required today, but would make future extensions available at no additional cost, choose this microcontroller.

TEAM WORK

As a project leader, you can do all the research work alone, or you can start attracting your team by setting research tasks for its team, such as how programmers evaluate the set of commands for each microcontroller in question. Involving your team in the selection process in the early stages, you will not only create the spirit of the team, but also get individual commitments to the project through active participation in it. This approach, no doubt, leads to some conflicts, as everyone has their own opinion, but your task as a project leader is to be an intermediary. After listening to all opinions, you still choose. As in the political elections, as soon as the winner in the preliminary elections appears, all party members are ready for the full support of the leader, so the project team must support the decisions of the leader in order to achieve success in the project.

CONCLUSION

The final choice of the right microcontroller for your project is not an easy decision. Microcontrollers have become more sophisticated devices since in-circuit resources were added. And since the process moves towards a greater in-circuit integration of external resources to lower the cost of the system, the solution has become more and more 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.