Thursday, March 31, 2016

8051 Relay Interfacing

A relay is an electrically controllable switch widely used in industrial controls, automobiles, and appliances. It allows the isolation of two separate sections of a system with two different voltage sources. For example, a +5V system can be isolated from a 120V system by placing a relay between them. One such relay is called an electromechanical (or electromagnetic) relay (EMR).

8051 Relay Interfacing

Program to turns the lamp on and off by energizing and de-energizing the relay every second.

ORG 0H
MAIN:
SETB P1.0
MOV R5, #55
ACALL DELAY
CLR P1.0
MOV R5, #55
ACALL DELAY
SJMP MAIN
DELAY:
HERE1: MOV R2, #100
HERE2: MOV R3, #255
HERE3: DJNZ R3, HERE3
DJNZ R2, HERE2
DJNZ R5, HERE1
RET
END



Related topics:
8051 External Program Memory Interfacing   |   8051 External Data Memory Interfacing   |   8051 Memory Mapped IO   |   8051 LED Interfacing   |   8051 Switch Interfacing   |   8051 Keyboard Interfacing   |   8051 7-Segment Display Interfacing   |   8051 LCD Interfacing   |   8051 ADC Interfacing   |   8051 DAC Interfacing   |   8051 Sensor Interfacing   |   8051 Stepper Motor Interfacing   |   8051 DC Motor Interfacing

List of topics: 8051

No comments:

Post a Comment