Hardware
Available facilities on most embedded
computers
An embedded controller might have some or all of
the following hardware facilities:
Inputs and Outputs
Inputs and outputs (I/O) are the primary link between an embedded computer and the outside
world. They come in various forms. Programmable I/O are input and output channels that an
application program can configure as either an input or an output through software. Other
I/O channels are fixed and some are established by installing jumpers on the computer
board.
Various Forms of Protected I/O
Ordinary digital-logic integrated circuits (ICs) operate at relatively low voltage and
current levels. Over-voltages and over-currents can easily damage such ICs.
Special-purpose ICs and various protective devices, such as metal-oxide varistors (MOV)
and diodes, protect a controllers inputs and outputs against harmful power
fluctuations. Matching a controllers input and output protection to both normal and
abnormal conditions in your application is critical.
Resistance Measurement Input
A resistance measurement input circuit can measure the changing resistance of sensors that
have a voltage output based on resistance, such as thermistors or potentiometers. This
type of circuit makes about six readings per second. A typical application of a resistance
measurement input is a tank-level monitoring system. A float rises and falls with varying
fluid levels, causing a change in the voltage input to the controller.
Relays
Relays have two outstanding characteristics: they can switch considerable current and are
completely isolated from the control circuitry. Some embedded computers have relays
mounted directly on-board, allowing for easy integration into many control systems.
A/D and D/A Converters
Control applications often monitor devices that are not merely on-off in function
(digital) but are analog. For instance, a thermometer may provide a current signal
relative to temperature and a tachometer may output a voltage that is relative to speed.
To a computer, everything is digital data.
Converting analog signals from the outside world to digital data can necessitate an
analog-to-digital (A/D) conversion. Conversely, if a controller must output an analog
voltage or current level, then a digital-to-analog (D/A) conversion must take place.
Many different A/D and D/A techniques exist. But
two key specifications characterize converters when evaluating a suitable candidate:
Accuracy (specified in number of bits n, 1 part in 2n) and the conversion rate in samples
per second. The characteristics of various converter designs is beyond the scope of this
catalog. But generally you can assume that greater accuracy or speed entails greater cost.
Universal Inputs
Historically, controller inputs have supported either a digital or analog signal,
but not both. Z-World has designed an input type that accepts a voltage signal and reports
either a digital 1 or 0 value or an analog voltage level. This
type of input has been coined a universal input.
A universal input references two
user-configurable thresholdsone high and one low. Two thresholds stabilize input
readings as signals transition from a high value to a low value and
vice-versa. If input stability is not required, the thresholds can be set to identical
values.
Non-Volatile Memory
RAM (read access memory), or SRAM (static read access memory), is a common form of memory.
Although this type of data memory is inexpensive, it is volatile. Data
residing in RAM disappears when power is removed. This behavior is not acceptable in
control applications.
Non-volatile memory, in the form of EEPROM
(electrically erasable programmable read-only memory), battery-backed RAM, or flash EPROM,
provides varying degrees of security for your mission-critical data.
The type of low-power, read-write SRAM (static
random access memory) used in embedded controllers will retain its data in a sleep
mode as long as a modest power level is applied. Consequently, a single lithium
battery can possibly keep data alive many years, if necessary. Once written to EEPROM,
data will not be lost no matter how long power is removed. However, given the
EEPROMs combination of slow write speeds, high cost, and small capacity, the best
use for an EEPROM is storing small amounts of mission-critical data at infrequent
intervals.
Flash EPROM is a variation of EEPROM that is
becoming more and more popular. Clever designers have reduced the amount of on-chip
circuitry needed for writing to flash EPROMlowering cost substantially while
retaining the inherent advantages of EEPROM.
Flash EPROM is much less expensive than an
equivalent EEPROM and not much more expensive than an equivalent EPROM. Flash EPROM costs
slightly more than EPROM, but flash EPROM can be reprogrammed without removing it from the
controller. This eliminates a separate programming step, making software development much
easier using flash EPROM. And, field upgrades become simple and efficient.
Supervisor
Personal computers react to a power failure by simply shutting down and losing
any data that may be resident in the RAM. This is not acceptable for an embedded
controller supervising a critical process.
A special-purpose circuit in an embedded
controller constantly monitors the input voltage as well as the regulated supply for the
controllers internal components. A circuit called a supervisor will give
the controller advanced warning of an impending power failure, allowing the controller to
properly shutdown.
If the controller has a backup battery, the
supervisor can switch critical components, such as RAM, over to battery power. If the
controller has some form of non-volatile memory, the data can then be saved.
Real-Time Clock
In many applications, software engineers use simple hardware counters to keep
track of time intervals. But, if your application needs to log data or schedule operations
by time and date, then a special-purpose real-time clock may be beneficial because it
relieves the controllers microprocessor of much of the timekeeping overhead.
Operator Interfaces
Embedded applications often do not need and cannot use a typical PC monitor,
keyboard, and mouse. Instead, a simple keypad and LCD will often be more appropriate and
generally less expensive.
A keypad is an array of switches. A controller
senses keypad presses just as it would any other switch closure. LCD interfaces require a
number of parallel output lines and software drivers to send codes to the LCD.
Expansion-Bus Interface
When a given controller does not have the right mix of I/O or other facilities,
such as relays or D/A converters, users have three choices: use a different controller,
network several controllers together, or attach expansion devices to the controller.
Expansion boards provide a simple economical solution, particularly when adding just a
feature or two.
Voltage Regulator
Depending on design, a controller may accept 120 VAC, unregulated DC, or
regulated DC input power. To accept unregulated DC, a controller must have an on-board
voltage regulator. Voltage regulators come in two basic types: linear and switching.
Switching regulators are the more complex of the two, but offer greater efficiency and
thereby generate less heat.
|