Blogroll

Powered by Blogger.

Saturday, 26 July 2014

Control 7404, NOT Gate IC, Using Arduino Mega

by realfinetime  |  in NOT Gate at  02:54

          We have already seen, controlling 7404 using switch. Controlling 7404 using Arduino is more simple. Circuit is done as shown in the following diagram. An arduino mega is used to control 7404. 5V for IC is supplied from the 5V pin of Arduino Mega. Ground is given to the, GND pin of Arduino. Output is connected to an LED through a current limiting resistor to protect LED from overcurrent. Pull down resistor is not needed in this circuit because, when the arduino digital pin outputs LOW, voltage level at this digital pin will be less than 2V which will give LOW voltage at the NOT gate input. But in switch controlling of 7404 , pull down resistor must be connected.



Pinout diagram of 7404 is given below

          Each 7404 has six NOT gates arranged as shown in the following diagram. First NOT gate is used for this circuit.

Working of Circuit

          Gate input is connected to the 13th digital pin of Arduino. When the digital pin outputs a HIGH voltage, gate input will be at logical HIGH and gate output will be LOW. This will turn off the LED. Similarly when the digital pin outputs a LOW voltage, gate input will be at logical LOW and the gate output will be HIGH. This will turn off the LED. Truth table is given below.
If the circuit is completed, upload the following program to your Arduino board.

// NOT gate input is connected to the Digital Pin 13 of Arduino
// give it a name:
int NOT_input = 13;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(NOT_input, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(NOT_input, HIGH);   // Give HIGH at the NOT gate input
  delay(1000);               // wait for a second
  digitalWrite(NOT_input, LOW);    // Give LOW at the NOT gate input
  delay(1000);               // wait for a second
}

          If the uploading is successfull, LED at the output of logic gate will blink in one second delay. An inbuilt LED is connected to the 13th pin of arduino. When this LED turn on, LED at the gate output will turn off and vice versa.

0 comments:

IMPORTANT NOTICE

All the circuits, published in this blog is only after testing and getting proper results in my private lab. When you try these circuits, you should check the supply voltage, polarity of components, presence of childrens nearby and shorts in the circuits. This website will not be responsible for any harm happened to you or your components caused by your carelessness.

For More Electronic Tips

Blog Archive

Proudly Powered by Blogger.