Pages

Tuesday 4 November 2014

Arduino Program to Display 0 to 99 in Two SSDs - 7490 + Two 4511 ICs (Part 8 of 9)

<<<<  Read Previous Part (Part 7)

          Arduino program to display from 0 to 99 in one second delay, in the seven segment displays, is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE1 = 10;
int LE2 = 9;

int i=0, j=0, k=0, first_digit=10, second_digit=10;

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

// the loop routine runs over and over again forever:
void loop() { 
  for(k=0;k<second_digit;k++)
  {
    for(j=0;j<first_digit;j++)
    {
      digitalWrite(R01_and_R02, HIGH);  
      digitalWrite(LE1, LOW);
      digitalWrite(R01_and_R02, LOW);
      for(i=0;i<k;i++)
      {
        digitalWrite(INPUT_A, HIGH);
        digitalWrite(INPUT_A, LOW);   
      }
      digitalWrite(LE1, HIGH);
  
      digitalWrite(R01_and_R02, HIGH);  
      digitalWrite(LE2, LOW);
      digitalWrite(R01_and_R02, LOW);
      for(i=0;i<j;i++)
      {
        digitalWrite(INPUT_A, HIGH);
        digitalWrite(INPUT_A, LOW);   
      }
      digitalWrite(LE2, HIGH);  
      delay(1000); 
    }
  }
}

Output will be 0 - 99 displayed in the seven segment displays.


Next : Watch the Video Demonstration >>>>

Program to Display 64 & 95 in Two SSDs - Arduino + 7490 + Two 4511 (Part 7 of 9)

<<<<  Read Previous Part (Part 6)

          Arduino program to display "64" and "95" in one second delay, in the seven segment displays, is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE1 = 10;
int LE2 = 9;

int i=0, j=0, k=0, first_digit=10, second_digit=10;

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

// the loop routine runs over and over again forever:
void loop() {   
  digitalWrite(R01_and_R02, HIGH);    
  digitalWrite(LE1, LOW);  
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<6;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  digitalWrite(LE1, HIGH); 
  
  digitalWrite(R01_and_R02, HIGH);   
  digitalWrite(LE2, LOW);
  digitalWrite(R01_and_R02, LOW);  
  for(i=0;i<4;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  digitalWrite(LE2, HIGH);  
  
  delay(1000);  
    
  digitalWrite(R01_and_R02, HIGH);    
  digitalWrite(LE1, LOW);  
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<9;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }  
  digitalWrite(LE1, HIGH);
  
  digitalWrite(R01_and_R02, HIGH);     
  digitalWrite(LE2, LOW);
  digitalWrite(R01_and_R02, LOW);  
  for(i=0;i<5;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  } 
  digitalWrite(LE2, HIGH);  
  delay(1000); 
}

Output will be 65 and 95 displayed in the seven segment displays in one second delay.

Algorithm of program is given below.

Make LE of first 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send six HIGH to LOW transitions to INPUT A of 7490. This will display "6" in the first seven segment display.

Make LE of first 4511 HIGH, so that further changes in the input (D0 - D3) of first 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).


Make LE of second 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send four HIGH to LOW transitions to INPUT A of 7490. This will display "4" in the second seven segment display.

Make LE of second 4511 HIGH, so that further changes in the input (D0 - D3) of second 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay 1 second.

Make LE of first 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send nine HIGH to LOW transitions to INPUT A of 7490. This will display "6" in the first seven segment display.

Make LE of first 4511 HIGH, so that further changes in the input (D0 - D3) of first 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).


Make LE of second 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send five HIGH to LOW transitions to INPUT A of 7490. This will display "4" in the second seven segment display.

Make LE of second 4511 HIGH, so that further changes in the input (D0 - D3) of second 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay 1 second.


Continued in Next Part (Part 8) >>>>

Arduino Program to Display 95 in Two Digit Seven Segment Displays (Part 6 of 9)

