Page 1145 - The Mechatronics Handbook
P. 1145

For example, pulse generators and timers can be used to construct stepper motor drive sequences. Micro-
                                 controllers are becoming increasingly specialized with respect to the data communication interfaces they
                                                                                 2
                                 support. While many support the ubiquitous RS232, SPI, and I C protocols, recent microcontrollers have
                                 built-in support for interfaces such as USB.
                                   In order to minimize power consumption, most microcontrollers have a special sleep or standby mode
                                 in which no instructions are executed and very little power is consumed. Microcontrollers can be pro-
                                 grammed to awaken in response to an external event so that the program code is executed, and power
                                 consumed, only when necessary.
                                   Microcontrollers are a very large semiconductor market due to the wide range and high volume of
                                 devices that use them. There are many manufacturers and models of microcontrollers, ranging from tiny
                                 8-pin devices with minimal functionality and costing mere pennies, to large devices with hundreds of
                                 pins, many features, and much higher cost. This broad spectrum reflects the highly specific nature of an
                                 embedded computer and its design.

                                 FPLD-Based Systems
                                 Field-programmable logic devices (FPLDs) such as CPLDs (complex programmable logic devices) and
                                 FPGAs (field-programmable gate arrays) are a more recent alternative to microcontrollers for embedded
                                 computer design. An FPLD represents a programmable hardware device; the actual hardware function-
                                 ality of the device is what is being designed. A microcontroller, in contrast, has fixed hardware function-
                                 ality and is programmed with software. It is possible, however, to design an FPLD that behaves as a
                                 microcontroller, and is further programmed in software. The programmable hardware functionality,
                                 however, affords the designer a much greater degree of flexibility over a fixed hardware solution. The
                                 price for this flexibility, however, is complexity.
                                   FPLDs may be designed from the ground up or may be composed of one or more predesigned core
                                 and peripheral blocks. It is possible, for example, to purchase microcontroller core functions, peripheral
                                 functions, etc. and assemble them to form a customized microcontroller on an FPLD with non-recurring
                                 engineering (NRE) costs that are much lower than a full custom chip design.
                                   FPLDs can often be programmed “on-the-fly,” allowing for reconfigurable computing. This is a com-
                                 puting paradigm that reprograms a system at the hardware level while it is in operation, according to
                                 system demands. This means, for example, that the same hardware device can implement multiple bus
                                 protocols, interfaces, or algorithms as needed, rather than requiring a larger and more expensive device
                                 that supports all of the necessary functions but only uses one at a time.

                                 Digital Signal Processing Systems
                                 Digital signal processing (DSP) devices are in many ways similar to microcontrollers with respect to
                                 peripheral integration, power consumption, etc. but also have specialized hardware support for common
                                 DSP operations, such as filtering. DSP devices are ideal for use in systems that process speech and music,
                                 or for robust control and communications applications. The specialized hardware support of these devices
                                 means that they are capable of sustaining much higher effective computation rates (on signal processing
                                 tasks), but at the same clock speed and power dissipation as the more general-purpose microcontrollers.

                                 Real-Time Systems
                                 Most embedded systems must operate in real time, that is, they must respond in a timely fashion to
                                 external events such as user commands and sensor readings. When an absolute upper limit on response
                                 time is required (and guaranteed), the system is a hard real-time system; otherwise, it is a soft real-time
                                 system. Systems that have safety constraints, such as automotive and industrial control systems, are often
                                 hard real-time systems so that absolute maximum time delays can be computed and verified for safety-
                                 critical events.
                                   Real-time computation is effected using interrupts. These are mechanisms supported by all common
                                 microcontrollers that cause a change in the flow of execution of the program when the interrupt occurs.
                                 The program that is executed in response to the interrupt is expected to respond in some way to the interrupt.

                                 ©2002 CRC Press LLC
   1140   1141   1142   1143   1144   1145   1146   1147   1148   1149   1150