Fool Proofing My Arduino IC Checker
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.