| ??? 11/05/03 10:44 Read: times |
#57857 - RE: RS485 software Responding to: ???'s previous message |
Shahzad:
The link you showed to the Atmel Data Sheet shows in the schematic, the UART of the AM89C2051 connected to an RS485 driver/receiver. There is no RS232 in this circuit. RS232 is just like you discovered about RS485, it defines only the physical layer of signal transmissions. All other things like communication protocols, error handling and others are not defined and they are left to be handled in software. An extra control line is needed from another port pin to enable/disable the RS485 driver onto the bus. RS485 communications does NOT need collision detect if you implement the communications protocol correctly. As a matter of fact, attempted collision detection on an RS485 bus is unreliable at best. The proper protocol to use for a RS485 bus is to organize all devices into a order where one device is the MASTER and all others are SLAVE devices. In this scheme all SLAVE devices keep quiet until the MASTER instructs one particular slave to communicate. The MASTER determines the timing sequences and selects which SLAVE should be the one to communicate. The protocol design of how to achieve this is quite up to you. I have found the best way to be to organize the communication into packets. Each packet contains addressing information, command/status information, and any applicable additional data to go along with the command/status. It can also be a good idea to include packet validation information such as a CRC or other type of check code. The diagram below shows a time line of how packet traffic is done with a MASTER / SLAVE system.
Hope this helps you. Michael Karas |
| Topic | Author | Date |
| RS485 software | 01/01/70 00:00 | |
| RE: RS485 software | 01/01/70 00:00 | |
| RE: Russell | 01/01/70 00:00 | |
| RE: RS485 software | 01/01/70 00:00 | |
| RE: RS485 software | 01/01/70 00:00 | |
| RE: RS485 software | 01/01/70 00:00 | |
| RE: RS485 software | 01/01/70 00:00 | |
| RE: Erik, Michael, sanjeev | 01/01/70 00:00 | |
| RE: Erik, Michael, sanjeev | 01/01/70 00:00 | |
RE: Erik, Michael, sanjeev | 01/01/70 00:00 |



