??? 08/18/10 11:25 Read: times |
#178083 - Reduced Baud Rate Responding to: ???'s previous message |
With the high baud rate of 31250, the system used to run unevenly and sometimes used to hang and restart.
As a trial and error scenario, we tried with reducing the baud rate from 31250 to 3906. Then, we found a kind of stability in the system. The system is running steadily. Our communication stream patterns are as shown: a) (MASTER -> SLAVE): ADDRESS A SLAVE ( by sending command byte - TB8 = 1) - WAIT FOR ACKNOWLEDGE SEND MASTER PROTOCOL START BYTE (TB8 = 0) - WAIT FOR DATA ACKNOWLEDGE SEND DATA FRAME TYPE BYTE (TB8 = 0) - WAIT FOR DATA ACKNOWLEDGE SEND DATA BYTE (TB8 = 0) - WAIT FOR DATA ACKNOWLEDGE SEND DATA BYTE (TB8 = 0) - WAIT FOR DATA ACKNOWLEDGE SEND MASTER PROTOCOL END BYTE (TB8 = 0) - WAIT FOR DATA ACKNOWLEDGE b) (SLAVE -> MASTER): Slave gets a chance to send its data.... SEND SLAVE PROTOCOL START BYTE - WAIT FOR DATA ACKNOWLEDGE SEND DATA FRAME TYPE BYTE (TB8 = 0) - WAIT FOR DATA ACKNOWLEDGE SEND DATA BYT - WAIT FOR DATA ACKNOWLEDGE SEND DATA BYTE - WAIT FOR DATA ACKNOWLEDGE SEND SLAVE PROTOCOL END BYTE - WAIT FOR DATA ACKNOWLEDGE As far as the state of communication is concerned, there is no problem with sending / receiving data bytes. At some point of time, a slave (which is intended to get addressed after receiving the common Command Byte and send the acknowledge) is not responding. After counting 5 fails, we are treating it as a failure case. Q1. How to address a failed slave back and how to refresh the communication? Q2. What is the difference between the performance in communication with using 'Fixed' and 'Variable' baud rates? Q3. How to judge how much baud rate to use? |