Microcontroller s basics
A microcontroller is an electronic device with a set of Input and Output pins. These pins may look like real pins, or can just be connectors that allow the microcontroller to be plugged into other devices. You can find microcontrollers that are single units and others that are complete electronic boards with access to the pins through connectors.
Input/ Output – Analogue/ Digital
Depending on the microcontroller, the pins can be inputs or outputs, so they can be used to receive and send signals. These signals can be either digital or analogue. A digital signal is discrete which means that it can have only two possible states, either logical 0 (LOW) or logical 1 (HIGH). These values (HIGH or LOW) are reflected in changes in voltage. So LOW is 0 volts and HIGH is 5 volts. When a continuous range of multiple values is considered then we need analogue signals. Many physical phenomena manifest in this way, like measuring light intensity, temperature, sound. In this case a pin in a microcontroller can be used as an analogue input getting values from a light sensor, or as analogue output dimming a lamp.
Timing and communication abilities.
Microcontrollers also have timing abilities that can be used in different ways to measure time lapses or to trigger time events. Microcontrollers have communication capabilities usually with serial ports, the same kind of serial ports that are available in most computers. In this way they can communicate with other devices using the well known serial protocols. In many cases the serial ports are used for both programming the microcontroller and for communication purposes.
Using Everyday Objects as Communication tools
Fig.39 The AVR atmega 128 Microcontroller from ATMEL and its pin configuration [source: http://www.atmel.com/]