Microcontroller

A microcontroller (also microcontroller, mu.C, MCU) are referred to the semiconductor chips, which include a processor and at the same time peripheral functions. In many cases, also the memory and program memory is partially or completely on the same chip. A microcontroller is a one-chip computer system. For some, the term microcontroller system-on -a- chip or SoC is used.

On modern microcontrollers often find even complex peripherals such as CAN (Controller Area Network), LIN ( Local Interconnect Network ), USB (Universal Serial Bus), I ² C ( Inter-Integrated Circuit), SPI ( serial Peripheral Interface ), serial or Ethernet interfaces, PWM outputs, an LCD controller and driver, and analog-to- digital converter. Some microcontrollers also have programmable digital and / or analog function blocks.

Areas of application

The microcontroller comes in the form of embedded systems in everyday life often go unnoticed in technical consumer goods on, for example, in washing machines, smart cards (money, phone cards ), consumer electronics ( VCRs, CD and DVD player, radios, televisions, remote controls ), office electronics, motor vehicles ( ECUs for example, ABS, airbag, engine, instrument cluster, ESP, etc.), mobile phones and even in clocks and watches. Moreover, they are in virtually all computer peripherals included (keyboard, mouse, printer, monitor, scanner, etc.. ).

Microcontrollers are adapted in performance and features to the application. Therefore, they have compared to "normal " computers significant advantages in cost and power consumption. Small microcontrollers are high-volume, available for well under € 1.

Demarcation to microprocessors

The boundary between microcontrollers and microprocessors is fluid, which also is evident that often after some time microcontroller variants of a new microprocessor architecture have appeared. In the simplest case this is done by the case of a traditional microprocessor implemented as support and peripherals components such as clock and reset generation, interrupt controller, timer, interface module and to some extent memory controller are integrated into the chip itself, so that for a functional processor system often only a quartz ( for the clock ) and memory modules are necessary. Typical representatives of this genus are, for example, the Intel 80186 (derived from 8086 ), the XScale family (ARM), ColdFire ( MC680xx ) Freescale (formerly Motorola). This controller series are often also resumed, if the relevant mainstream CPU is already no longer produced (eg 6502, MC680xx ).

Partially microcontroller also be used as part of a multi-chip module ( MCM). It mostly happens when different semiconductor processes to be combined that are poorly or not can be combined on a single chip. Examples include combinations of microcontrollers with high-frequency circuits for wireless connections (eg, Atmel, Cypress, Microchip provide such MCMs ago), with power electronics (eg, Freescale, ST ) or flash ROM in the early days (eg Micronas intermetallic ). In part, the solution is also used with an MCM, if existing chips already are to be combined, but the effort is to be avoided for redesign. Examples include combinations with network controllers, or the connection drivers for networks (PHY ) or LCD controllers.

On the other hand, there are also "classic" microcontroller architectures that were not intended from the outset as a pure microprocessor system, but primarily aimed at control tasks. These are characterized for example by the fact that even a single-chip operation without external memory devices with them is entirely possible, as well as the instruction set of the CPU usually specialized commands to control individual signal lines offers ( using so-called bit manipulations ). Is also important for such a controller a short interrupt latency as possible, ie the time it takes the controller to respond to the interrupt request signal to a source (clock, peripheral device, etc.). Typical representatives of this genus are, for example, the 8051 Intel C166 and Siemens (now Infineon) and Infineon TriCore. For function monitoring of micro controllers usually so-called watchdog circuits are used, but they are already partly integrated in the microcontroller.

This separation was the Intel 8085 instead - then there was the pure data processor (microprocessor, eg 8086 family) and the data translator (microcontroller, eg 8048, 8051 ) as an interface between the hardware and the central microprocessor. Microcontroller can also use a passive bus interface have (eg 8041A, a variant of the 8048 ) - from the perspective of the microprocessor as a peripheral chip. Whether TV, VHS recorder, X-ray machine, car or PC, anywhere there is now the division of labor between these two types. The introduction of the buses (K- bus, CAN bus, LIN, FlexRay) to the central processor entirely on the evaluation of the message ( telegram) can concentrate - " button pressed Handbremse_Ein " for example. Only the responsible controller knows the event in the hardware or on a bus slave, which led to the creation of this message. The processor sends a message now, " release the handbrake ," for example, the controller will control the hardware accordingly or inform the subordinate bus. However, today's controllers are already as computationally powerful that they often do without a parent microprocessor and can even cope with all tasks complete.

Architectures

The number of built-in microcontroller exceeds by far the number of microprocessors. The vast majority of the microcontroller used is based on 8 -bit processors, whose basic architecture part dates from the first half of the 1970s. However, there are 4 -, 16 - and 32 -bit microcontrollers. Quantitatively, the 4-bit microcontrollers are still strongly represented, as they are cheap to manufacture in accordance with due to their simple design and for simple tasks, such as watches, suffice.

8 - and 16 -bit microcontrollers are now losing market share to the 32 -bit microcontroller. The reason is that in modern semiconductor processors 8-16 and 32 bit is not a very big difference in manufacturing cost is more, the performance advantage of 32 -bit microcontrollers, however, is considerable. However, need 8 - and 16-bit microcontroller fewer transistors, which means that they, if they are based on a modern processor design with power saving mechanisms, generally more economical than the 32 -bit microcontroller.

