What’s a computer?
Ask anyone that question, and you’ll probably get variations of, “A machine with a screen and a keyboard and pointing device, used for running various software programs.” This has been the general “high-level” definition since the personal computer became popular in homes and businesses in the early 1980s.
A more technical definition might be, “A device that automatically carries out a sequential mathematical or logical instructions.” It’s that “sequence of instructions” part that distinguishes computers from other electronic machines; a computer can store and execute an arbitrary set of defined instructions; programs.
Non-computer electronic devices simply generate output that can vary according to the condition of inputs. No program is involved.
This computer definition includes not only the chunks of silicon that sit on your desk, your lap, or in the palm of your hand but also contraptions you wouldn’t necessarily consider “computers.”
Computers are everywhere. Your kids’ digital thermometer has a microprocessor in it. Digital cameras, Bluetooth™ headphones, washing machines…the list goes on. Modern automobiles are loaded with computers.
How do these “computers” work; the ones without keyboards, screens, and sometimes without any human interface at all? What makes them tick?
The answer is firmware and embedded software.
Firmware: A Brief History
If you search online for “firmware” and “embedded software,” you will find definitions all over the map. And the definitions have changed over time.
Historically, “firmware” was software that was stored in a special type of memory chip called an EPROM (erasable programmable read-only memory), or an EEPROM, the “electrically erasable” version. These chips were distinguished from garden-variety ROM chips. They could be erased and reprogrammed; EPROMs could be erased by exposure to ultraviolet light and EEPROMs could be erased and reprogrammed by external circuitry. For all practical purposes, the software stored this way was permanent and immoveable: “firmware.”
Firmware is typically used as low-level software that operates a specific, single-purpose device. Many components within a personal computer – video adapters, disk drives, and network adapters – have firmware, as do many peripherals that connect to computers (printers, external storage devices; peripherals…).
Computer components and peripherals typically have device driver software. This software runs as an interface with other devices.
In the past, the firmware for a device was rarely updated, largely because of the impracticality of erasing and reprogramming the (E)EPROMs in the field. With only a few kilobytes of storage available, firmware tended to be simple and usually didn’t need to be updated, anyway.
Two more recent developments have made firmware updates much more common:
- Devices and their firmware are more complex; with increased lines of code, there are more chances for bugs and additional opportunities to modify the firmware for greater speed and efficiency.
- Firmware is now more likely to be stored in flash memory (the same technology that underlies USB drives and solid-state disk drives), which is much easier to erase and reprogram and has greater storage capacity than its (E)EPROM predecessors.
Many devices can’t have their firmware updated in the field because they lack interface for it. For example, the firmware that runs most appliances is there to stay; there’s no way to update the firmware other than taking the machine apart and replacing circuit boards. (But the rise in network-connected appliances is making firmware remote-updating possible.)
The Rise of Embedded Software
Like firmware, embedded software is software designed for a particular device. It typically runs on a microcontroller or microprocessor onboard the device.
Unlike firmware, embedded software operates more like application software running on a PC.
The program files for embedded software reside in the device’s file system until called upon to execute, at which point the executable code is loaded into the device’s random access memory (RAM) and executed by the microprocessor. Embedded software typically implements higher-level features and functions of the device. Firmware takes care of low-level tasks such as converting analog sensor signals to digital data and managing communications protocols.
These days, there’s no real bright-line distinction between the two types of software. Depending on the device’s design, some tasks traditionally relegated to one may be handled by the other.
With the advent of the digital high-definition TV (HDTV) format, TVs needed microprocessors for the incoming digital video signal and to generate the red/green/blue values (also digital) for each pixel in the display. Firmware also handled converting the digital audio signal to analog output for the speakers. This required firmware, but not what would be properly called embedded software. Embedded software comes into play in “smart TVs.”
Smart TVs still have firmware for the low-level signal processing tasks, and more firmware to operate the wired or wireless network interface and communications with the remote control (which also now has firmware). But smart TVs also have operating systems; usually, Android or Roku, as well as apps that are preinstalled on the TV or that can be downloaded from the internet. These apps—the embedded software—enable a higher level of user interactivity beyond changing the channel and adjusting the volume.
Single-purpose industrial robots normally need firmware alone to operate. The firmware governs the motions of the robot; it interprets and responds to sensor data.
Now, imagine a general-purpose robot with enough sensors and actuators to enable it to do many different things. Like its industrial-robot cousin, its sensors (cameras, motion sensors, audio sensors, and whatnot) and actuators (arms, joints, wheels, and tools) still rely on firmware, as do its Wi-Fi, GPS, and Bluetooth communications devices.
The software that makes it a package-delivery robot, a dog-walking robot, or a search-and-rescue robot is embedded software.
The same robot hardware with different purposes uses different embedded software for each purpose.
Firmware (usually) sits between the microprocessor and hardware components, converting the incoming component data into something the microprocessor can understand and act upon. Firmware also converts microprocessor commands into signals which the hardware components understand.
Embedded software (usually) provides more of the higher-level functionality, such as user interface (if any). The distinction is admittedly fuzzy at times and can vary from device to device, but the bottom line is that together, they make digital devices do what they’re supposed to do.