??? 12/14/05 14:11 Read: times |
#105223 - 9th bit communication Responding to: ???'s previous message |
Vinita said:
can you pls give us an example of how to generate address ,data
to the slave devices .do we send address and data together or seperately one byte for address and one byte for data using 8051 If you have one master and three slaves, then you can use serial data transmission mode 3. In this mode a 9th bit is transmitted, which can be used to distinguish between sending an address byte from master to slaves (9th bit is "1") and sending a data byte from master to selected slave (9th bit is "0"). So, all the slaves are permanently hearing to the RS485 loop. Whenever a byte is transmitted, it's recieved in the SBUF register, an interrupt is invoked, 9th bit is tested and when it's "0", then main programm is continued. If on the other hand the 9th bit is "1", then the (address) byte is checked, whether it coincides with the address of the actual slave. In this case, the actual slave knows that it's addressed now, and that all the following (data) bytes are belonging to him. What can follow to the first address byte is an instruction byte. For instance, "Slave, send your actual sensor reading", or " Slave, recieve new calibration data", or what ever. From the instruction byte it's clear then whether the master is sending or the slave, means which one must be quiet and be prepared to hear. As the 9th bit cannot be furtherly used for the parity check, it can be useful to use another methode for detecting of transmission errors: Sending each byte two times. Kai |
Topic | Author | Date |
rs485 | 01/01/70 00:00 | |
fundamentals! | 01/01/70 00:00 | |
rs485 | 01/01/70 00:00 | |
modbus specifications | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
Protocol | 01/01/70 00:00 | |
pls bear with us | 01/01/70 00:00 | |
9th bit communication | 01/01/70 00:00 | |
rs-4385 fail most of the time because no | 01/01/70 00:00 | |
Mode-3: Automatic Address Recognition | 01/01/70 00:00 | |
THANKYOU![]() | 01/01/70 00:00 |