Test 74xx (TTL) and 4xxx (CMOS) logic ICs using an Arduino UNO. Sends test vectors over serial from a Python script, the Arduino applies them to the chip under test and reports back whether outputs match expectations.
Based on the work done by JorBi.
- Arduino UNO
- PlatformIO (for building/flashing the firmware)
- Python 3 with
pyserial - 680 Ohm resistors between the Arduino pins and the IC under test
-
Flash the firmware to the Arduino:
cd firmware pio run -t upload -
Install the Python dependency:
pip install pyserial
The IC pins are mapped to Arduino pins as follows. The mapping shifts based on IC package size (14-pin or 16-pin) so the IC is always centered.
| IC pin (14-pin) | IC pin (16-pin) | Arduino pin |
|---|---|---|
| - | 1 | 6 |
| 1 | 2 | 7 |
| 2 | 3 | 8 |
| 3 | 4 | 9 |
| 4 | 5 | 10 |
| 5 | 6 | 11 |
| 6 | 7 | 12 |
| 7 | 8 | GND |
| 8 | 9 | 5 |
| 9 | 10 | 4 |
| 10 | 11 | 3 |
| 11 | 12 | 2 |
| 12 | 13 | 13 |
| 13 | 14 | A0 |
| 14 | 15 | A1 |
| - | 16 | A2 |
python3 test.py <serial-port> <test-file>Test files are in the data/ directory, named as <pin-count>-<chip-number>.dat (e.g. 16-74139.dat). Over 170 chips are included.
The script exits with code 0 if all tests pass, or 1 if any output mismatch is detected.
A chip that fails (mismatched outputs shown with X: prefix):
$ python3 test.py /dev/ttyACM0 data/16-74139.dat
RST
-> 101HHHHGHHHH011V
<- O:101HHHHGHHHH011V
-> 110HHHHGHHHH101V
<- X:110LHHHGHHHH101V
-> 000LHHHGHHHL000V
<- O:000LHHHGHHHL000V
-> 010HLHHGHHLH010V
<- X:010LLHHGHHLH010V
RST
Each character in a test vector represents one IC pin:
| Symbol | Meaning |
|---|---|
0 |
Drive pin LOW (input) |
1 |
Drive pin HIGH (input) |
C |
Clock pulse (LOW-HIGH-LOW trigger) |
L |
Expect LOW output |
H |
Expect HIGH output |
X |
Don't care (output ignored) |
G |
GND (fixed by hardware) |
V |
VCC (supply voltage) |
Unlicense - public domain.
