Blogroll

Powered by Blogger.

Thursday, 24 April 2014

Control Common Cathode Seven Segment Display Using Arduino and CD4543B

by realfinetime  |  in Seven Segment Display at  07:32

I had already published my blog on controlling seven segment display using 4511. In this blog we will see the method of controlling seven segment display using Arduino and 4543 driver IC. CD4543B is amazing by it's ability to control both Common Anode as well as Common Cathode seven segment displays.

Complete the circuit as shown in the following image.


Important* - Don't forget to put some resistors ( 1 KOhm ) in series with your segments.


Truth table of  CD4543B for Common Cathode Seven Segment Display.














To control a common cathode seven segment display using CD4543
PH ( Pin 6 ) should be set LOW.
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,  LOW);
  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 will be:


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,  LOW);
  digitalWrite(BL,  LOW);
  digitalWrite(LD,  HIGH);

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

  delay(1000);

    // Display 1

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

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

  delay(1000);

    // Display 2

  digitalWrite(Ph,  LOW);
  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,  LOW);
  digitalWrite(BL,  LOW);
  digitalWrite(LD,  LOW);

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

  delay(1000);

    // Display 4

  digitalWrite(Ph,  LOW);
  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:

  1. I latterly came throughout your weblog through Google and located it to be informative and interesting article, surely it’s a notable weblog. suitable process preserve it up.

    ReplyDelete
  2. Can the 4543 provide enough current for the LED segments? Asking because its meant for LCD segments.

    ReplyDelete

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.