Taisir Jibian Rahi
Published © MIT

IC Tester (Logic Gates)

The main purpose of this project is to check logic gate IC, whether the IC is working properly or not.

IntermediateFull instructions providedOver 2 days12,666
IC Tester (Logic Gates)

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
LED (generic)
LED (generic)
×5
Resistor 220 ohm
Resistor 220 ohm
×5
Jumper wires (generic)
Jumper wires (generic)
×30
Zif Socket
×1
Breadboard (generic)
Breadboard (generic)
×1
Power Bank
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
RGB Backlight LCD - 16x2
Adafruit RGB Backlight LCD - 16x2
×1

Software apps and online services

Arduino IDE
Arduino IDE
Fritzing

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Solder Flux, Soldering
Solder Flux, Soldering
Mastech MS8217 Autorange Digital Multimeter
Digilent Mastech MS8217 Autorange Digital Multimeter
Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

IC Tester (Logic Gates) Circuit Diagram

Code

IC Tester (Logic Gates) Code

Arduino
int gatevalue; //Declare all of the variables
int inputPin = 8;
int Output1Pin = 6;
int Output2Pin = 7;
int led = 13;
int led2 = 12;
int led3 = 11;
int led4 = 10;
int led5 = 9;
//Begin declaring what pin is what
void setup(){
Serial.begin(9600);
pinMode (Output1Pin, OUTPUT);
pinMode (Output2Pin, OUTPUT);
pinMode (inputPin, INPUT);
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
gatevalue = 0;
}
void loop(){
gatevalue = gatevalue + (check_Gate(false, false)*8); //When an input is HIGH it will add a value to the gatevalue
gatevalue = gatevalue + (check_Gate(false, true)*4); //and each gate will have a different gatevalue.
gatevalue = gatevalue + (check_Gate(true, false)*2);
gatevalue = gatevalue + (check_Gate(true, true)*1);
switch (gatevalue){
case 1:
Serial.println("The gate is an AND gate."); //When gatevalue is 1 it is an AND gate
digitalWrite(led, LOW); //if gate is in, light is off
digitalWrite(led2, LOW); // AND gate truth table outputs are 0, 0, 0, 1 which is how the LEDs are set up
digitalWrite(led3, LOW);
digitalWrite(led4, LOW);
digitalWrite(led5, HIGH);
break;
case 6:
Serial.println("The gate is an XOR gate.");
digitalWrite(led, LOW); //if gate is in, light is off
digitalWrite(led2, LOW);//Truth table values
digitalWrite(led3, HIGH);
digitalWrite(led4, HIGH);
digitalWrite(led5, LOW);
break;
case 7:
Serial.println("The gate is an OR gate.");
digitalWrite(led, LOW); //if gate is in, light is off
digitalWrite(led2, LOW); //Truth table values
digitalWrite(led3, HIGH);
digitalWrite(led4, HIGH);
digitalWrite(led5, HIGH);
break;
case 8:
Serial.println("The gate is an NAND gate.");
digitalWrite(led, LOW); //if gate is in, light is off
digitalWrite(led2, HIGH); //Truth table values
digitalWrite(led3, HIGH);
digitalWrite(led4, HIGH);
digitalWrite(led5, LOW);
break;
case 11:
Serial.println("The gate is an XNOR gate.");
digitalWrite(led, LOW); //if gate is in, light is off
digitalWrite(led2, HIGH); //Truth table values
digitalWrite(led3, LOW);
digitalWrite(led4, LOW);
digitalWrite(led5, HIGH);
break;
default:
Serial.println("ERROR: Gate Not Present.");
digitalWrite(led, HIGH); //if gate is not in, light is on
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
digitalWrite(led4, LOW);
digitalWrite(led5, LOW);
}
gatevalue = 0;
delay(1000);
}
int check_Gate(int output1, int output2){
int x;
digitalWrite(Output1Pin, output1);
digitalWrite(Output2Pin, output2);
delay(5); // Make sure the signal has time to propogate through the gate.
x = digitalRead(inputPin);
return x;
}

Credits

Taisir Jibian Rahi

Taisir Jibian Rahi

7 projects • 7 followers
Never regret in life.

Comments