Arduino mega continuity and short tester

A common test is a "walking one's" test where you drive one line high while driving all the other lines low. Then of course, read the data at the other end to make sure it matches. Then, step to next line, etc...

In binary, a 4-bit walking one looks like this:
0001
0010
0100
1000

It pretty easy to identify an open or shorted line, but determining which line is shorted to which, or exactly how the cable is mis-wired or defective takes a bit more "software".

Of course, you need current limiting resistors so a short doesn't fry your Arduino.

...Where I work we test 8-bit I/O ports (not cables & not Arduino) with walking ones, or some of our tests just write all of the binary values from 0-255 (0-FF hex) and when there's an error it shows the read & write hex* values so we can figure-out what's wrong. (It usually takes a little more testing to figure-out exactly what's wrong, and there's a way we can type-in hex values to test.)

...I've seen some old-time testers that simply have an LED on each line. One LED at a time comes on in-sequence and you have watch to see if one of the LEDs doesn't come-on, or if two LEDs come-on at once, or if they come-on out-of sequence.

  • Hex easier than decimal because it's easy to convert between hex an binary. You can learn to do hex-binary conversions of any size in your head.