A heater connected to 220V supply using relay. Write a program to operate the heater as the switch connected to P2.1 goes high and turn off the heater as switch goes low.
Source code
ORG 00H
HEATER BIT P2.0
SWITCH BIT P1.2
HERE: MOV C
,SWITCH
MOV MOTOR, C
SJMP HERE
END
Result:
0 Comments