Blogroll

Powered by Blogger.

Thursday 24 April 2014

Control Common Anode Seven Segment Display Using Arduino and CD4543B

by realfinetime  |  in Seven Segment Display at  21:17

CD4543B can be used to control common anode seven segment display too. Controlling common anode seven segment display using CD4543B is pretty simple. VCC pin of the seven segment display should be connected to the positive

Complete the following circuit.




Truth table of  CD4543B for Common Anode Seven Segment Display.


To control a common cathode seven segment display using CD4543B
PH ( Pin 6 ) should be set HIGH.
LD ( Pin 1 ) should be set HIGH.
BL ( Pin 7 ) should be set LOW.

If all the above conditions are satisfied, then the output will change when the input changes.

If LD goes LOW from HIGH, then the output will be same as the previous output when LD pin was HIGH. Changes in INPUT will not affect the OUTPUT.

If BL goes HIGH, then the seven segment display will turn off and is independant of any other pins.


Now upload the following program to your arduino board. Reset the arduino board if needed.


int Ph  = 6;        //arduino pin connected to the Ph pin of 4543
int BL  = 5;        //arduino pin connected to the BL pin of 4543
int LD  = 11;      //arduino pin connected to the LD pin of 4543


int A   = 7;
int B   = 9;
int C   = 10;
int D   = 8;

void setup()
{     
    // Declare all the pins as OUTPUT pins
  
  pinMode(Ph,  OUTPUT);
  pinMode(BL,  OUTPUT);
  pinMode(LD, OUTPUT);

  pinMode(A , OUTPUT);
  pinMode(B  , OUTPUT);
  pinMode(C  , OUTPUT); 
  pinMode(D, OUTPUT);

}

void loop()
{

    // Display 0

  digitalWrite(Ph,  HIGH); 
  digitalWrite(BL,  LOW);   
  digitalWrite(LD,  HIGH); 

  digitalWrite(A , LOW); 
  digitalWrite(B , LOW);   
  digitalWrite(C , LOW);
  digitalWrite(D , LOW);

  delay(1000);

    // Display 1

  digitalWrite(A , HIGH); 
  digitalWrite(B , LOW);   
  digitalWrite(C , LOW);
  digitalWrite(D , LOW);

  delay(1000);

    // Display 2

  digitalWrite(A , LOW); 
  digitalWrite(B , HIGH);   
  digitalWrite(C , LOW);
  digitalWrite(D , LOW);

  delay(1000);

    // Display 3

  digitalWrite(A , HIGH); 
  digitalWrite(B , HIGH);   
  digitalWrite(C , LOW);
  digitalWrite(D , LOW);

  delay(1000);

    // Display 4

  digitalWrite(A , LOW); 
  digitalWrite(B , LOW);   
  digitalWrite(C , HIGH);
  digitalWrite(D , LOW);

  delay(1000); 
}


Output of the above program is given below.


To get an idea about the working of LD pin, upload the following program.

int Ph  = 6;       //arduino pin connected to the Ph pin of 4543
int BL  = 5;       //arduino pin connected to the BL pin of 4543
int LD  = 11;     //arduino pin connected to the LD pin of 4543


int A   = 7;
int B   = 9;
int C   = 10;
int D   = 8;

void setup()
{
    // Declare all the pins as OUTPUT pins

  pinMode(Ph,  OUTPUT);
  pinMode(BL,  OUTPUT);
  pinMode(LD, OUTPUT);

  pinMode(A , OUTPUT);
  pinMode(B  , OUTPUT);
  pinMode(C  , OUTPUT);
  pinMode(D, OUTPUT);

}

void loop()
{

    // Display 0

  digitalWrite(Ph,  HIGH);
  digitalWrite(BL,  LOW);
  digitalWrite(LD,  HIGH);

  digitalWrite(A , LOW);
  digitalWrite(B , LOW);
  digitalWrite(C , LOW);
  digitalWrite(D , LOW);

  delay(1000);

    // Display 1

  digitalWrite(Ph,  HIGH);
  digitalWrite(BL,  LOW);
  digitalWrite(LD,  HIGH);

  digitalWrite(A , HIGH);
  digitalWrite(B , LOW);
  digitalWrite(C , LOW);
  digitalWrite(D , LOW);

  delay(1000);

    // Display 2

  digitalWrite(Ph,  HIGH);
  digitalWrite(BL,  LOW);
  digitalWrite(LD,  HIGH);

  digitalWrite(A , LOW);
  digitalWrite(B , HIGH);
  digitalWrite(C , LOW);
  digitalWrite(D , LOW);

  delay(1000);

    // Display 2 itself

  digitalWrite(Ph,  HIGH);
  digitalWrite(BL,  LOW);
  digitalWrite(LD,  LOW);

  digitalWrite(A , HIGH);
  digitalWrite(B , HIGH);
  digitalWrite(C , LOW);
  digitalWrite(D , LOW);

  delay(1000);

    // Display 4

  digitalWrite(Ph,  HIGH);
  digitalWrite(BL,  LOW);
  digitalWrite(LD,  HIGH);

  digitalWrite(A , LOW);
  digitalWrite(B , LOW);
  digitalWrite(C , HIGH);
  digitalWrite(D , LOW);

  delay(1000);
}

Output of the above program will be:

2 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



Proudly Powered by Blogger.