Blogroll

Powered by Blogger.

Friday, 31 October 2014

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

by realfinetime  |  in Seven Segment Display at  09:55

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

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

Blog Archive

Proudly Powered by Blogger.