Blogroll

Powered by Blogger.

Thursday, 30 October 2014

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

by realfinetime  |  in Seven Segment Display at  20:55

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

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.