- Category:
- SCM
- Tags:
-
[C/C++]
[源码]
- File Size:
- 35kb
- Update:
- 2012-11-26
- Downloads:
- 0 Times
- Uploaded by:
- awqqli
Description: [experimental title]
The RS-485 dual machine communication
[experimental purpose]
Master simple rs-485 communication.
[hardware connection]
See the schematic diagram of the circuit.
[experimental procedure]
The ISP downloads the switch to "00", and USES the Flash Magic software to download the program file "Send. Hex", temporarily not to run.
The ISP downloads the switch to "10" and USES the Flash Magic software to download the program file "Receive. Hex".
Turn off the power.
Jump line JP1:485 -DI connect TXD, 485-DO RXD.
Jump line JP5:485 -DI connect TXD, 485-DO RXD.
Connect CZ1 to CZ3 with 4 rj-11 cable.
Turn on the power and run the program.
After the experiment, the rj-11 cable was removed and the jumper cap of JP1 and JP5 was restored.
[operation effect]
The MCU#3 digital tube is constantly being counted and the data is sent by MCU#1 via the rs-485 interface.
File list (Check if you may need any files):
实验3 RS-485双机通信\说明.txt
....................\接收(MCU#3)\Main.C
....................\...........\Main.LST
....................\...........\Main.OBJ
....................\...........\Receive
....................\...........\Receive.hex
....................\...........\Receive.M51
....................\...........\Receive.Opt
....................\...........\Receive.plg
....................\...........\Receive.Uv2
....................\...........\Receive_Opt.Bak
....................\...........\Receive_Uv2.Bak
....................\发送(MCU#1)\main.c
....................\...........\main.LST
....................\...........\main.OBJ
....................\...........\Send
....................\...........\Send.hex
....................\...........\Send.M51
....................\...........\Send.Opt
....................\...........\Send.plg
....................\...........\Send.Uv2
....................\...........\Send_Opt.Bak
....................\...........\Send_Uv2.Bak
....................\...........\STARTUP.A51
....................\...........\STARTUP.LST
....................\...........\STARTUP.OBJ
....................\接收(MCU#3)
....................\发送(MCU#1)
实验3 RS-485双机通信