<<<<  Read Previous Part (Part 5)

          Arduino program to display "95" in the seven segment displays is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE1 = 10;
int LE2 = 9;

int i=0, j=0, k=0, first_digit=10, second_digit=10;

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

// the loop routine runs over and over again forever:
void loop() { 
  
  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH);  

  /*When 10th digital output of arduino is LOW, 
  LE of first 4511 becomes LOW. Now, the output (Qa - Qg) 
  of first 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE1, LOW);
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/
  
  digitalWrite(R01_and_R02, LOW);

  //Send nine clock pulses to INPUT_A

  for(i=0;i<9;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 10th digital output of arduino is HIGH, 
  LE of first 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of that 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/

  digitalWrite(LE1, HIGH);


  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH); 

  /*When 9th digital output of arduino is LOW, 
  LE of second 4511 becomes LOW. Now, the output (Qa - Qg) 
  of second 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE2, LOW);
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/

  digitalWrite(R01_and_R02, LOW);
  
  //Send five clock pulses to INPUT_A
  
  for(i=0;i<5;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 9th digital output of arduino is HIGH, 
  LE of second 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of that 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/
 
  digitalWrite(LE2, HIGH);  
  delay(4000); 
}

Output will be 95.
Algorithm of program is given below.

Make LE of first 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send nine HIGH to LOW transitions to INPUT A of 7490. This will display "6" in the first seven segment display.

Make LE of first 4511 HIGH, so that further changes in the input (D0 - D3) of first 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).


Make LE of second 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send five HIGH to LOW transitions to INPUT A of 7490. This will display "4" in the second seven segment display.

Make LE of second 4511 HIGH, so that further changes in the input (D0 - D3) of second 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay 4 seconds.


Continued in Next Part (Part 7) >>>>

Display 64 in Common Cathode SSDs - Arduino + 7490 + 4511 (Part 5 of 9)

<<<<  Read Previous Part (Part 4)

          Arduino program to display "64" in the seven segment displays is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE1 = 10;
int LE2 = 9;

int i=0, j=0, k=0, first_digit=10, second_digit=10;

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

// the loop routine runs over and over again forever:
void loop() { 
  
  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH);  

  /*When 10th digital output of arduino is LOW, 
  LE of first 4511 becomes LOW. Now, the output (Qa - Qg) 
  of first 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE1, LOW);
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/
  
  digitalWrite(R01_and_R02, LOW);

  //Send six clock pulses to INPUT_A

  for(i=0;i<6;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 10th digital output of arduino is HIGH, 
  LE of first 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of that 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/

  digitalWrite(LE1, HIGH);


  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH); 

  /*When 9th digital output of arduino is LOW, 
  LE of second 4511 becomes LOW. Now, the output (Qa - Qg) 
  of second 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE2, LOW);
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/

  digitalWrite(R01_and_R02, LOW);
  
  //Send four clock pulses to INPUT_A
  
  for(i=0;i<4;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 9th digital output of arduino is HIGH, 
  LE of second 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of that 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/
 
  digitalWrite(LE2, HIGH);  
  delay(4000); 
}

Output will be 64.

Algorithm of program is given below.

Make LE of first 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send six HIGH to LOW transitions to INPUT A of 7490. This will display "6" in the first seven segment display.

Make LE of first 4511 HIGH, so that further changes in the input (D0 - D3) of first 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).


Make LE of second 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send four HIGH to LOW transitions to INPUT A of 7490. This will display "4" in the second seven segment display.

Make LE of second 4511 HIGH, so that further changes in the input (D0 - D3) of second 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay 4 seconds.


Continued in Next Part (Part 6) >>>>

Arduino Program to Display 11 in 2 CCSSDs using 7490 + 4511 ICs (Part 4 of 9)

<<<<  Read Previous Part (Part 3)

          Arduino program to display "11" in the seven segment displays is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE1 = 10;
int LE2 = 9;

int i=0, j=0, k=0, first_digit=10, second_digit=10;

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

// the loop routine runs over and over again forever:
void loop() { 
  
  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH);  

  /*When 10th digital output of arduino is LOW, 
  LE of first 4511 becomes LOW. Now, the output (Qa - Qg) 
  of first 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE1, LOW);
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/
  
  digitalWrite(R01_and_R02, LOW);

  //Send one clock pulse to INPUT_A

  for(i=0;i<1;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 10th digital output of arduino is HIGH, 
  LE of first 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of that 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/

  digitalWrite(LE1, HIGH);


  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH); 

  /*When 9th digital output of arduino is LOW, 
  LE of second 4511 becomes LOW. Now, the output (Qa - Qg) 
  of second 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE2, LOW);
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/

  digitalWrite(R01_and_R02, LOW);
  
  //Send one clock pulse to INPUT_A
  
  for(i=0;i<1;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 9th digital output of arduino is HIGH, 
  LE of second 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of that 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/
 
  digitalWrite(LE2, HIGH);  
  delay(4000); 
}

Output will be 11.

Algorithm of program is given below.

Make LE of first 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send a HIGH to LOW transition to INPUT A of 7490. This will display "1" in the first seven segment display.

Make LE of first 4511 HIGH, so that further changes in the input (D0 - D3) of first 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).


Make LE of second 4511 LOW, so that any change in input (D0 - D3) of that 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send a HIGH to LOW transition to INPUT A of 7490. This will display "1" in the second seven segment display.

Make LE of second 4511 HIGH, so that further changes in the input (D0 - D3) of second 4511 will not change the output (Qa - Qg) of that 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay 4 seconds.


Continued in Next Part (Part 5) >>>>

Pin out of 4511 to Control Two Seven Segment Displays using Two 4511 (Part 3 of 9)

<<<<  Read Previous Part (Part 2)

Pin out diagram of 4511

          Datasheet of 4511 is given hereDatasheet must be read before using 4511. 4511 is a BCD to 7-segment latch / decoder / driver with four address inputs (D0-D3), an active low blanking input (BL), a lamp test (LT) and a latch enable (LE).

          From the function table of 4511 given in page 2 of datasheet, it is clear that, when a BCD input is given to 4511 through D0, D1, D2 and D3, we will get a corresponding number displayed in seven segment display. BCD input for 4511 is given from the output pins of 7490 (Qa, Qb, Qc and Qd). LT and BL pins of 4511 should be at HIGH voltage. Similarly LE pin should be at LOW voltage.


Pin out diagram of Common Cathode Seven Segment Display

          Pin out diagram of common cathode seven segment display is given below. There will be only one cathode pin for all the eight anode pins. Segments of the seven segment display is connected to the output pins (Qa - Qg) of 4511. A resistor of 1 K should be connected to the anode pins to protect the segments from high currents.
          Vcc is given from a regulated 5V source. Vcc is given to 7490 as well as 4511. Gnd pin of 7490, 4511 and Common cathode seven segment display is connected to the Gnd pin of voltage source.

Connections of 4511 and 7490 to arduino mega can be summarized as:

* Connect INPUT A (leg 14) of 7490 to 13th digital output of arduino mega.
* Connect R0(1) (leg 2) and R0(2) (leg 3) of 7490 to 12th digital output of arduino mega.
* Connect LE (leg 5) of 1st 4511 to 10th digital output of arduino mega.
* Connect LE (leg 5) of 2nd 4511 to 9th digital output of arduino mega.

* Gnd of arduino mega should be connected to the gnd terminal of voltage source.

Working of Circuit

          We had already seen the circuit for controlling a common cathode seven segment display using 4511 driver in previous blogs. In this circuit, when 10th or 9th digital outputs of arduino is HIGH, LE of corresponding 4511 becomes HIGH. This will keep the output (Qa - Qg) of that 4511 in previous state, even if the input (D0 - D3) changes. When 10th or 9th digital outputs of arduino is LOW, LE of corresponding 4511 becomes LOW. Now, the output (Qa - Qg) of that 4511 will change when input (D0 - D3) changes.

         When 12th digital output of arduino is HIGH, R0(1) and R0(2) of 7490 becomes HIGH. This will reset 7490. When 12th digital output of arduino is LOW, R0(1) and R0(2) of 7490 becomes LOW. Now, 7490 will count in all negative transitions of clock_input (INPUT A of 7490).

          When 10th and 12th digital outputs of arduino are LOW, during the negative transitions (HIGH to LOW transition) of  clock input (INPUT A of 7490 IC), 7490 counts. Count will be converted to BCD and is given as input to 4511. 4511 will convert BCD for seven segment display and corresponding number will be displayed in the seven segment display.
Continued in Next Part (Part 4) >>>>

Working of the Circuit for Two Common Cathode SSDs, Arduino + 7490 (Part 2 of 9)

<<<<  Read Previous Part (Part 1)

Pin out diagram of 7490

          7490 is clearly explained in it's datasheet. It is better to learn the datasheet before using 7490. It is a monolithic counter and contains four master-slave flip-flops and additional gating to provide a divide-by-two counter for which the count cycle length is divide-by-five. Pin out diagram of 7490 is given below.

          From the datasheet, it is clear that, counting will take place, if any of the following conditions is satisfied (Refer Reset / Count Function table in Page 3 of datasheet).

R0(2) and R9(2) are LOW.
R0(1) and R9(1) are LOW.
R0(1) and R9(2) are LOW.
R0(2) and R9(1) are LOW.

          In our circuit, we are grounding R0(2) (pin 3) and R9(1) (pin 6) of 7490 (condition 4). We can design two types of counters using 7490. They are BCD counter and Bi-quinary counter (Refer Function Tables of 7490 given in page 3 of datasheet). Here, we are designing the circuit for BCD counter. 7490 will work in BCD Count mode if, output Qa (Pin 12) of 7490 is connected to the input B (pin 1) of 7490. Clock input is given to the input A (pin 14) of 7490. In our circuit, clock input is given using a press button switch. If all these conditions are met, we will get a BCD counter at the output pins (Qa, Qb, Qc and Qd). Counter will count from 0-9 in each negative transition of clock input.

          7490 provides some options for resetting the IC (Refer Reset / Count Function table in Page 3 of datasheet). Two types of resetting are there. In the first type Qa, Qb, Qc and Qd becomes 0, 0, 0 and 0. In the second type, Qa, Qb, Qc and Qd becomes 1, 0, 0, and 1. Resetting can be done by three methods.

Method 1 : R0(1) - HIGH, R0(2) - HIGH, R9(1) - LOW.
Method 2 : R0(1) - HIGH, R0(2) - HIGH, R9(2) - LOW.
Method 3 : R9(1) - HIGH, R9(2) - HIGH.

Method 1 results in first type of resetting.
Method 2 results in first type of resetting.
Method 3 results in second type of resetting.

After resetting, counting will restart from 0.
Continued in Next Part (Part 3) >>>>

Circuit for Two Seven Segment Displays, Arduino Mega + 7490 + 4511 (Part 1 of 9)

<<<<  Previous : One Seven Segment Display + 7490 + 4511 + Arduino Mega

          In the last blog, we saw the circuit to control a common cathode seven segment display using an arduino mega, a 7490 and a 4511. Here, we will design a circuit to control two common cathode seven segment displays using an arduino mega, a 7490 IC and two 4511 ICs. Circuit is done as shown in the following diagram.

          Complete the circuit. Ground terminal of external voltage source and ground pin of arduino should be interconnected. Otherwise, circuit will not work. Read the remaining part in next page.

Continued in Next Part (Part 2) >>>>

Friday 31 October 2014

Arduino Program to Display 3, 6 and 9 in an SSD by 7490 and 4511 (Part 9 of 9)

<<<<  Read Previous Part (Part 8)

          Arduino program to display "3", "6" and "9" in the seven segment display is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE = 10;

int i=0;

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

// the loop routine runs over and over again forever:
void loop() {  
  digitalWrite(R01_and_R02, HIGH);  
  digitalWrite(LE, LOW);
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<3;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  digitalWrite(LE, HIGH);  

  delay(1000);
  
  digitalWrite(R01_and_R02, HIGH);  
  digitalWrite(LE, LOW);
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<6;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  digitalWrite(LE, HIGH);  
  
  delay(1000);
  
  digitalWrite(R01_and_R02, HIGH);  
  digitalWrite(LE, LOW);
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<9;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  digitalWrite(LE, HIGH);  
  delay(1000);
}

Output will be 3, 6 and 9 displayed in the seven segment display.

Algorithm of program is given below.

Make LE of 4511 LOW, so that any change in input (D0 - D3) of 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send three HIGH to LOW transitions to INPUT A of 7490 using an "i" loop. This will display "3" in the seven segment display.

Make LE of 4511 HIGH, so that further changes in input (D0 - D3) of 4511 will not change the output (Qa - Qg) of 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay for 1 second.


Make LE of 4511 LOW, so that any change in input (D0 - D3) of 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send six HIGH to LOW transitions to INPUT A of 7490 using an "i" loop. This will display "6" in the seven segment display.

Make LE of 4511 HIGH, so that further changes in input (D0 - D3) of 4511 will not change the output (Qa - Qg) of 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay for 1 second.


Make LE of 4511 LOW, so that any change in input (D0 - D3) of 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send nine HIGH to LOW transitions to INPUT A of 7490 using an "i" loop. This will display "9" in the seven segment display.

Make LE of 4511 HIGH, so that further changes in input (D0 - D3) of 4511 will not change the output (Qa - Qg) of 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay for 1 second.
Next : Control 2 Seven Segment Displays using Arduino Mega, 7490 and two 4511 ICs>>>>

Program to Display 3 and 6 in a Seven Segment Display, 7490 + Arduino (Part 8 of 9)

<<<<  Read Previous Part (Part 7)

          Arduino program to display "3" and "6" in the seven segment display is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE = 10;

int i=0;

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

// the loop routine runs over and over again forever:
void loop() {  
  digitalWrite(R01_and_R02, HIGH);  
  digitalWrite(LE, LOW);
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<3;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  digitalWrite(LE, HIGH);  

  delay(1000);
  
  digitalWrite(R01_and_R02, HIGH);  
  digitalWrite(LE, LOW);
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<6;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  digitalWrite(LE, HIGH);  
  delay(1000);
}

Output will be 3 and 6 displayed in the seven segment display.

Algorithm of program is given below.

Make LE of 4511 LOW, so that any change in input (D0 - D3) of 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send three HIGH to LOW transitions to INPUT A of 7490 using an "i" loop. This will display "3" in the seven segment display.

Make LE of 4511 HIGH, so that further changes in input (D0 - D3) of 4511 will not change the output (Qa - Qg) of 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay for 1 second.

Make LE of 4511 LOW, so that any change in input (D0 - D3) of 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send six HIGH to LOW transitions to INPUT A of 7490 using an "i" loop. This will display "6" in the seven segment display.

Make LE of 4511 HIGH, so that further changes in input (D0 - D3) of 4511 will not change the output (Qa - Qg) of 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Delay for 1 second.

Continued in Next Part (Part 9) >>>>

Arduino Program to Display 9 in a Seven Segment Display using 7490 (Part 7 of 9)

<<<<  Read Previous Part (Part 6)

          Arduino program to display "9" in the seven segment display is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE = 10;

int i=0;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(INPUT_A, OUTPUT);     
  pinMode(R01_and_R02, OUTPUT);
  pinMode(LE, OUTPUT);
  
  /*When 10th digital output of arduino is LOW, 
  LE of 4511 becomes LOW. Now, the output (Qa - Qg) 
  of 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE, LOW);
}

// the loop routine runs over and over again forever:
void loop() {

  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH);  
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/
  
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<9;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 10th digital output of arduino is HIGH, 
  LE of 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/
  digitalWrite(LE, HIGH);    
}

Output will be 9.

Algorithm of program is given below.

Make LE of 4511 LOW, so that any change in input (D0 - D3) of 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send nine HIGH to LOW transitions to INPUT A of 7490 using an "i" loop. This will display "9" in the seven segment display.

Make LE of 4511 HIGH, so that further changes in input (D0 - D3) of 4511 will not change the output (Qa - Qg) of 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Continued in Next Part (Part 8) >>>>

Displaying 3 in a Common Cathode Seven Segment Display using 7490 (Part 6 of 9)

<<<<  Read Previous Part (Part 5)

          Arduino program to display "3" in the seven segment display is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE = 10;

int i=0;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(INPUT_A, OUTPUT);     
  pinMode(R01_and_R02, OUTPUT);
  pinMode(LE, OUTPUT);
  
  /*When 10th digital output of arduino is LOW, 
  LE of 4511 becomes LOW. Now, the output (Qa - Qg) 
  of 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE, LOW);
}

// the loop routine runs over and over again forever:
void loop() {

  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH);  
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/
  
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<3;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 10th digital output of arduino is HIGH, 
  LE of 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/
  digitalWrite(LE, HIGH);    
}

Output will be 3.
Algorithm of program is given below.

Make LE of 4511 LOW, so that any change in input (D0 - D3) of 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send three HIGH to LOW transitions to INPUT A of 7490 using an "i" loop. This will display "3" in the seven segment display.

Make LE of 4511 HIGH, so that further changes in input (D0 - D3) of 4511 will not change the output (Qa - Qg) of 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).

Continued in Next Part (Part 7) >>>>

Arduino Program to Display 1 in a Common Cathode SSD by 7490 and 4511 (Part 5 of 9)

<<<<  Read Previous Part (Part 4)

          Arduino program to display "1" in the seven segment display is given below. Complete the circuit and upload the following program to your arduino board.

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE = 10;

int i=0;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(INPUT_A, OUTPUT);     
  pinMode(R01_and_R02, OUTPUT);
  pinMode(LE, OUTPUT);
  
  /*When 10th digital output of arduino is LOW, 
  LE of 4511 becomes LOW. Now, the output (Qa - Qg) 
  of 4511 will change when input (D0 - D3) of 4511 changes.*/
  
  digitalWrite(LE, LOW);
}

