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

by realfinetime  |  in Seven Segment Display at  09:10

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).