Embedded microprocessor
Embedded microprocessors are essentially microprocessors that are used in everyday electronic devices, such as cellular telephones, household appliances, automobiles, or virtually any electronic device you could think about. Unlike microprocessors, which are usually used in computer systems, embedded microprocessors are usually designed to perform a certain task and the user seldom has to interact with it.
Although not seen, embedded micrprocessors are all around us. It is estimated that in 1997, there were about 30 million microprocessor chips built for PC use, while there were around 3 billion built for embedded purposes.[[1]]
Characteristics of Embedded Microprocessors
Embedded microprocessors, although similar to normal microprocessors, usually are never controlled by humans. If this were the case, then why wouldn't we just hook up a computer to every electronic device? This would be too cumbersome and would require someone to be with the device all the time to control it. Instead, embedded microprocessors interact with the world without any need for a human "supervisor". So how does the processor know what to do and when?
Interrupts
Embedded microprocessors interact with their environment through an interrupt system. Interrupts are basically electronic signals sent from external devices that let the processor know that they are done retrieving some data, or converting a signal, or whenever they need to use the processor. The processor then enters it's interrupt handler (which is usually just another program) and decodes the source of the interrupt to take the correct action.
So, now we know a little about how embedded microprocessors interact with the world. A natural question at this point is where are the programs that the processor executes.
Programs
Well, like any computer, the programs are stored in memory. PC's have a relatively large memory, and are able to execute large, complicated programs. Since we are dealing with an embedded system, memory is an important issue. Keeping in trend with the miniaturization of electronics, this leaves us without large amounts of available memory. This isn't too big an issue, however, since the programs run by embedded microprocessors are usually fairly short and straightforward. So these small programs can fit onto memory built onto the chip that the processor is on.
Other Common Microprocessor Features
Aside from the memory and interrupt system, embedded processors also use a variety of other devices which are built onto the chip as well. Since embedded processors are usually used to control devices, they sometimes need to accept input from the device they are controlling. This leads us to the need for an analog to digital converter. Since processors are built to interpret and process digital data, i.e. 1's and 0's, they won't be able to do anything with the analog signals that may be being sent to it by a device. So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. There is also a digital to analog converter that allows the processor to send data to the device it is controlling.
In addition to the converters, many embedded microprocessors include a variety of timers as well. One of the most common types of timers is the Programmable Interval Timer, or PIT for short. A PIT just counts down from some value to zero. Once it reaches zero, it sends an interrupt to the processor indicating that it has finished counting. This is useful for things such as thermostats, which periodically test the temperature around them to see if they need to turn the air conditioner on, the heater on, etc.
Another feature is the time processing unit or TPU for short. It is essentially just another timer, but more sophisticated. In addition to counting down, the TPU can detect input events, generate output events, and other useful operations that are beyond the scope of this discussion.
Embedded Microprocessors vs. General Microprocessors
So, why are embedded microprocessors not the same as normal computing microprocessors? Essentially, they don't need to be as sophisticated as processors that a computer might use. Computers generally do all sorts of computations, yet embedded systems are generally specific to the type of job they are designed for.
Speed Issues
Computers need to be very fast. Well, they don't "need" to be, but computer users don't want to sit there and wait for the computer to finish. It should be instantaneous to the user. With embedded processors, speed isn't so much of an issue (unless it's controlling something like anti-lock brakes on a car, or anything where people could get hurt). Since the embedded processor usually never interacts with people, it doesn't need to be lightning fast.
Instruction Sets
Computers generally have rather large instruction sets (the instructions that the processor actually executes). They are very general instructions, such as load data from memory to a register, or perform additions, logical operations, or save data from a register to memory. For embedded systems, the instruction set isn't so large, so they generally have instructions that are only useful to the application it is designed for. Including all the other unnecessary instructions would lead to increased size and cost.