What is a microcontroller?
A microcontroller is an integrated chip that is often part of an embedded system. The microcontroller includes a CPU, RAM, ROM, I/O ports, and timers like a standard computer, but because they are designed to execute only a single specific task to control a single system, they are much smaller and simplified so that they can include all the functions required on a single chip.
A microcontroller differs from a microprocessor, which is a general-purpose chip that is used to create a multi-function computer or device and requires multiple chips to handle various tasks. A microcontroller is meant to be more self-contained and independent, and functions as a tiny, dedicated computer.
The great advantage of microcontrollers, as opposed to using larger microprocessors, is that the parts-count and design costs of the item being controlled can be kept to a minimum. They are typically designed using CMOS (complementary metal oxide semiconductor) technology, an efficient fabrication technique that uses less power and is more immune to power spikes than other techniques.
· The desktop computer you are using is a "general purpose computer" that can run any of thousands of programs . Microcontrollers are "special purpose computers."
· Microcontrollers do one thing well. There are a number of other common characteristics that define microcontrollers. If a computer matches a majority of these characteristics, then you can call it a "microcontroller":
For example, the microcontroller inside a TV takes input from the remote control and displays output on the TV screen. The controller controls the channel selector, the speaker system and certain adjustments on the picture tube electronics such as tint and brightness. The engine controller in a car takes input from sensors such as the oxygen and knock sensors and controls things like fuel mix and spark plug timing. A microwave oven controller takes input from a keypad, displays output on an LCD display and controls a relay that turns the microwave generator on and off.
The microcontroller controlling a car's engine, for example, has to work in temperature extremes that a normal computer generally cannot handle.
A car's microcontroller in Alaska has to work fine in -30 degree F (-34 C) weather, while the same microcontroller in Nevada might be operating at 120 degrees F (49 C). When you add the heat naturally generated by the engine, the temperature can go as high as 150 or 180 degrees F (65-80 C) in the engine compartment.
· In many products, such as microwave ovens, the demand on the CPU is fairly low and price is an important consideration.
· In these cases, manufacturers turn to dedicated microcontroller chips -- chips that were originally designed to be low-cost, small, low-power, embedded CPUs
· . The Motorola 6811 and Intel 8051 are both good examples of such chips. There is also a line of popular controllers called "PIC microcontrollers" created by a company called Microchip
· . By today's standards, these CPUs are incredibly minimalistic; but they are extremely inexpensive when purchased in large quantities and can often meet the needs of a device's designer with just one chip
· A typical low-end microcontroller chip might have 1,000 bytes of ROM and 20 bytes of RAM on the chip, along with eight I/0 pins. In large quantities, the cost of these chips can sometimes be just pennies. You certainly are never going to run Microsoft Word on such a chip -- Microsoft Word requires perhaps 30 megabytes of RAM and a processor that can run millions of instructions per second.
· But then, you don't need Microsoft Word to control a microwave oven, either. With a microcontroller, you have one specific task you are trying to accomplish, and low-cost, low-power performance is what is important.
One of the big advantages of a microcontroller is that software -- a small program you write and execute on the controller -- can take the place of many gates.
DIFFERENCE BETWEEN A MICROPROCESSOR AND A MICROCONTROLLER?
A microcontroller is a specialized form of microprocessor that is designed to be self-sufficient and cost-effective, where a microprocessor is typically designed to be general purpose (the kind used in a PC). Microcontrollers are frequently found in automobiles, office machines, toys, and appliances.
The microcontroller is the integration of a number of useful functions into a single IC package. These functions are:
The ability to execute a stored set of instructions to carry out user defined tasks.
The ability to be able to access external memory chips to both read and write data from and to the memory.
Basically, a microcontroller is a device which integrates a number of the components of a microprocessor system onto a single microchip.
So a microcontroller combines onto the same microchip :
The CPU core (microprocessor)
Memory (both ROM and RAM)
Some parallel digital I/O
Also, a microcontroller is part of an embedded system, which is essentially the whole circuit board.