Blogroll

Powered by Blogger.

Friday 4 April 2014

Control Two Common Cathode Seven Segment Displays Using Arduino And 4511

by realfinetime  |  in Seven Segment Display at  21:10

Important:

Before starting this tutorial ,don't forget to read the tutorial on Controlling a Seven Segment Display using Arduino and 4511 driver IC.

Circuit diagram to control two seven segment displays using arduino and 4511 driver ICs is shown below.


Data inputs D0-D3, LT and BL pins of both the ICs are controlled from the same pins of arduino. LE pins of both the ICs are controlled by seperate pins of arduino as shown in the circuit diagram.





If  LT and BL pins of both the ICs are HIGH, then each IC can be controlled individually using LE
pin. When LE is LOW and BL is HIGH, state of segments Qa - Qg will be determined by the state of  D0 - D3. When LE goes HIGH, last data present on D0 - D3 will be stored in latches and the output segments Qa - Qg will remain unchanged.


Simple program to demonstrate how Arduino controlls two Seven Segment Displays using 4511 driver IC. Output will be as shown in the following image.

int LT   = 7;
int BL   = 6;
int LE1  = 5;
int LE2  = 4;

int D_ZERO    = 8;
int D_ONE     = 9;
int D_TWO     = 10;
int D_THREE   = 11;

void setup() 
{                
  pinMode(LT,  OUTPUT); 
  pinMode(BL,  OUTPUT);
  pinMode(LE1, OUTPUT); 
  pinMode(LE2, OUTPUT); 

  pinMode(D_ZERO , OUTPUT); 
  pinMode(D_ONE  , OUTPUT);
  pinMode(D_TWO  , OUTPUT);  
  pinMode(D_THREE, OUTPUT); 

}

void loop() 

                            /*  Following code will display 00  */  

  digitalWrite(LT,  HIGH);   
  digitalWrite(BL,  HIGH);    
  digitalWrite(LE1, LOW);   
  digitalWrite(LE2, LOW);
  
  digitalWrite(D_ZERO   , LOW);   
  digitalWrite(D_ONE    , LOW);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW); 
  
  delay(1000);

                            /*  Following code will display 01  */ 
      
  digitalWrite(LT,  HIGH);   
  digitalWrite(BL,  HIGH);    
  digitalWrite(LE1, HIGH);   
  digitalWrite(LE2, LOW);
  
  digitalWrite(D_ZERO   , HIGH);   
  digitalWrite(D_ONE    , LOW);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW); 
  
  delay(1000);

                            /*  Following code will display 22  */ 

  digitalWrite(LT,  HIGH);   
  digitalWrite(BL,  HIGH);    
  digitalWrite(LE1, LOW);   
  digitalWrite(LE2, LOW);
  
  digitalWrite(D_ZERO   , LOW);   
  digitalWrite(D_ONE    , HIGH);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW); 
  
  delay(1000);
  
                            /*  Following code will display 32  */   
  
  digitalWrite(LT,  HIGH);   
  digitalWrite(BL,  HIGH);    
  digitalWrite(LE1, LOW);   
  digitalWrite(LE2, HIGH);
  
  digitalWrite(D_ZERO   , HIGH);   
  digitalWrite(D_ONE    , HIGH);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW); 
  
  delay(1000);
  
                            /*  Following code will display 44  */   
  
  digitalWrite(LT,  HIGH);   
  digitalWrite(BL,  HIGH);    
  digitalWrite(LE1, LOW);   
  digitalWrite(LE2, LOW);
  
  digitalWrite(D_ZERO   , LOW);   
  digitalWrite(D_ONE    , LOW);    
  digitalWrite(D_TWO    , HIGH); 
  digitalWrite(D_THREE  , LOW); 
  
  delay(1000);
}

Output of the above program will be as shown in image given below.

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



Proudly Powered by Blogger.