10+ Mbit UART part II

Previously I wrote about about my need for high-speed RS-485 interface. I finally had both parts and time to try to set up and test it. I assembled the whole thing on a breadboard to simulate the noisy environment (definitely not because I didn't want to draw a board which might not work).

To reiterate - I got FTDI FT2232H 2 channel multi-protocol USB serializer mini module and two MAX3460 ICs soldered on break-out boards. Some decoupling capacitors and 120 ohm line termination resistors and a bunch of old solid-core CAT5 Ethernet cable (about 30m, cut according to cable markings). The whole setup looks like this:
 Zoomed in on breadboard:
Each of transceivers is connected to one channel of FT2232, used HTerm to communicate over this setup - one channel sends, other receives. There is one catch though - HTerm normally does not support baud rates over 256 000. I figured out, that if you save the config (File/Save config as...), edit the resulting .cfg file and change the baudrate section to:

<Baudrate selected="12000000">300,600,1200,2400,4800,9600,14400,19200,28800,38400,56000,57600,115200,128000,256000,1000000,8000000,12000000</Baudrate>

Then these added options magically appear and actually work. Which is nice. What is not nice, is the fact, that FT232H does not support anything between 8Mbit and 12Mbit. So I'm testing with 12. And as of writing this, seems like about a million byte transfer hasn't had any glitches, despite signals being quite ugly:
Blue trace is 3.3V TX from the FT232 and yellow trace is output from the RS-485 transceiver on the "far end". I'm sending 0x55 to have a nice series of alternating bits, so I can measure the period. Double the period is our data rate, which, according to an oscilloscope is 6.02x2 = 12.04. Some jitter present. What I don't like about this image, is the fact, that the bits are not of equal length, by the looks of it, the transition to logic low happens way too far into the next bit. Too close to the middle, which might mess with the bit detection even at 16 bit oversampling, let alone 8 bit.

What is interesting, that the period doesn't change much at 8Mbit either:
I wonder, if the termination resistors are to blame, coupled with cable capacitance. I also have no pullups/pulldowns on neither of the lines. Maxim datasheet shows "typical connection" with just terminators, but no pulls, while in text they do mention worst case scenario with 380 ohm pulls. A bit more research and experimentation required.

As for noise - I think most of it is stuff picked up from the air, getting rid of all the dangling wiring and using a properly laid out PCB should alleviate some of it.

I'll edit this post later, when I figure the correct resistor network for this setup. Next step - drawing up a board.

No comments:

Post a comment