Interfacing Microcontrollers
Microcontrollers are useful only if they can control other devices. Here, lets explore some basic components to interface your microcontroller to.
Microcontrollers are useful only if they can control other devices. Here, lets explore some basic components to interface your microcontroller to.

LEDs are the elementary things you will be interfacing to your microcontrollers. They are very cheap, easy to get, easy to use and will look beautiful! To use LEDs, you have to learn the following:
These pages will be very helpful for connecting LEDs:
Remember: You have to limit the current you supply to the LED with a resistor. Increase the resistance to reduce the brightness and vice versa.

To learn how relays work, visit this page: HowStuffWorks This page (Wikipedia) contains more information on relays. Relays will typically require more current that a microcontroller port can source or sink. You will have to use a driver of some sort. First, calculate the current required by your relay coil. You can estimate it by the formula V=IR. Its safe to maintain a safety factor of two or four.
The Options you can use to drive relays are:

Push buttons and switches are fairly easy to interface with microcontrollers probably because they can only either be ON or OFF and this easily corresponds to HIGH or LOW. All that you have to do to interface a switch to a microcontroller is to cause that switch to either drive a pin low or pull the pin high.
An example of how to interface switches is here. 
In the above curcuit, when the switch SW1 is pressed, it connects the mircocontroller's pin to +5V and drives the pin high. We say the pin is pulled high. The 1 Meg is a just-in-case current limiting resistor and not absolutely required. When the switch is not pressed or is off, the +5V is disconnected and the microcontroller's pin is connected to the ground. Hence it is pulled low. As the switch drives the pin high or low, the port's value is changed between 0 and 1 which your program can read very easily.
Switches are child's play isn't it? Well, its just almost.
LCD Displays are very cheap display / output options for Microcontroller projects. Their versatility enables them to be used to display data, status, implement menus and get inputs also. Most Common variant is 16x2 and is available easily for Rs. 150 or lower, depending on where and how much you buy.
Click here for detailed information on how interfacing LCD displays work. For interfacing PIC with LCD Displays, click here.