Turn Relay ON or OFF using 8051 Microcontroller AT89C51

A relay is an electromechanical switch which is used to turn ON or OFF any circuit by using Electromagnet. It is just like practical switch which is drived electronically. By using Electromagnet in Relay we actulay provides isolation hence Relays can be used to power ON or OFF a heavy AC current machine etc. Relays have different ratings and different properties which are not a part of this topic. Relays and Microcontroller: Microcontroller are intelligent devices but they can’t switch ON or OFF your room fan as they can’t handle heavy current so we use relays to do so....