??? 10/17/06 14:08 Read: times |
#126576 - Checksums are not spackle Responding to: ???'s previous message |
Andy said:
Shouldn't be any problem at all with a proper interrupt-driven, buffered UART "driver" Wrong, wrong, wrong! How can you say this? Depending on how long his timer interrupt takes and how fast he wants to run the motor, there may not even be enough time to handle the motor by itself, let alone the message handling on top of it. Yu needs to make measurements we have been discussing before anyone can say "shouldn't be any problem at all". Andy said:
However, you should design your serial protocol to be tolerant of the odd dropped character... True. You should always design your serial protocols to be tolerant of the odd dropped or garbled character, because sometimes they just happen. But you should not a design a system where you expect dropped characters to result from things that you control. In this particular case, it would be wrong to design the system so close to the edge that characters were occasionally dropped because there was not time to process them, and then hope to cover up the problem with a fancy message protocol. Checksums and error correrction and message retries are appropriate for dealing with noisy communications channels. They are not appropriate for trying to patch up holes in a poor systems design. -- Russ |