Protecting TTL inputs

I have to connect my arduino to an EEG device that uses TTL lines. However, I am worried that lines may get crossed, or that when the arduino boots, it may have inputs set as outputs.

In other words, what happens when two TTL outputs are tied together, and one is set high, and the other low? This would essentially generate a ton of current, and could easily destroy one of the devices. Can I protect these lines?

The only thing I’ve found on the subject is this quote:

TTL-compatible output devices can typically sink higher levels of current than they can source. Loads that exceed the available source current can, if the sink current is sufficient, be connected between +5 VDC and the output and turned

on by driving the output low = ‘off’.

It seems like a bad idea to risk the very expensive EEG recording device without knowing more.

Series resistors?

While true TTL outputs sink more than they source, in most cases modern CMOS outputs advertised as TTL-compatible sink and source the same amount.

In most cases shorting them together while not a good practice will not destroy them as they are inherently current limited.

Its not wise to connect them to either of the “rails” that’s the power supply or the ground, as those 2 nodes can supply a lot of current.

Most microprocessors come up from reset in a state where the IOs are tri-stated though some have weak pullup resistors. So its up to your software to turn them on gracefully.

But if you are trying to protect something expensive a 1K series resistor is probably a good way to go. But that will limit the rise and fall time on the signals.

All good reasons to use keyed connectors and triple check your wiring before connecting, and then throw a meter on it with a weak pullup/pulldown to check to see which are outputs.

viskr:
While true TTL outputs sink more than they source, in most cases modern CMOS outputs advertised as TTL-compatible sink and source the same amount.

That may well be true of a given pin on a device, or even of all the I/O pins on a device. But I’m not at all comfortable with the notion that it means that the outputs of one device can sink the same amount as the outputs of another device can source.

Eric

Eric is right. I did not mean to imply all CMOS outputs on all devices sink and source the same amount.

However, some rules of thumb do apply. On high pin count devices the sink and source to the specified voltage is typically 2 or 4 mA. Many high drive outputs are rated to 20 mA.

And you have to remember that what goes in, must come out. All the sink currents go through the ground pins on a device. All the source currents come from the power pins. And there are per pin limits on current. So on that 208 pin device, you can’t expect to source 4mA all the time on all the outputs.

This covers what would be called general purpose IOs, those found on micro-controllers.

LED drivers, differential drivers, MOSFET drivers, and … are special purpose devices and can have very different specs.