2
\$\begingroup\$

I have a custom circuit board containing an ATMEGA328 and an FT232R for bus interface via the RX/TX pins on the ATMEGA. I also have an off board serial connection that I would like to access the ATMEGA328. Basically, I want to be able to specify using either the off board serial interface or the FT232 serial interface to the ATMEGA. These would never attempt to access the ATMEGA RX/TX pins at the same time.

The solution I came up with was to use a tristate buffer to either connect or disconnect the off board serial connections. The FT232R is always connected to the ATMEGA328.

Here's the problem. Everything works fine if I don't add the tristate buffer to the board. As soon as I add the tristate buffer, the ATMEGA heats up and the RX/TX interface to the FT232 becomes inoperable. This occurs even with the off board RX/TX connections being left floating and with the tristate enable pins pulled high through a 10K resistor (which should set the NL27WZ125 dual tristate buffer outputs to a high Z state).

I figure I am missing something about correct use of the tristate buffer, but I don't know what it is. When the enable pins are pulled high, the tristate outputs should be in a high impedance state and shouldn't affect the circuit at all.

I have triple checked all on board connections, and again, everything works fine until I physically solder the tristate buffer chip to the board.

Here's a simplified schematic (wish I had enough points to post the actual schematic as a picture).

schematic

simulate this circuit – Schematic created using CircuitLab

Here's the initial Eagle Schematic (sorry for the incorrect schematic from earlier):

Initial Eagle schematic

I also realized that the RX buffer was connected in the wrong direction, so I think it should go this way: Fixed Eagle schematic

However, I don't see how the initial Eagle Schematic should cause the problem described in the original question.

\$\endgroup\$
  • \$\begingroup\$ Add a link to an image of your real schematic. Some else can edit it into your posting. \$\endgroup\$ – DoxyLover Jul 14 '13 at 17:49
3
\$\begingroup\$

As far as I can see, with the OE# pin held high, the buffer outputs should be tri-stated and not cause the problem you are seeing. So I cannot help you with that.

HOWEVER, I see other problems when the buffer is enabled. First, one of your buffers is reversed! BUF2 is feeding to the ATMEGA TX pin which is also an output. In fact, you don't need BUF2 (there). you can just feed the TX pin to both the FT232R and the external device's RX pins.

Second, You need another buffer to tri-state the TX output of the FT232R. Otherwise, when BUF1 is enabled, it will fight with it. This buffer needs the OE# pin inverted.

schematic

simulate this circuit – Schematic created using CircuitLab

Note that the NOT gate is not required as a discrete part. Instead, you could use two GPIOs, one to enable each buffer. Just make sure that you done enable both at once.

\$\endgroup\$
  • \$\begingroup\$ @doxie Thanks for the response. You commented on my initially incorrect schematic. Sorry about that. The correct ones are in the question now that I have sufficient points to add an image. I'm still stumped on why the connection as depicted in the "Initial Eagle Schematic" could cause an overheating condition. \$\endgroup\$ – Robert Groves Jul 14 '13 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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