0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

I am using the MAX3323EEPE Maxim IC in order to attempt to take RS-232 output from a peripheral and shift it down to TTL logic levels so a small AVR processor can communicate serially with said peripheral.

This IC in particular is a 16-pin DIP as it only has one channel for RX/TX. I am using 5 V logic on the MCU side and have chosen the capacitors according to the datasheet.

I also attached a picture of the rat's nest breadboard I am testing it on.

enter image description here

I know the colors are horrible but this is what I had on me. To clarify, you can see the four required capacitors on the left, sized for 5 V. The bottom two pins on the left side are RX/TX. I bridged the power and ground rails. One of the wires to ground on the right side (white cable, 3rd from the bottom) goes to my MCU ground, and the green cable on the power rail, 4th from the bottom goes to MCU 5 V. First red cable on the left ground rail goes to the ground pin on the RS-232 output.

The only other addition is that I added a 0.1 μF ceramic capacitor from the VCC pin #18 (top right of MAX) to ground just for decoupling as is specified in the datasheet. After that bypass the VCC is connected to the power rail (which is at 5 V via the MCU).

I poked an LED into the TX of the RS-232 side and am getting 0.2 second "heartbeats" as is expected from the peripheral, but when putting the LED on RX/TX on the TTL side it shows both as high, the bottom right pin #9 as particularly high (LED is much brighter on that trace).

I feel as though I am missing something extremely stupid but given all the permutations of switching RX and TX and switching which side is TTL vs. RS-232 I am sure I have toasted the IC at this point.

In the interest of not burning another IC if I already have, what are your thoughts on why I am seeing such odd behavior?

\$\endgroup\$
19
  • 2
    \$\begingroup\$ You are likely following a schematic of some sort. You'll get more input if you include the schematic in your question. Edit the question and use the built in schematic editor to reproduce what you have built or attach an image of the schematic (citing the source). More details about your source peripheral would also be helpful. \$\endgroup\$ Commented Feb 14 at 19:47
  • \$\begingroup\$ I do not have an example I am working off of, just the linked datasheet. That sheet does however have an example loopback circuit in it. I will rig up a schematic and update asap. \$\endgroup\$
    – BitBrigade
    Commented Feb 14 at 19:55
  • \$\begingroup\$ When you poked the LED there, did you use a series resistor for the LED? Can you clarify what you think is odd behaviour, what is the exact setup and what do you expect or don't expect? \$\endgroup\$
    – Justme
    Commented Feb 14 at 20:13
  • \$\begingroup\$ I notice that the RX or TX have enable pins. You didn't mention them. \$\endgroup\$
    – Wendall
    Commented Feb 14 at 20:17
  • \$\begingroup\$ @Wendall TXenable and RXenable are both driven high along with VL and SHDN. \$\endgroup\$
    – BitBrigade
    Commented Feb 14 at 20:41

1 Answer 1

1
\$\begingroup\$

It's an RS-232 transceiver.

The TTL side is supposed to idle at logic high.

UARTs idle high too. As the tranceivers invert, it makes a TTL logic high to match a RS-232 negative voltage.

It is unclear how you have connected it, but MCU TXD output must go to TTL side transmitter input TIN and thus TOUT is the RS-232 transmit output.

Likewise, RS-232 receive input is RIN, which is ROUT on the TTL output side which must connect to MCU RXD input.

And poking a LED to any of the data lines without a series resistor is a poor idea. Not only do you risk damaging the LED, but without a resistor, the LED clamps the voltage to its forward voltage, and it will likely draw too much current that likely exceeds MCU or transceiver absolute maximum safe current limits and thus might damage the ICs too. Use a resistor, or measure things with tools like multimeter, oscilloscope or logic analyzer.

Also if you did connect the RS-232 side to the MCU, it sure may stop working or get damaged permanently from the over- and undervoltage. It does have protection, so it might survive, but any excess current clamped by IO protection to supply might raise the supply voltage too high.

And the LED should not have been in series. For example: MCU logic inputs are high impedance CMOS inputs. Under normal circumstances, no current will flow into and out of a CMOS input pin. Putting a LED between a logic input and logic output both won't make the LED light up as there will be no current through it to light it up as there is no voltage difference, and even if there would be a slight current or voltage difference due to internal pull-up or pull-down resistors, the voltage drop over a LED would make the input not see proper logic level signals between the required logic level thresholds.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.