Fool Proofing My Arduino IC Checker I am creating an IC checker for some high school juniors since a faulty IC can be a nuisance of a bug to find when bread-boarding. These ICs are all simple TTL gating from the 74LS series; the set I am using are all 14-pin and have VCC and GND at pin 14 and 7 respectively.

Thus far my prototype's hardware looks like this:


14 digital pins to connect to the IC inputs/outputs
1 analog pin reading a joystick to navigate through the IC options
1 analog pin set to digital read as a button, which starts the checking process
1 analog pin writing to an LED to indicate whether the IC is valid
2 analog pins (SDA and SCL) as a serial bus to control my display


I actually have the prototype working for a few ICs, but I am concerned that these high school students may test an IC under the wrong selection. Since the digital pins have to dynamically change input/output depending which IC its checking, this allows for inputs and outputs to be mismatched, which could prove fatal to both the IC and the Arduino board.

I want to know if there is a way to check that inputs and outputs are misaligned without having serious electrical failure. Possible some advanced pin control I am unaware of?

Also, if you could answer my question with an example with the 74LS00, whose pinout is diagrammed below and datasheet can be found here.
I would connect each of the IC's IO pins to both a digital output and
a digital (or analog) input of the Arduino, like this:







simulate this circuit &ndash; Schematic created using CircuitLab

Drive each pin with the digital output, alternatively LOW and HIGH.
While doing this, read the pin voltage through your input:


If the IC pin is an input, you will have no significant voltage drop
through the protection resistor. Your reading should be LOW when
driving the pin LOW and HIGH when driving it HIGH.
If the IC pin is an output, you will have 5&nbsp;V through the
resistor whenever the IC's output value doesn't match your Arduino
output. The reading on your input will be independent of the level of
your output.


Obviously, an Uno doesn't have enough I/O pins to implement this idea.
You could use a Mega instead. Notice also that with this setup you don't
need the joystick input: you could just test for every known IC type
until you find one that matches the observed behavior, then display the
part number on your LCD.