Lab Reort # 6: TITLE: Serial Communication Between Microcontrollers. Components Required
Lab Reort # 6: TITLE: Serial Communication Between Microcontrollers. Components Required
Lab Reort # 6: TITLE: Serial Communication Between Microcontrollers. Components Required
CODE:
Transmitter:
org 00h
setb TR1
acall trans
acall delay
mov A, #'E'
acall trans
acall delay
mov A, #'S'
acall trans
acall delay
SJMP AGAIN
CLR TI
ret
ret
end
Receiver:
org 00h
clr P2.0
clr P2.1
clr P2.2
mov A, #38H
acall comnwrt
acall delay
MOV A, #0EH
acall comnwrt
acall delay
MOV A, #01H
acall comnwrt
acall delay
MOV A, #06H
acall comnwrt
acall delay
MOV A, #84H
acall comnwrt
setb TR1
MOV A, SBUF
acall datawrt
clr RI
sjmp here
comnwrt: mov P1, A
CLR P2.0
CLR P2.1
SETB P2.2
acall delay
clr P2.2
ret
setb P2.0
clr P2.1
setb P2.2
acall delay
clr P2.2
ret
ret
end
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 LCD with port P1.
17. Connect TX, RX to RX, TX respectively
18. Add the Hex file into the Microprocessor by double clicking on it.
19. Simulate the circuit.
RESULT:
CONCLUSION:
We made serial communication between two microcontrollers.