|Saturday, 07 October 2006|
Microcontrollers are microprocessors integrated with peripherals on a single integrated circuit. The microcontroller is essentially a microprocessor adapted for control type applications. They are compact in size and yet retain the computational power of traditional microprocessors, allowing them to be used in a multitude of applications. The evolution of microprocessors into complex instruments and machines has led to sophisticated, fast real-time control capability. Microprocessors of 16 or 32 bit capability with associated interrupt handler chips, programmable timer chips, ROM and RAM chips, have been replaced in many control function instances by single chip I/O microcontrollers with all peripherals embedded on the same chip with the microcontroller. However, microcontrollers differ from microprocessors in many ways. Microcontrollers are independently programmable and can have a great deal of additional functionality combined on the same integrated circuit. A typical microprocessor can access from a megabyte to a gigabyte of memory, and is capable of processing 16, 32, or 64 bits of information or more with a single instruction. In contrast to the microprocessor, a microcontroller includes a central processing unit, memory and other functional elements, all on a single semiconductor substrate, or integrated circuit. In a computer, the microprocessor performs the primary or basic computing functions, and other integrated circuits such as memory and adapters provide peripheral functions such as communications, input/output (I/O), and controlling devices such as monitors or printers. In a microcontroller, many of these functions are contained within the chip itself. As compared to the relatively large external memory accessed by the microprocessor, the typical microcontroller accesses a much smaller memory. A typical microcontroller might have a core microprocessor, a memory controller, an interrupt controller, and both asynchronous and synchronous serial interfaces. The advantage of a microcontroller as compared with a microprocessor is that the microcontroller can be used in an autonomous way. No external circuitry is needed for their operation. This is why their use is very widespread in relatively straightforward applications, such as in small electronic products.
Modern microcontrollers incorporate not only a processor core and communications cores, but also include other commonly-employed device circuitry, such as blocks of memory and programmable timers. A typical microcontroller not only includes a core microprocessor, but also further includes a memory controller, a direct memory access (DMA) controller, an interrupt controller, and both asynchronous and synchronous serial interfaces. Microcontrollers have embedded logic units, memories, power sources, and other circuits. Power on reset (POR) circuits are typically used in microcontrollers to initialize stable power states, ensuring that booting is accomplished safely. Within a microcontroller a central processing unit (CPU) having an arithmetic logic unit (ALU) and a load and store unit or a combination of both is located. The CPU is coupled through a bus with a memory to provide storage capacity for program instructions and data. Program and data memory can be separate with different bus lines or embodied in a single memory unit. Other peripheral components may be coupled through the same or additional busses. The memories employed in present microcontrollers for storing the program instructions take the form of either read only memories or erasable programmable read only memories. A rewriteable flash memory is associated with the microcontroller. The flash memory is used to store application code. Microcontrollers are programmed in a machine-dependent assembler language. To program the flash memory, the microcontroller needs data addressable read/write/erase access to the flash memory. Microcontrollers typically include self-tests to verify the proper operation of the CPU and the associated peripheral devices. The self-test typically will detect illegal memory access decoding, illegal opcode execution or a simple watchdog/computer operating properly (COP) test. The architecture of specific microcontrollers can vary from manufacturer to manufacturer, and from product to product. Microcontrollers provide programmable control (through programming of the processor core) of peripheral devices connected to them. The peripheral devices embedded in a microcontroller each have their own individual registers. Typical peripheral device registers include state registers, instruction registers, address registers, status registers and data registers. On system start up, the execution unit initializes each peripheral device with device specific initial configuration data.
In general, a microcontroller's operation includes a process for initializing, or beginning, its own internal logic and/or intended software application, also known as a boot method. The boot method for a microcontroller's application software is accomplished by the use of reset vector logic contained within the microprocessor, reset vectors in application memory space, application boot software and the application software itself. The application boot software typically determines if the application software is present and supplies the appropriate communication algorithms for reprogramming the application memory. The application software controls the functionality of the microcontroller by controlling the operations of the microprocessor. Resetting the microcontroller is done in a power-on reset operation. It can also be prompted by an external reset signal, or by a reset signal coming from an internal circuit of the microcontroller called a watchdog circuit. Debugging the programming code in embedded microcontrollers is usually done during development using an in-circuit emulator (ICE) unit. Microcontrollers allow circuit designers great flexibility in design choice. However, programming the microcontroller to perform the desired functions can be an arduous task. Techniques for programming the user program into the nonvolatile memory may be characterized by use of an external programmer coupled directly to the nonvolatile memory. The programmer utilizes a control signal line to appropriately signal the nonvolatile memory (as well as associated circuitry within the microcontroller) that a programming mode is being entered. By using a block of user programmable nonvolatile memory, the microcontroller may be customized to carry out any desired function within the capabilities of the device. Microcontrollers are connected via an external bus to an external memory in which a control program and data are recorded, read out instruction code from this memory by outputting an instruction fetch request, and read or write predetermined data by outputting a data access request.
Microcontrollers are used in many different applications. Microcontrollers are found in all market segments such as consumer, commercial, PC peripherals, telecommunications, automotive and industrial. Microcontrollers are used in modems for command interpretation and data transmission, in printer buffers for high speed dumping of data in preparation for driving the printer at the appropriate speed. Microcontroller embedded control are also used in copiers, cable television terminal equipment, lawn sprinkling controllers, credit card phone equipment, cellular phones, fax machines, automotive applications such as engine control modules, anti-lock braking systems, automobile suspension control, keyless entry systems, and a host of other industrial and consumer applications. In a computer storage system having multiple disk drives and multiple power supplies, an environmental monitoring unit (EMU) is controlled by a microcontroller. The EMU performs a variety of tasks including monitoring power supply voltage and currents, fan speeds, temperature of the storage system enclosure, and the status of the various disk drives in the storage system. In household appliances, microcontrollers are a part of microwave ovens, televisions, calculators, remote controls, clocks, etc. In a car, they are used in the engine control modules, the antilock braking systems, the sound systems, the airbags, and automobile suspension control modules. In antilock braking systems, the microcontroller monitors the rotational speed of the tires through sensors attached to the tires.