// the loop routine runs over and over again forever:
void loop() {

  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH);  
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.*/
  
  digitalWrite(R01_and_R02, LOW);
  for(i=0;i<1;i++)
  {
    digitalWrite(INPUT_A, HIGH);
    digitalWrite(INPUT_A, LOW);   
  }
  
  /*When 10th digital output of arduino is HIGH, 
  LE of 4511 becomes HIGH. This will keep the output 
  (Qa - Qg) of 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes.*/
  digitalWrite(LE, HIGH);    
}

Output will be 1.
Algorithm of program is given below.

Make LE of 4511 LOW, so that any change in input (D0 - D3) of 4511 will make changes in the output (Qa - Qg) of 4511 and hence in the seven segment display.

Send HIGH to R0(1) and R0(2) of 7490 to reset 7490. This is to display "0" in the seven segment display.

Send LOW to R0(1) and R0(2) to convert 7490 from reset mode to count mode.

Send a HIGH to LOW transition to INPUT A of 7490. This will display "1" in the seven segment display.

Make LE of 4511 HIGH, so that further changes in input (D0 - D3) of 4511 will not change the output (Qa - Qg) of 4511. That is, number displayed will not change in further HIGH to LOW transitions of clock input (INPUT A of 7490).


Continued in Next Part (Part 6) >>>>