Many microcontrollers currently used are based on cores which have previously been used as microprocessors. In the 8 - and 16 -bit microcontrollers, microprocessors are now usually no longer manufactured. But there are also microcontroller cores that were not made ​​as a microprocessor, such as Atmel AVR, PIC microcontrollers or TI MSP430, Infineon TriCore, XMC4000, XMC1000, XE166, XC800, Aurix and more.

Used program memory

The memory types used in microcontrollers have changed over the years and depend partly also by the architecture and economic aspects. In the early days of the microcontroller, and even today in the 4 -bit architectures, it was almost exclusively ROM. Software for the microcontroller must be created with such appropriate development systems which permit simulation of the microcontroller, and usually have an in-circuit emulator. The software thus generated is then transferred to the manufacturer of the microcontroller, which then provides the chips in the production process with this software. Usually this is in the application of the last metal layer on the chip ( the last "mask", hence " mask-programmed microcontrollers ").

A disadvantage of this method is the lack of flexibility, since a change in the software a delay of several weeks or even months to occur. For smaller projects, this technique is not applicable, since most manufacturers provide a minimum order quantities of 20,000 chips. In addition, the error rate is high, because the software could not be tested on the final chip, but only using the development system. This is offset by the lower price of the chips, because the production process for ROM memory is somewhat simpler than the programmable memory and of course the absence of programming as a production process. For this reason, almost exclusively, used for products with very large numbers and thus low unit prices versions with ROM today.

In order to simplify the development process and to allow projects with small numbers, appeared in the second half of the 1970s microcontroller on the market, the EPROM (Erasable Programmable Read Only Memory) used. These microcontrollers, the program memory could be described by a corresponding programming device and can be erased by ultraviolet light. This was a much more economical development tool available, which also allowed a very practical test. In addition, so that projects with small numbers were possible. Especially through the elaborate ceramic case with inset quartz window for deleting the EPROM memory, these chips were, however, significantly more expensive than the ROM versions.

Due to the increasing use of EPROM -based microcontroller and chips are then available in the 1980's, which are mounted in a plastic housing without a window, after the program can not be erased by ultraviolet light. This also OTP ( One Time Programmable - one-time programmable ) microcontrollers are priced above the ROM versions relatively close. The greater flexibility and the elimination of start-up costs ( for ROM versions calculates the manufacturer once tool costs for each new software version ) causes that are used in many circuits even for larger numbers of these OTP chips.

Meanwhile dominates new microcontrollers and smaller quantities or in the development phase flash memory for program storage. Since this is directly electrically erasable and rewritable, eliminates the costly ceramic case, and the memory can be fully tested during the manufacturing process. For really large numbers continue, the cost advantage of the ROM version is effective.

The microcontroller used today are a mixture of these techniques. On one hand, the requirements of the application are a factor (ROM may be the only sufficiently stable storage, eg in extreme temperature requirements, EPROM here still has advantages over Flash), on the other hand, many of the microcontroller are long time on the market.

Typical memory sizes of today's microcontrollers are between 1 KB and 2 MB for the program and between 32 bytes and 48 Kbytes for data. The aforementioned RAM is meant internally, while the ROM part happen for both internal and external solutions. Many models can, however, appeal to much larger external memory.

Programming

Microcontrollers are usually programmed in the programming languages ​​C or assembler. Other languages ​​such as BASIC, Pascal, Forth, Ada or C are also used. In the hobby have for certain types Microcontroller your own, specially-designed languages ​​( such as JAL for the PICmicro family of Microchip Technology microcontrollers ) may establish.

As with the program storing the programming language used with architecture, application purpose and requirements depends. For 4 -bit architectures exclusively assembler is used practically, since only very few compilers can effectively use the scarce resources of the smallest microcontrollers. Also in the 8 -bit architectures often used assembly in order to achieve the highest possible efficiency and code density; in projects that take relatively little of the available resources in mu.C claim or are produced in small quantities, it is increasingly common to use high-level languages ​​, in order to save development effort. Thus, 16 - programmed primarily in high-level languages ​​and 32 -bit architectures.

The high-level language most often used for microcontroller C, as well as a very hardware -level programming is easily possible here. Forth had in the 1980s, a certain importance, since it allows a very compact and fast code. But there was a getting used to the syntax and thus leads now a shadowy existence. Other high-level languages ​​for the programming of mainstream applications generally have relatively little importance for the programming of microcontrollers, the Ada programming language, however, is primarily in military applications and in other safety-critical applications with high demands on safety and the runtime behavior of software ( such as avionics used in Luft-/Raumfahrzeugen ).

A relatively new development tools that allow the purely graphical design of software for microcontrollers. National Instruments LabVIEW allows the generation of executable code for some controllers and Cypress has for some time with the tool PSoCexpress the goal, at least the realization of simple control applications with the PSoC microcontrollers to allow without any programming knowledge.

Particularly interesting are some microcontrollers that have a high-level language interpreter in the chip. One of the first building blocks of this genus was, inter alia, a derivative of the 8052 with the designation 8052AH, which was delivered as 8052AH -BASIC with a BASIC interpreter in 8 kbyte ROM, and based on the 6502 Rockwell R65F11/R65F12 who had a Forth interpreter in the internal ROM. This satisfies any computer with a serial port and a terminal program to program such a solution, it must not separate (and often expensive) high-level language compilers to be purchased.

Similar products are now offered by other manufacturers based on conventional microcontrollers, but currently are known directly from chip manufacturers no such products. Both hobbyists as well as professional users with small numbers (eg in test equipment and laboratory tests) enjoy microcontroller modules that are programmable in Basic or Forth, great popularity due to their ease of use.

298793
de