Tags: 7, segment, Digital, LED, Display, Single, Digit,

7 segment Digital LED Display Single Digit

  • 7.00 AED
    • Ex Tax:7.00 AED
    • Product Code: 1-Bit LED
    • Availability: In Stock
    7 segment Digital Display 1 Digit LEDworks with microcontrollers. Product Name : LED Digital display ;Model : LD-5161;Type : Common CathodeEmitted Color : Red;Pin Number : 10;Pin Pitch : 2mm/0.08"Size(No INclude Pin) : 19 x 13 x 7mm/0.7" x 0.5" x 0.3" (L*W*H);Digital Tube Height : 14.2mm/0..


    7 segment Digital Display 1 Digit LEDworks with microcontrollers. 

    Product Name : LED Digital display ;Model : LD-5161;Type : Common Cathode

    Emitted Color : Red;Pin Number : 10;Pin Pitch : 2mm/0.08"

    Size(No INclude Pin) : 19 x 13 x 7mm/0.7" x 0.5" x 0.3" (L*W*H);Digital Tube Height : 14.2mm/0.56"

    Material : Plastic, Metal;Color : Black, White

    Net Weight : 22g;

    Package Content : 1x LED Digital Tube


    Picture
    The connections are pretty easy, see the image above with the breadboard circuit schematic.
    Pinout of 7 segment display:​ (read the datasheet!)
    • 1 - "E" - Arduino pin 6
    • 2 - "D" - Arduino pin 7
    • 3 - "CC" - Arduino pin 4
    • 4 - "C" - Arduino pin 8
    • 5 - "DP" -
    • 6 - "B" - Arduino pin 9
    • 7 - "A" - Arduino pin 10
    • 8 - "CC" - Arduino pin 4
    • 9 - "F" - Arduino pin 11
    • 10 - "G" - Arduino pin 12


    Here's the code, embedded using codebender!
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      /* Arduino Tutorial - 7 Segment 
         One 7 segment is one digit, from 0 to  9.
         Dev: Vasilakis Michalis // Date: 25/7/2015 // www.ardumotive.com */
      
      //Library
      #include "SevenSeg.h"
      
      //Defines the segments A-G: SevenSeg(A, B, C, D, E, F, G);
      SevenSeg disp (10,9,8,7,6,11,12);
      //Number of 7 segments
      const int numOfDigits =1;
      //CC(or CA) pins of segment
      int digitPins [numOfDigits]={4};
      
      //Variables
      int number=0; //Default number
      int flag;
      
      void setup() {
      	
        Serial.begin(9600);
        //Defines the number of digits to be "numOfDigits" and the digit pins to be the elements of the array "digitPins"
        disp.setDigitPins ( numOfDigits , digitPins );
        //Only for common cathode 7segments
        disp.setCommonCathode();
        //Control brightness (values 0-100);
        disp.setDutyCycle(50);
        
      }
      
      void loop()
      {	
      	//Check if incoming data is available:
          if (Serial.available() > 0)
          {
            // If it is, we'll use parseInt() to pull out only numbers:
            number = Serial.parseInt();
            flag=0;
          }
      
      	//Valid range is from 1 to 9
      	if (number>=1 && number<=9){
      		//Print number to 7 segment display
      		disp.writeDigit(number);
      		
      	    //Print message to serial monito only once
      	    if (flag==0){ 
      	    	//Print number to serial monitor
      	    	Serial.print("Number on 7 segment display:");
      	    	Serial.println(number);
      	    	flag=1;
      	    }
      	}
      }
      
      CC display, segment pins b and c set to HIGH

      numOfDigits = 1 If we have two seven segment displays we will change this to "2".

      digitPins [numOfDigits] = {4} If we have two seven segment displays, we have to add the second display CC pin to e.g. arduino pin 3, so we will change it to "{4, 3}".

      disp.setDutyCycle(50) Control brightness of display - "50" is 50% of led brightness.

      disp.writeDigit(number) Print a number from 0 to 9