Arduino Program to Control a Common Cathode SSD by 7490 and 4511 (Part 3 of 9)

<<<<  Read Previous Part (Part 2)

         After completing the circuit, upload the following program to your arduino board. If uploading is successful, numbers will start displaying in the seven segment display. Program is written as three parts.

          In the first part, 10th and 12th digital outputs of arduino are LOW. During the negative transition (HIGH to LOW transition) of  clock input (INPUT A of 7490 IC), 7490 counts. Count will be converted to BCD and is given as input to 4511. 4511 will convert BCD for seven segment display and corresponding number will be displayed in the seven segment display.

          In the second part, 10th digital output of arduino is HIGH. LE of 4511 becomes HIGH. This will keep the output (Qa - Qg) of 4511 in previous state, even if the input (D0 - D3) of 4511 changes. When 10th digital output of arduino is LOW, LE of 4511 becomes LOW. Now, the output (Qa - Qg) of 4511 will change when input (D0 - D3) of 4511 changes.

          In the third part, 10th and 12th digital outputs of arduino are LOW. During the negative transition (HIGH to LOW transition) of  clock input (INPUT A of 7490 IC), 7490 counts. Count will be converted to BCD and is given as input to 4511. 4511 will convert BCD for seven segment display and corresponding number will be displayed in the seven segment display.

          In the fourth part, 12th digital output of arduino is HIGH. R0(1) and R0(2) of 7490 becomes HIGH. This will reset 7490. When 12th digital output of arduino is LOW, R0(1) and R0(2) of 7490 becomes LOW. Now, 7490 will count in all negative transition of clock input (INPUT A of 7490).

