Blogroll

Powered by Blogger.

Wednesday, 2 April 2014

Control Common Cathode Seven Segment Display using Arduino and 4511

by realfinetime  |  in Seven Segment Display at  12:05


Seven segment displays are commonly used display that has many applications in our day to day life. Seven segment display has seven segments and a dot point by which we can create all numbers from 0 to 9.



Seven segment displays are of two types. Common anode displays and common cathode displays.

Seven segment displays are normally operated using driver ICs. 4511 is a common driver IC used to control Common Cathode seven segment displays.
4511 is normally controlled using a microcontroller. I used arduino to control 4511. Circuit diagram to control one seven segment display using Arduino Uno and 4511 is shown below.

D0, D1, D2, D3, D4, LT, BL and LE are connected to arduino pins. Connections between arduino and 4511 can be tabulated as shown below.





















Functional Block Diagram of 4511.


















Arduino Program to demonstrate the function of LT pin of 4511.

int LT = 7;
int BL = 6;
int LE = 5;

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(LE, OUTPUT); 

  pinMode(D_ZERO , OUTPUT); 
  pinMode(D_ONE  , OUTPUT);
  pinMode(D_TWO  , OUTPUT);  
  pinMode(D_THREE, OUTPUT); 
    
  digitalWrite(LT, LOW);   
  digitalWrite(BL, HIGH);    
  digitalWrite(LE, LOW);   
  
  digitalWrite(D_ZERO   , HIGH);   
  digitalWrite(D_ONE    , LOW);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW); 
}

void loop() 
{
  
}

Output:
When LT is LOW, all of the output segments will be HIGH independant of all the other inputs.


Arduino Program to demonstrate the function of BL pin of 4511.

int LT = 7;
int BL = 6;
int LE = 5;

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(LE, OUTPUT); 

  pinMode(D_ZERO , OUTPUT); 
  pinMode(D_ONE  , OUTPUT);
  pinMode(D_TWO  , OUTPUT);  
  pinMode(D_THREE, OUTPUT); 
    
  digitalWrite(LT, HIGH);   
  digitalWrite(BL, LOW);    
  digitalWrite(LE, LOW);   
  
  digitalWrite(D_ZERO   , HIGH);   
  digitalWrite(D_ONE    , LOW);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW); 
}

void loop() 
{
  
}

Output:

When LT is HIGH, if BL is LOW, then all the segments will be LOW independant of all the other inputs.




Arduino Program to demonstrate the function of LE pin of 4511.

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.

int LT = 7;
int BL = 6;
int LE = 5;

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(LE, OUTPUT); 

  pinMode(D_ZERO , OUTPUT); 
  pinMode(D_ONE  , OUTPUT);
  pinMode(D_TWO  , OUTPUT);  
  pinMode(D_THREE, OUTPUT); 
    
  digitalWrite(LT, HIGH);   
  digitalWrite(BL, HIGH);    
  digitalWrite(LE, LOW);   
  
  digitalWrite(D_ZERO   , HIGH);   
  digitalWrite(D_ONE    , LOW);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW); 
  
  delay(1000);
  
  digitalWrite(LT, HIGH);   
  digitalWrite(BL, HIGH);    
  digitalWrite(LE, LOW);   
  
  digitalWrite(D_ZERO   , LOW);   
  digitalWrite(D_ONE    , HIGH);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW);
  
}

void loop() 
{
  
}

Output:
Above program will display "1". After one second it will display "2".


Now upload the following program.

int LT = 7;
int BL = 6;
int LE = 5;

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(LE, OUTPUT); 

  pinMode(D_ZERO , OUTPUT); 
  pinMode(D_ONE  , OUTPUT);
  pinMode(D_TWO  , OUTPUT);  
  pinMode(D_THREE, OUTPUT); 
    
  digitalWrite(LT, HIGH);   
  digitalWrite(BL, HIGH);    
  digitalWrite(LE, LOW);   
  
  digitalWrite(D_ZERO   , HIGH);   
  digitalWrite(D_ONE    , LOW);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW); 
  
  delay(1000);
  
  digitalWrite(LT, HIGH);   
  digitalWrite(BL, HIGH);    
  digitalWrite(LE, HIGH);   
  
  digitalWrite(D_ZERO   , LOW);   
  digitalWrite(D_ONE    , HIGH);    
  digitalWrite(D_TWO    , LOW); 
  digitalWrite(D_THREE  , LOW);
  
}

void loop() 
{
  
}

Output:
Output will be "1". After one second, output will remain "1" independant of the inputs D0-D3.

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi sir...
    Did u have the full code starting from 0_9 count ..if u have kindly mail me ..
    tanveer40501@gmail.com

    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.