What is Microcontroller?
Basically, a microcontroller is a device which integrates a number of the
components of a microprocessor system onto a single microchip and optimized to
interact with the outside world through on-board interfaces; i.e. it is a
little gadget that houses a microprocessor, ROM (Read Only Memory), RAM (Random
Access Memory), I/O (Input Output functions), and various other specialized
circuits all in one package.
On the other hand, a microprocessor is normally optimized to co-ordinate the flow of information between separate memory and peripheral devices which are located outside itself. Connections to a microprocessor include address, control and data buses that allow it to select one of its peripherals and send to or retrieve data from it. Because a microcontrollers processor and peripherals are built on the same silicon, the devices are self-contained and rarely have any bus structures extending outside their packages.
So a microcontroller incorporates onto the same microchip the following:
- The CPU core
- Memory (both ROM and RAM)
- Some parallel digital I/O
Microcontrollers will also combine other devices such as:
- A Timer module to allow the microcontroller to perform tasks for certain time periods.
- A serial I/O port to allow data to flow between the microcontroller and other devices such as a PC or another microcontroller.
- An ADC to allow the microcontroller to accept analogue input data for processing.