int INPUT_A = 13;
int R01_and_R02 = 12;
int LE = 10;

int i=0;

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

// the loop routine runs over and over again forever:
void loop() {

  /********** PART 1 ***********/
  
  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.

  This part of program displays 0, 1 and 2*/
  
  for(i=0;i<2;i++)
  {
    digitalWrite(LE, LOW);
    digitalWrite(R01_and_R02, LOW);
    digitalWrite(INPUT_A, HIGH);
    delay(500);
    digitalWrite(INPUT_A, LOW);
    delay(500);
  }

  /********* PART 2 ***********/

  /*When 10th digital output of arduino is HIGH, 
  LE of 4511 becomes HIGH. This will keep the output (Qa - Qg) 
  of 4511 in previous state, even if the 
  input (D0 - D3) of 4511 changes. 

  This part of program will keep the seven segment 
  display in "2" for two seconds*/
    
  for(i=0;i<3;i++)
  {
    digitalWrite(LE, HIGH);
    digitalWrite(R01_and_R02, LOW);
    digitalWrite(INPUT_A, HIGH);
    delay(500);
    digitalWrite(INPUT_A, LOW);
    delay(500);
  } 

  /*********** PART 3 ***********/

  /*When 10th and 12th digital outputs of arduino are LOW, 
  during the negative transition (HIGH to LOW transition) of  
  clock input (INPUT A of 7490 IC), 7490 counts.

  This part of program displays 5, 6 and 7*/

  for(i=0;i<2;i++)
  {
    digitalWrite(LE, LOW);
    digitalWrite(R01_and_R02, LOW);
    digitalWrite(INPUT_A, HIGH);
    delay(500);
    digitalWrite(INPUT_A, LOW);
    delay(500);
  } 

  /*********** PART 4 ************/
  
  /* When 12th digital output of arduino is HIGH, R0(1) 
  and R0(2) of 7490 becomes HIGH. This will reset 7490. 
  Counting will restart from 0 */
  
  digitalWrite(R01_and_R02, HIGH);
}


Next : Continued in Next Part (Part 4) >>>>