Professional Documents
Culture Documents
Lab Reort # 9: TITLE: Interface Relay With Microcontroller. Components Required
Lab Reort # 9: TITLE: Interface Relay With Microcontroller. Components Required
Lab Reort # 9: TITLE: Interface Relay With Microcontroller. Components Required
CODE:
org 00h
setb P1.0
clr P2.0
Repeat: mov C, P1.0
mov P2.0, C
sjmp Repeat
CIRCUIT DIAGRAM:
PRODECURE:
1. We opened the Keil software
2. We made New uVision Project.
3. We Saved the new project
4. We Selected AT89C51 after saving the project.
5. We created new file to write the code the code
6. Code is saved and we used .asm for saving it
7. We went to Project tab and then to Target for Option.
8. Change Frequency to 12 MHz
9. Click on the Generate Hex file.
10. Add code file to group source 1.
11. Built the Code and use the hex file for the project
12. We Open the Proteus.
13. Click the schematic capture.
14. Add all the required components from the library and place them in the Window.
15. Connect all the component according to circuit.
16. Connect p2.0 and p2.1 to uln2001A and its output to Relays
17. Connect relays to leds
18. Add the Hex file into the Microprocessor.
19. Simulate the circuit.
RESULT:
CONCLUSION:
We interfaced relays with microcontroller.