(sorry, this was submitted earlier, but something didn't work)
Quote:
Originally Posted by m4rtin
(sometimes some characters missing, space characters added etc).
|
The usual cause for anything like this is buffer over-runs. Also possible are data clock mis-matches (ie, inexact baud rates, which should never happen, except in development, but that's no guarantee that it doesn't), incorrect rising/falling edges, incorrect spec compliance (voltage levels are quite widely specified, and it is sometimes cheaper to run right to the very edge of what is allowable, even though that reduces noise margins).
Assuming developed products (as opposed to products in development), there is probably a 95% chance of it being buffer problems, and while they are likely to be caused by the interface itself, there is also the possibility that if, eg, an OS does not respond to characters being present as quickly as happened when the system was originally tested, that could also cause loss of characters.
These usually get worse at higher data rates, so, if there is any flexibility to use lower data rates, that can be worthwhile.
start/stop/parity errors would normally cause wholesale data corruption, so it would be unlikely that these are the issue here, as you would be unlikely to even get the smaller chunks of data through uncorrupted.
Quote:
Originally Posted by m4rtin
Hardware flow control and software flow control doesn't help either. Cable is not near to possible interference sources.
|
You can configure hw flow control in many ways; if you were to count all of the combinations at one end (with the full set of connections, and it is not clear that all will be present or even used correctly) there are probably close on 100 you could use; obviously that squared when you count both ends. Out of those, the majority will not work, and in some cases, only one will work reliably although several may well look to work, if looked at superficially and at a low or unsustained data rates.
SW flow control really ought to always work (if supported at both ends), but it does limit the data that you can send, because if your (explicitly) transmitted data can include ^S/^Q, then that obviously can't work reliably, either.
It probably isn't (external) interference, if you know that you away from other sources of electrical noise and with short cables; it could be failure to connect both ends to the same ground potential. Note that screened cables can prove unhelpful here; while they do reduce noise, they also slow the edges of the data - this is almost certainly irrelevant with such a short connection, but can be a factor with medium length connections.