I am facing some embarrassing problems recently.
After some trouble-shooting, I found that: We have Board-A and Board-B. Board-A and Board-B communicate to each other with a UART TTL Level Communication. The communication cable is around 80cm long. During the communication, I got a lot of UART errors.
My mission is to build a more reliable communication between Board-A and Board-B; but not allowed to modify the hardware design and baud-rate.
To me, it is not wise to use a UART TTL Level Communication between two boards. However, I am being told that, it is very popular to us to use a UART TTL Level Communication between two boards.
I tried to find some articles/documentation to convince the involved people, that, they should not use a UART TTL Level Communication between two boards. But I can not find anything useful. What I could find is something like: The UART usually does not directly generate or receive the external signals used between different items of equipment.
My question is: Where can I find some convincing articles/documentation to convince the involved people? (This is to avoid the future problems.) If I am not allowed to modify the hardware design and baud-rate, what choices do I have to build a more reliable communication?
How does it work with a shorter cable?
Do you have any differential in your PCB grounds or are there things injecting current spikes in the power leads?
TTL 19.2k baud should not be a problem over 80cm.
For reflash and calibration purposes, I have had 40 foot or longer 18 ga cable for a 5v TTL RS-232 at 115.2kbaud without any communication problems.
The drive circuits were a simple CPU -> resistor -> transistor base. Transistor emitter was grounded. Collector had a pullup resistor to +5. Collector was also the controller TX output. Rx circuit was the same except backwards and had base pulldown resistor. A 2N3904 was used. Note, when a 2n2222 was used, certain PCB's had errors at high baud rates due distorted waveforms.
If you can't modify the design or baud rate it sounds like choices are slim if the problem is in the design or UARTs. Perhaps a cable that can clean up any noise or ground potential? Send out some 0x55 or 0xaa's and see what the bits look like.
Chad
The OP:After some trouble-shooting, I found that: We have Board-A and Board-B. Board-A and Board-B communicate to each other with a UART TTL Level Communication. The communication cable is around 80cm long. During the communication, I got a lot of UART errors. which uC all letters and numbers, please which type of cable you speak of middle of cable - avoid connections if you can how small a resistor do you have, to pull up the signals to Vcc, I'd use a R as small as the chips pin max Io allows.
Send out some 0x55 or 0xaa's and see what the bits look like. I'd use 'U' and get a regular square wave
erik
Indeed not!
These are 180cm - and work well over 115200 baud at TTL levels!
www.ftdichip.com/.../USBTTLSerial.htm
Many thanks to everyone.
I am a software engineer, and almost don't know anything about hardware. So I am sorry for that I am not able to provide precise and enough information about the hardware design.
As far as I know, Board-B's (the receiving end) reset circuit is unreliable (a confirmed known issue). When powers on Board-B; there is quite high percentage that, Board-B will fail to work/reset.
Now I understand that, my original assumption is incorrect. TTL Level Communication should NOT be a problem. And since no one mentions software solution in this thread, I think a software solution is not feasible. I will keep Chad's suggestion in mind (a cable that can clean up any noise or ground potential), and wait to see what will be our next step. It seems that we have decided to close this communication error issue.
One more question.
May I assume that, for external communications, RS232 provides a more reliable communication quality than TTL level; so, it provides more tolerance for bad hardware design and cables?
Yes, RS232 is more tolerant, because of the changed voltage levels used as one and zero. With TTL-level signals, you do not have much margin if you fail to keep the two grounds together firmly. That is a reason why RS-232 is specified for up to 15 meters.
Per, many thanks.
Is it?
See: www.8052.com/.../57828
I seem to have lost my copy of the RS232 specification, so I can't re-check that just now - but I'm pretty sure that it was a direct quote from the spec.
Somewhere I have a standard text, and I'm pretty sure it sais 50 feet and max 2500pF.
On the other hand, 50 feet is suitable for 19200 baud - at lower speed you can step up the cable length.
Unfortunately, there is a huge amount of misinformation about RS232 - including in "standard texts" that really should know better!
My original EIA books are currently deep down in storage.For a number of years, I have just made use of pdf versions of language standards, and datasheets/application notes/... for whatever components/modules I'm using. But the TIA-232 standards requires payment, and I normally avoid such standards unless I really do need them - in this case, RS-232 is obsolete.
The most important parameters here is capacitance and the slew-rate control of the driver. So datasheets for some drivers will give more explicit information, based on capacitance and cable length. Then you will be able to find references to 1 km or more depending on cable and baudrate.
But the important thing is that the actual standard was made for 15m/50 feet, which does give an indication that RS-232 itself is designed for longer distances than raw logic-level signals. This was the scope of the previous discussion.
Next thing is that even if you can manage very long cable length with suitable cable capacitance and baudrate, few people will still use RS-232 for really long lengths. If optical isn't an option, then most people would go for a differential solution - RS-422/RS-485 or similar.
Indeed.
In fact, RS232 is specifically designed for the interface between a "modem" (DCE) and a DTE - and it is the purpose of the modem to provide the long-distance link...
the solution to the OPs problem is not making major rework and adding 232 transceivers, the solution is to make the hardware drive of the TTL levels solid
Erik
Drifting yes.
But it whas the OP who did add that additional question. This time about "external" communication.
If the OP wants the thread to drift, then sure I'll play.
I believe that, my ex-hardware-partner in my previous company can make the hardware drive of the TTL levels solid. But I guess that, he will choose RS232 interface instead for many reasons. In the past, I do not need to worry about this kind of problems.
However, in my current company, I don't think "we" know what is solid and robust.
"in my current company, I don't think 'we' know what is solid and robust"
Clearly not!
So you really need to hire someone who does know - either as a permanent employee, or on a temporary/consultancy basis.