Seven Segment LCDs? Answered

Http://i00.i.aliimg.com/photo/v0/325133078/7_segment_LCD_panel.jpg Has anyone had any luck hooking up seven segment lcds to their arduino's? These have 4 seven segment digits, a :, and an am/pm display. They have less than 28 pins.

Question by Michael_Bell   |  last reply


7 segment display nsn64r

Hi!Is there anyone having data on nsn64r pinout ? I found a few of them but no pinout instructions.Thanks

Question by gonzo_one   |  last reply


common anode and common cathode differences in 7segment display

What are the changes need to do when using common anode seven segment display instead of common cathode seven segment display. hint:use transistors?

Question by nethmi.amanda.3344   |  last reply


Where can I find large seven segment displays?

My neighbor wants me to make a scoreboard for his ping pong table, but I'm having difficulty finding something to use as the display.  Seeed Studio has some, http://www.seeedstudio.com/depot/7-Segment-Display-8-Inches-Red-p-1194.html, but they come in individual segments.  Sparkfun has some as well, but they're on a tan colored PCB.  Where's the cheapest place to find 6"+ displays on a black background?

Question by furrysalamander   |  last reply


7 segment led display driver help?

7 segment sed driver/decoder circuit helpEMAIL FLAGIve looked all over, and have already tried 3 circuits, but none work. They have either the wrong ic, wrong led display, etc. So, I want to make a circuit that, by using a decoder, I can flip 4 dip switches and make the display make certain numbers. I have a 7447 ic, common cathode led display, but I can only either find a circuit with a 7447 and a common anode, or a circuit with a common cathode but a different decoder (a latch/decoder/driver). Here is the first site I tried:http://www.allaboutcircuits.com/vol_6/chpt_7/9.htmlAnd when I finally flip the switches, nothing happens even though I made it exactly as shown. But it has a CMOS, so thats probably a big problem. I also tried this site:http://www.atilim.edu.tr/~hkar/lab5.htmBut it has a common anode, and when I tried it it didnt work. I have exactly ELS321HDB. And I have a power unit that can go from 5 - 18 volts. Can anyone show me how to make this? Im not too good yet at reading circuit diagrams, because I seem to make it way more complex then it should be.

Question by 101yummYYummy101 


Fixing a 5 character seven segment display clock

This is a count up race clock that fell due to high winds and has stopped working. It is a springco athletics model 2710A. I have already tried respecting and reconnecting all the non soldered pieces of this display. The main chip on the board is a PIC16F887 with 20 pins. Each display is connected by a single ribbon cable with 20 pins and there are jumpers on each display labeled 1-6(presumably for the character placement in the display). If I cannot find a way to fix the current hardware I would like to replace the control board with an arduino that can do the same thing but I do not know how to wire the display to the arduino nor what model to use. Any suggestions are welcomed.

Question by Tsall1698   |  last reply


How should I build a digital "counter with a seven-segment display?

I have a seven segment LED display and I would like to build a digital counter that will increase or decrease the number value displayed on the display when I press a button (a button for counting up and a button for counting down). So I would like to be able to press one button to increase the displayed value (1, 2, 3...) and then press a different button and have the value decrease (9, 8, 7...). Thanks for the help!

Question by MadMechanic   |  last reply


0-12V Digital Display?

Here's what I need, and haven't been able to figure out how to do it: I designed a motor speed controller that runs a 12V fan.  Speed control is via PWM through a 50K linear Potentiometer. I need to be able to read the percentage of run voltage ie: 0V=0%, 6V=50%, 12V=100%.  I want to display this on 3 7-segment LED displays. Anyone with insight would be greatly appreciated. Brian

Question by BrianAriz   |  last reply


Read from a 7-segment display LCD

Hello everyone. Suppose you have some device with a numeric LCD display with some 7-segment digits (i.e. a digital scale), and you want to hack it in order to read out electronically (for example with an rs232 connection), while preserving functionality of the thing. How you would do that?

Topic by avvelenato   |  last reply


7 segment sed driver/decoder circuit help

Ive looked all over, and have already tried 3 circuits, but none work. They have either the wrong ic, wrong led display, etc. So, I want to make a circuit that, by using a decoder, I can flip 4 dip switches and make the display make certain numbers. I have a 7447 ic, common cathode led display, but I can only either find a circuit with a 7447 and a common anode, or a circuit with a common cathode but a different decoder (a latch/decoder/driver). Here is the first site I tried:http://www.allaboutcircuits.com/vol_6/chpt_7/9.htmlAnd when I finally flip the switches, nothing happens even though I made it exactly as shown. But it has a CMOS, so thats probably a big problem. I also tried this site:http://www.atilim.edu.tr/~hkar/lab5.htmBut it has a common anode, and when I tried it it didnt work. I have exactly ELS321HDB. And I have a power unit that can go from 5 - 18 volts. Can anyone show me how to make this? Im not too good yet at reading circuit diagrams, because I seem to make it way more complex then it should be.

Question by 101yummYYummy101   |  last reply


Help with Arduino programming for LED display

What I want to do is keep score with my coin soccer game. I will have 2 metal contacts in the goals that when a coin goes through it will break contact and send a signal to the Arduino having the contacts allways HIGH and then when its LOW, it changes an 7 segment LED. I am very new to programming and the C language. I think I can write the whole IF and ELSE statements but I don't know how to make the LED display change. I need the LED display to change after getting the signal from my Arduino by going up one number. It is a single 7 segment display. Can someone help me with the code for that? Thanks in advance.

Topic by Wally_Z   |  last reply


new to arduino, want to run a dual display for 2 sensors

I'm new to the Arduino community.  wanting to set up a dual radar setup with 2 ultrasonic sensors,  (Ultrasonic Sensor Module HC-SR04), and outputting to a pair of 7 segment displays ( two 7 segment displays each).  I've found a code to do a single could use a lot of help to output two at the same time, basically 2 lanes without 2 units.  im using an arduino mega, ordered a unor3 and hopefully it can be made to run on one or the other. code is as follows: /* HC-SR04 Sensor    The circuit:     * VCC connection of the sensor attached to +5V     * GND connection of the sensor attached to ground     * TRIG connection of the sensor attached to digital pin 2     * ECHO connection of the sensor attached to digital pin 4  */    /*  This is a radar ping sensor that calcultates the speed of an  object traveling away or towards the sensor. I took some of this  code for the HC-SR04 Sensor implementation by Tautvidas Sipavicius. The rest  is original code from me. I know that the seven segment display  code is not the best to look at or the most optimized but it  serves its purpose just fine and is easy to understand.    Written by Matthew Ladd  */   const int trigPin = 2; const int echoPin = 4;   void setup() {   // initialize serial communication:   Serial.begin(9600);   //First 7 segment (ones place)   pinMode(30,OUTPUT);//F   pinMode(31,OUTPUT);//G   pinMode(32,OUTPUT);//E   pinMode(33,OUTPUT);//D   pinMode(34,OUTPUT);//C   pinMode(35,OUTPUT);//B   pinMode(36,OUTPUT);//A   //Second 7 segment (tens place)   pinMode(37,OUTPUT);//F   pinMode(38,OUTPUT);//G   pinMode(39,OUTPUT);//E   pinMode(40,OUTPUT);//D   pinMode(41,OUTPUT);//C   pinMode(42,OUTPUT);//B   pinMode(43,OUTPUT);//A } void zerofirst(){   digitalWrite(30,LOW);   digitalWrite(31,HIGH);   digitalWrite(32,LOW);   digitalWrite(33,LOW);   digitalWrite(34,LOW);   digitalWrite(35,LOW);   digitalWrite(36,LOW); } void onefirst(){   digitalWrite(30,HIGH);   digitalWrite(31,HIGH);   digitalWrite(32,HIGH);   digitalWrite(33,HIGH);   digitalWrite(34,LOW);   digitalWrite(35,LOW);   digitalWrite(36,HIGH); } void twofirst(){   digitalWrite(30,HIGH);//F   digitalWrite(31,LOW);//G   digitalWrite(32,LOW);//E   digitalWrite(33,LOW);//D   digitalWrite(34,HIGH);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void threefirst(){   digitalWrite(30,HIGH);//F   digitalWrite(31,LOW);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,LOW);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void fourfirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,HIGH);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,HIGH);//A } void fivefirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,LOW);//D   digitalWrite(34,LOW);//C   digitalWrite(35,HIGH);//B   digitalWrite(36,LOW);//A } void sixfirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,LOW);//E   digitalWrite(33,LOW);//D   digitalWrite(34,LOW);//C   digitalWrite(35,HIGH);//B   digitalWrite(36,LOW);//A } void sevenfirst(){   digitalWrite(30,HIGH);//F   digitalWrite(31,HIGH);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,HIGH);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void eightfirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,LOW);//E   digitalWrite(33,LOW);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void ninefirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,HIGH);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void zerosecond(){   digitalWrite(37,LOW);   digitalWrite(38,HIGH);   digitalWrite(39,LOW);   digitalWrite(40,LOW);   digitalWrite(41,LOW);   digitalWrite(42,LOW);   digitalWrite(43,LOW); } void onesecond(){   digitalWrite(37,HIGH);   digitalWrite(38,HIGH);   digitalWrite(39,HIGH);   digitalWrite(40,HIGH);   digitalWrite(41,LOW);   digitalWrite(42,LOW);   digitalWrite(43,HIGH); } void twosecond(){   digitalWrite(37,HIGH);//F   digitalWrite(38,LOW);//G   digitalWrite(39,LOW);//E   digitalWrite(40,LOW);//D   digitalWrite(41,HIGH);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } void threesecond(){   digitalWrite(37,HIGH);//F   digitalWrite(38,LOW);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,LOW);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } void foursecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,HIGH);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,HIGH);//A } void fivesecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,LOW);//D   digitalWrite(41,LOW);//C   digitalWrite(42,HIGH);//B   digitalWrite(43,LOW);//A } void sixsecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,LOW);//E   digitalWrite(40,LOW);//D   digitalWrite(41,LOW);//C   digitalWrite(42,HIGH);//B   digitalWrite(43,LOW);//A } void sevensecond(){   digitalWrite(37,HIGH);//F   digitalWrite(38,HIGH);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,HIGH);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } void eightsecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,LOW);//E   digitalWrite(40,LOW);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } void ninesecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,HIGH);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } long distanceOverTime(long first,long second){  return ((first-second)/.1)*.0223693629;//taking cm/s to mph } long holder;//store the cm from last time through loop. long temp;//used to store the speed value after changes int counter; void loop() {   // establish variables for duration of the ping,   // and the distance result in inches and centimeters:   long duration, inches, cm;   int tens;   int ones;   long Speed;   // The sensor is triggered by a HIGH pulse of 10 or more microseconds.   // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:   pinMode(trigPin, OUTPUT);   digitalWrite(trigPin, LOW);   delayMicroseconds(2);   digitalWrite(trigPin, HIGH);   delayMicroseconds(10);   digitalWrite(trigPin, LOW);     // Read the signal from the sensor: a HIGH pulse whose   // duration is the time (in microseconds) from the sending   // of the ping to the reception of its echo off of an object.   pinMode(echoPin, INPUT);   duration = pulseIn(echoPin, HIGH);     // convert the time into a distance   inches = microsecondsToInches(duration);   cm = microsecondsToCentimeters(duration);   Speed=distanceOverTime(holder,cm);   holder=cm;//after speed caclulation so take the cm value for another calculation   Speed=abs(Speed);   if(Speed!=0 || counter==10){     temp=Speed;     counter=0;   }else{     counter++;   }   if(temp>=100){    zerofirst();    zerosecond();   }else{     ones=temp%10;     tens=temp/10;   }   if(ones == 0){     zerofirst();   }else if(ones==1){     onefirst();   }else if(ones==2){     twofirst();   }else if(ones==3){     threefirst();   }else if(ones==4){     fourfirst();   }else if(ones==5){     fivefirst();   }else if(ones==6){     sixfirst();   }else if(ones==7){     sevenfirst();   }else if(ones==8){     eightfirst();   }else if(ones==9){     ninefirst();   }   if(tens == 0){     zerosecond();   }else if(tens==1){     onesecond();   }else if(tens==2){     twosecond();   }else if(tens==3){     threesecond();   }else if(tens==4){     foursecond();   }else if(tens==5){     fivesecond();   }else if(tens==6){     sixsecond();   }else if(tens==7){     sevensecond();   }else if(tens==8){     eightsecond();   }else if(tens==9){     ninesecond();   }       Serial.print(inches);   Serial.print(" in, ");   Serial.print(cm);   Serial.print(" cm, ");   Serial.print(Speed);   Serial.print(" mph");   Serial.println();     delay(100); }   long microsecondsToInches(long microseconds) {   // According to Parallax's datasheet for the PING))), there are   // 73.746 microseconds per inch (i.e. sound travels at 1130 feet per   // second).  This gives the distance travelled by the ping, outbound   // and return, so we divide by 2 to get the distance of the obstacle.   // See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf   return microseconds / 74 / 2; }   long microsecondsToCentimeters(long microseconds) {   // The speed of sound is 340 m/s or 29 microseconds per centimeter.   // The ping travels out and back, so to find the distance of the   // object we take half of the distance travelled.   return microseconds / 29 / 2; } again, all your help and thought are appricated

Topic by herb1977   |  last reply


where can i find a 8 digit 14 segment display like the one used in instructable "love box"?

I have been searching low and high for it.  does it have to be 8 digit? What will i have to change if it is a 13 or 14 digit display?

Question by sotyrockz04   |  last reply


How to set up a 7 segment display on an Arduino ?

 How would i set it up for this display? on the left side each pin is labeled from top to bottom D0 D1 D2 D3 and Digit on right side Top to bottom +9v+5v and GND (1st Pic)  The send Pic is just the bottom of the display. PLZ HELP Thanks!

Question by Dylan552   |  last reply


A brighter speedometer? LED display?

My current speedometer uses the same type of display that you may find on a solar-activated calculator or cheap alarm clock (the ones that display black letters on a grey background). problem is, I cant see it in bright sunlight! Is there is a way to make a speedometer with my own set of 7-segments displays that use LEDs, or if I could convert my current one to using them?

Question by phephq   |  last reply


stop 7-segment from ghosting?

I'm working on a simple arduino 7 segment driving circuit. (It also has a led bar-graph that displays binary numbers but that part is working fine.) When I get the display working I might make an instructible out of it. Here's the basic layout: -using this 8 segmet 4 digit common cathode display. -arduino controls what segments are on via 74HC164 8-bit Serial Shift Register -shift register controls an array of 8 PNP transistors with base and pull-up resistors -transistors connect to display anodes through resistor array -display cathodes (common for each digit) connected to array of 4 PNP transistors with base and pull-down resistors  -PNP transistors controlled by arduino. (I will post the schematic shortly.) In software, to display a four digit number, I shift the pattern for a given digit to the shift-register, which in turn turns on the PNPs for the corresponding segment anodes. I then turn on the NPN for that digit's cathode. I delay for a few milliseconds, then turn the NPN off, shift the next digit in, and turn the NPN for that digit on. Rinse and repeat. It works fine but the segments that should be off are at about 1/2 brightness, making all the digits look like eights. Even the DP looks like it's on and I'm not turning it on anywhere. Do I need pull-down resistors for the anodes or something? What's going on here?

Question by Vick Jr   |  last reply


20 year old 7 segment 9 digit led display- PLEASE HELP TO FIGURE OUT PART NUMBER AND DATASHEET?

URGENT HELP APPRECIATED I have a 20 year old 7 segment 9 digit led display, i cannot figure out the part no. Here's is what is written in the back of it- (NSA 520 DCCB VO 0179-A) it has 9 digits, a segment below every digit, 7 segment per digit, 18 pin holes

Question by polkijain   |  last reply


Is it true I need a 7448 chip if I'm using a common cathode 7 segment display?

At the moment, I have a 7447 decoder chip connected to a 7 segment display with two common ground connections on it. However, it's not working, and I read somewhere that you need a 7448 decoder chip to power a common cathode 7 segment display. Is that true?

Question by Ke-Bob   |  last reply


How to make a 7 segment clock? Answered

Hi! i have 6 X 7 segment displays ( i think common annode) hanging around and i was wondering if i could make an clock with hours minutes seconds and an LED or 2 LED's that blinks every second, without an arduino. i do have an arduino for programming but i rather use other parts so that i can use my arduino for other projects. who can help me? Thanks!

Question by ingkiller   |  last reply



Pin allocations on 4 digit, 7 segment LED display... Answered

Hi, I have recently bought a 4 digit, 7 segment LED display to hook up to my arduino and am unsure of what pin does what. I have a green KINGBRIGHT (2009-34) CA56-216WA (M3) and can not find it on the kingbright website. Also, while I was looking at the other models I noticed that some pins were labeled DP. If anyone can be of any assistance it would be greatly appreciated. Thanks again!  Ari

Question by anonymouse197   |  last reply


I would like some assistance in designing a digital LED display vacuum/boost gauge for a turbo application. Answered

Hello!   I'm new here. I would like some assistance in designing a digital LED display vacuum/boost gauge with both a linear LED display as well as two seven-segment display modules.   I plan to use a standard automotive MAP sensor to provide the -30Hg to  +30psi signal.   What I envision is having the two seven-segment displays sit next to a row of 28 green LEDs for vacuum to -28Hg, 7 yellow LEDs for pressure from +1psi to +7psi, and 8 red LEDs for pressure from 8psi to +15psi that light up incrementally as the pressure increases or vacuum increases from a center point of zero (clear LED always on).  The problem is that I have absolutely NO idea of where to start other than the layout of the LEDs.  So any help would be appreciated. Thanks! Skullmaster20  (Chris) Edit -----  This is a drawing of what I'm trying to create, and a picture of what I'm going to replace.

Question by skullmaster20   |  last reply


system that takes BCD inputs from DIP Switches and display Decimal on 7-Segment display, without using any BCD Decoder?

Hi i want to make system that takes BCD inputs from DIP Switches and display Decimal on two 7-Segment display, without using any BCD Decoder.what ic should i choose??and circuit.

Question by szafar2   |  last reply


Ethernet.h causing problems with 7 segment display driver [Arduino]

Hey Instructables,  I have a really annoying issue with some Arduino code I am writing.  The code is for an ethernet controlled countdown timer.  In it's component parts the functions all work fine,  I can drive the 7 segment display fine. I can start/stop/set a count over Ethernet However as soon as I add the line  Ethernet.begin(mac, ip); in void setup()  The 7 segment display starts to show errors, specifically the first of the four digits. Even If I don't include any additional Ethernet related code in the loop, just calling the library on setup causes problems.  I'm not an especially experienced programmer so I'm really hoping someone can share a little of their wisdom here! #include #include          // needed for Arduino versions later than 0018 #include #include          // UDP library from: bjoern@cs.stanford.edu 12/30/2008 int digit1 = 11; //PWM Display pin 1 int digit2 = 10; //PWM Display pin 2 int digit3 = 9; //PWM Display pin 6 int digit4 = 6; //PWM Display pin 8 //Pin mapping from Arduino to the ATmega DIP28 if you need it //http://www.arduino.cc/en/Hacking/PinMapping int segA = A1; //Display pin 14 int segB = 3; //Display pin 16 int segC = 4; //Display pin 13 int segD = 5; //Display pin 3 int segE = A0; //Display pin 5 int segF = 7; //Display pin 11 int segG = 8; //Display pin 15 // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = {   0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; IPAddress ip(192, 168, 1, 177); unsigned int localPort = 8888;      // local port to listen on // buffers for receiving and sending data char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet, char ReplyBuffer[] = "acknowledged";       // a string to send back // An EthernetUDP instance to let us send and receive packets over UDP EthernetUDP Udp; elapsedMillis timeElapsed; //declare global if you don't want it reset every time loop runs //  milliseconds in a second unsigned int interval = 1000; unsigned int seconds = 0; unsigned int state = 1; unsigned int timeSetting = 10; unsigned int oldSeconds = 0; char theCount[9] = "01:06:30"; int secs = 0; int mins = 0; int hours = 0; String isItTime = ""; String firstFour = ""; void setup() {                      Ethernet.begin(mac, ip);   Udp.begin(localPort);      pinMode(segA, OUTPUT);   pinMode(segB, OUTPUT);   pinMode(segC, OUTPUT);   pinMode(segD, OUTPUT);   pinMode(segE, OUTPUT);   pinMode(segF, OUTPUT);   pinMode(segG, OUTPUT);   pinMode(digit1, OUTPUT);   pinMode(digit2, OUTPUT);   pinMode(digit3, OUTPUT);   pinMode(digit4, OUTPUT);     pinMode(13, OUTPUT);     } void loop() {     displayNumber(millis()/1000);    } void displayNumber(int toDisplay) { #define DISPLAY_BRIGHTNESS  500 #define DIGIT_ON  HIGH #define DIGIT_OFF  LOW   long beginTime = millis();   for(int digit = 4 ; digit > 0 ; digit--) {     //Turn on a digit for a short amount of time     switch(digit) {     case 1:       digitalWrite(digit1, DIGIT_ON);       break;     case 2:       digitalWrite(digit2, DIGIT_ON);       break;     case 3:       digitalWrite(digit3, DIGIT_ON);       break;     case 4:       digitalWrite(digit4, DIGIT_ON);       break;     }     //Turn on the right segments for this digit     lightNumber(toDisplay % 10);     toDisplay /= 10;     delayMicroseconds(DISPLAY_BRIGHTNESS); //Display this digit for a fraction of a second (between 1us and 5000us, 500 is pretty good)     //Turn off all segments     lightNumber(10);     //Turn off all digits     digitalWrite(digit1, DIGIT_OFF);     digitalWrite(digit2, DIGIT_OFF);     digitalWrite(digit3, DIGIT_OFF);     digitalWrite(digit4, DIGIT_OFF);   }   while( (millis() - beginTime) < 10) ; //Wait for 20ms to pass before we paint the display again } //Given a number, turns on those segments //If number == 10, then turn off number void lightNumber(int numberToDisplay) { #define SEGMENT_ON  LOW #define SEGMENT_OFF HIGH   switch (numberToDisplay){   case 0:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_OFF);     break;   case 1:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 2:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 3:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 4:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 5:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 6:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 7:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 8:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 9:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 10:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   } }

Topic by drkovorkian   |  last reply


How do I use a Common Anode 7-Segment LED? Answered

I have a SA23-12EWA Common Anode 7-Segment LED and I can only get the decimal point to light up. How do I connect it so that the other segments light up?

Question by powerman666   |  last reply



how to make tachometer with 7 segment display for single cylinder 2 stroke 6v ignition..can anyone help me? Answered

I found a diy project from https://www.instructables.com/image/FU19QM5GH4NN2QX/Building-the-circuit.jpg but i want to use only 3 led(7-segment display) instead  of  4 led.. and another problem is this circuit only fit input signal from 12v ignition 4 cylinder ( car ), but mine is 6v single cylinder 2-stroke( motorcycle ).. what i have to modify so than i can make a circuit that can use 6v signal to the ic and only use 3 led(7-segment display.. can any give an opinion or some one that have done this to help..im not to good with electronic but i understand english. :-)

Question by kill_them_now   |  last reply


What is the proper way to operate the grids on a VFD? Answered

I have a VFD removed from an old DVD player, and I am currently trying to construct a driver for it. So far I have worked out a the pinout and a suitable cathode heating voltage and have determined that 20-30V is sufficient to properly light all the segments. As for the grids, I am unsure what the proper voltage to apply in order to light/blank each section. Currently, leaving the grids unconnected or at 0V effectively blanks all segments, and connecting the grid to the anode voltage lights the section. However, other designs seem to put the grid to 0V to allow the section to light and apply +/-15V or so to absorb/block the flow of electrons and prevent the section from lighting. Is it alright to pull each grid high and connect it to 0V to blank the section, or will there be problems when trying to drive each section? Thanks in advance for any help. Also, is it worth the extra circuitry needed for an AC heater voltage for a display this size (under 4.5" x 1"), if so, what is a suitable frequency?

Question by The Skinnerz   |  last reply


Digital Logic Design Project Combinational Lock?

In this project you are required to design a 4 digits combination lock (not using arduino)  The project is such that it can be reconfigurable i.e. there should be an option that we can change the password of the lock at run time. Input to the system is from the hex keypad. Output of the system is ‘open’ and ‘close’ words displayed on a seven segment I used registers,flip flops, mux ,comparator  but couldn't get the desired result

Question by r_sammad   |  last reply


Problems with the 4511b IC chip??

SO i made a circuit which is a binary adder(using the 4008b) that adds numbers in binary and then passes on the result to a 4511 IC(its a BCD to 7 segment decoder),so basically it adds numbers in binary and displays them in decimal .It seemed to work fine for a while but then suddenly when i tried adding 0011 +0001(3+1) in binary ,it still displayed 0 and then i tried tapping the battery for a second or two and then suddenly the seven segment display shows 4 .The circuitry is all fine and right .but do i have to connect latch enable(pin 5) pin of the Ic?.Both the IC's run on a 9v battery and for the 4511 decoder IC i used 33k pull down resistor .Is my pull down resistor value for the 4511 IC too high ?The binary adder part seems to work very well,its the bcd to 7 segment decoder IC part that I'm very much concerned about.Is there too less power for both the chips to run on?I've not got a single idea at all .so, >PLS help me if you can.

Question by Strontium   |  last reply


Dear Instructables, how would i go about creating a 3 digit up counter that reacted to 3 buttons of different values?

Basically i'm designing and making a scoreboard for a rugby match for an a-level course. I'll explain the buttons of different values first, in rugby (for those who don't know) there are 3 different ways that the score can increase 2 points (conversion), 3 points (penalty, drop goal) and 5 points (try). I already know how to make a circuit to increase in 1's but i wasn't sure if you could do it with 3 different values in the same circuit. I was thinking of using a 4024 seven bit counter connected to a bcd to led decoder then to 7 segment led displays. is there anything out there which could make my job easier or do you have any advice or could you help me? Thanks alot, Hrimiller Edit: 4024 seven bit counter connected to a bcd to led decoder then to 7 segment led displays

Question by hrimiller   |  last reply


How can I apply a calculation to a frequency counter?

I am trying to find a way to convert frequency (as in cycles per second (literal cycles of a wheel)) into speed. I've found schematics and code for a frequency counter, but I want to be able to display the actual speed in MPH in LEDs. The calculation is simple enough to do - I just need to know if there is a way that I could covert the output of a frequency counter to MPH by way of some calculation, and if so, how.  essentially, I want to learn how to program, say, a PIC micro to read how often a reed switch is closed, then translate that into a readable speed on 7-segment leds. where should I start? what kind of chip should I use? Where do I learn to code? I am pretty much lost thanks for reading

Question by phephq   |  last reply


Circuit for 8 bit number to BCD?

For a TTL project I'm working on, I wanted to have 7 segment display output for the 8 bit numbers it works with. After searching on google and not finding very well documented circuits, I decided to ask here. Because the input is 8 bit, it should output 3 numbers. I only need the circuit to do the BCD because I can use 7 segment display drivers from there. (Like a 7446 IC) Thank you.

Question by Super_Nerd   |  last reply


I need an arduino temperature and humidity sensor WITHOUT Wifly

Hi all, I am looking to make an arduino temperature and humidity sensor with an onboard display. I am fairly new to arduino but do have electronics experience. I am looking to just look at the thing and be able to read the temperature and humidity without having to go into the other room and kick someone off of the computer. I currently have an arduino uno, a RHT03 Humidity and Temperature Sensor, several 7 segment displays, enough LEDs to make a led matrix or clock type setup, and a Nokia 5110 graphic LCD with arduino board (which I could remove if needed) found at https://www.sparkfun.com/products/10773  Any help would be greatly appreciated. Thank you all. Professorred

Topic by professorred   |  last reply


Problems with my arduino mini shield

So i built an arduino mini shield for displaying numbers(i used the 4511 bcd to 7 segment decoder ic ) using only 4 pins excluding v+ and v-(power).It seemed to work well for while but later when i tried displaying 0001 ( 1 in binary) ,it suddenly stopped working or some all the segments got dimly lit . .Also if i plug it into the breadboard and connect some jumpers to the pins of the arduino(+5v and gnd) ,it seems to work fine,however when i plug it directly into the arduino,setting pin13 high and the gnd pin near it ,it does'nt work properly and all the segments glow dimly.The control pins for the digits are pin 12,11,10 and 9.also when i plug it into the breadboard and instead of connecting the pins with jumpers to +5v and gnd of the arduino,if i connect it to pin 13(HIGH) and the gnd near it it displays only 8, also can't i use pin 13 being HIGH as 5v' s? WHAT AM  I SUPPOSED TO DO?

Question by Strontium   |  last reply


Push button duration measurement inside FPGA

Hello, I need to measure the time between press and release a button in an FPGA (time between rising and faling edge) and dispaly the time result the seven segment dispaly of the FPGA , I do somethink but it doesn t work , can any one help please or give a program ,????

Topic by mirabelle275 


Multiplexing more than 100 7segment LED displays with a microcontroller

What are the multiplexing techniques to interface about 100 7segment displays to a 8-bit microcontroller (say 8051). If I hook up a row of decoders to the control pins of the display array on a common bus, I guess I might acheive it. But I doubt if there would be any flicker while doing so. Say for example, If I have 64 pairs of 7seg digits to be controlled, I may do a round-robin multiplex to the tune that each pair is ON for about 1ms in every 64 ms. Will that be possible, given that the duty cycle and frequency are of that order? Thanks for your invaluable response. Regards, Ather

Topic by blue_flare 


How can i make an up/down counter with arduino?

I would like some help making a 2 digit up/down counter with arduino that resets to a preset-able number and how to connect it to a 2 digit 7-segment display, all responses are appreciated.

Question by BBru62   |  last reply


Circuit for digital time control

In my design classroom project, my students want to build a 230V AC electric immersion heater (for heating water in a bucket) whose duration of heating the user should be able to set. The user should be able to set the ON duration by pressing up- and down- keys (operating 2 switches) to increase or decrease numbers that show on a dual 7-segment display (for showing 1-99). The numbers that show in the 7-segment display is the time in minutes the heater should stay on for and then switch itself off. Please guide me to a circuit that would do the above. All our induction cookers, washing machines, etc have this interface, I know this is not something new, but not being an electronics person I don't know where and with what terminology to look. Please help.

Question by ranjit_k   |  last reply


Can someone please help me create a simple 7-segment number display? [see below for details]

Background info : My name is Simon. I'm a member of the Classic Celica Club of Victoria (Australia) that competes in an anual event called the Winton 6hr Regularity Relay. It's a 6 hour long track event with about 40 teams and 6 cars per team. Each team has one car on the track for the 6 hours. Prior to the race, each car nominates a time that they believe they can consistently do for their share of the race (usually approx. an hour each). Points are awarded for each lap achieved that is within 1 second of the nominated time. Points are deducted for any lap that is faster than the nominated time. The thing is THE DRIVERS CANNOT CARRY ANY FORM OF TIMING DEVICE IN THE CAR. The aim : To build a board that clearly displays a 3 digit time. (eg: 1min 56sec).  Team members will time the car on the track and then use the board to display the time for the driver to read as they pass by the pit wall.  (note: this practice is not against the rules). The requirements : The board must be big enough, and clear enough, to be read from >75m away. The adjustment of the board must be very quick and intuitive. (the task of timing is shared around and there's no time to train people to use the device). The board must be light enough to be held by outstretched arms. No timing device is required in the board itself. The time displayed on the board isn't always the time that is recorded. Adjustments are sometimes made for one reason or another. Scrolling through the numbers is fine, so long as you can scroll both up and down. Each digit should be completely individual (ie: not linked). Layout : [see attached images] I was thinking of using a typical 7-segment display layout made up of 79 x 10mm LEDs. The actual physical construction of the board is well within my ability. It's all the circuitry that i am clueless on.  I am a total newbie so please be gentle when describing electronics. I'm new to instructables but i have spent quite a few hours searching this site for answers. The thing i've found is that my device is far simpler than anything posted on here but i'm still too much of a newb to work out how to do it. ps: I hope i have posted in the correct section. Simon.

Question by Si Mo   |  last reply


How can I make an ammeter for ~5V DC up to 3A? I want to connect this ammeter to a microcontroller.

I want to connect this ammeter to a microcontroller ADC and display it on 7-segment displays. I guess a 10W resistor ~0.1ohms or something will be involved. I can obtain them easily. I want to make an inline USB ammeter. I am experienced with PICAXE microcontrollers and surface-mount.

Question by jdorne   |  last reply


Question about calling arduino functions?

So i'm messing with some 7-segment displays and i have a function for each number to display, right now I'm ending up using a ton of if statements to control which number's function is called based on a value, however I wondered if there was a way to output a number or value that would select the function for instance the functions I'm using are named 0-9 so if I could have it setup in some way almost as if it were like this "(value)();" instead of the if statements to activate each function 

Question by JakeWhelchel 


in addition to my RFID chess board Q, i'd also like to know if anyone has a source for LCD clock faces.?

Thing is, i'm an old school blitz player and i know a lot of others are as well. digital chess clocks are cool, but there is something cold about a seven segment display. also the chronos clocks are super expensive. we like the look and feel of analogue clocks, but like the accuracy of digital. i mean the ultimate for me would be to have a clock with a stepper motor and control it directly, but that's out of my realm right now. what i'm looking for is a lcd clock face that has the look of an analogue clock. like the image included. this way i could have the best of both worlds, a countdown timer with an analogue face. plus it would make for a great kit.

Question by fusion   |  last reply


diode logic

I'm making a giant adding machine using only resistors(miscellaneous), switches SPST (for input) LEDs (for display) and diodes(for logic). NO TRANSISTORS I have it so that it can recognize 0,1,2,3,4,5,6,7,8,9, but if it recognizes 8, then it recognizes it as all the other numbers. If it recognizes 0, it recognize 1, and 7. If it recognizes 6 it recognizes 1, and 5. If it recognize 9 it also recognize 7. If it recognizes 3, it also recognizes 7. basically if you take a 7 segment display, any number on it, it'll recognize all the numbers in the number. I need help sorting it ou so that if it recognizes 8, it only recognizes 8. If it recognizes 3, it only recognizes 3. Etc...

Topic by guyfrom7up   |  last reply


My last instructable is not showing up in recent section

Yesterday, I posted a instructable in Technology section under Arduino channel. The public link works, but it is not showing up in recent as well as in search results. Here is the link - https://www.instructables.com/id/DIY-Digital-Clock-With-7-Segment-LED-Display/. Can anyone address this problem and suggest what I did wrong there? This never happened before to me.

Topic by Being Engineers   |  last reply


Arduino LED Clock RGB?

This is probably too big of a project for a first timer.I do not own a Arduino but plan to get one in the next few weeks or so or whenever Make releases the Getting started with Arduino KIT Again. I'm planing my project so that I can work on it with the fewest problems. I had the idea from 5volts fire extinguisher striking clock. My question is that is there a way that I can use RGB LEDs? I just wanted to use RGB LEDs instead of 7 segment displays but use the same layout and have a nice color fade with the time.http://www.5volt.eu/archives/16 Look for his schematic and code.The schematic shows a easy way to hook up a 7 segment display to an Arduino. I'm just not sure how to control another color. I was thinking maybe 3 BU2090's going from pins 12 an 13 and using the Arduino to control the power going to them. 5volt suggested triple multiplexing but I'm not too sure on how to do that. Also I'm not sure on common anode or common cathode LEDs?(I don't want to use 54 of each color.)As for clock face I was thinking like in the picture. 2 LEDs per segment, 8 for the colon. That is a 24"x12" box using 10mm LEDs. Center to center LED height is 7.125"Any help would be appreciated I have hit a snag trying to figure this out.

Topic by Rob K 


analogue-digital cmos chips? Answered

Is there a chip like the LM3914 that takes an analogue voltage input and turns it into a digital signal? (preferably BCD, but decimal is fine too), but without the inverting output, so I can use it with other CMOS chips? I basically just want a chip that takes an analogue signal, and based on a threshold, divides it up into a decimal (or binary) signal. Specifically, I want to use it with a thermistor and a 7-segment display to make a digital thermometer.

Question by andy70707   |  last reply


hi..u know how to improve go-cart using motion sensor? Answered

Im electronic student and i need to finish my project about to improve go-cart using electronic system so i want to built a car that can detect out current place in race by display it using 7 segment..its using motion sensor to detect other car that tress passing us..can anyone help me?

Question by palabuto   |  last reply


Connect a Sketch Answered

This is a People counter, well hope to be if working.ha. Lazer across a doorway hitting a LDR. The 4 digit 7 seg display counting up 1 each time a person breaks the beam.  As of now i  have a counting sketch from the Sparkfun example. It is counting up 0 to 999 and at the same time i have an LDR reading to the serial monitor and blinking the LED on pin 13. But they are not "interacting". I am trying to get the beam breakes from the LDR to advance the count by 1 every time it is broken. In the loop function is the mills that was advancing the counting. I have changed it to   displayNumber(counter).  Among other things.But i haven't been successful in having the LDR advance the count. The sketch is still missing some "stuff". What could i change to have the counter advance by 1 every time the lazer beam is broken?    Thanks W /* 6-13-2011 Spark Fun Electronics 2011 Nathan Seidle This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 4 digit 7 segment display: http://www.sparkfun.com/products/9483 Datasheet: http://www.sparkfun.com/datasheets/Components/LED/7-Segment/YSD-439AR6B-35.pdf This is an example of how to drive a 7 segment LED display from an ATmega without the use of current limiting resistors. This technique is very common but requires some knowledge of electronics - you do run the risk of dumping too much current through the segments and burning out parts of the display. If you use the stock code you should be ok, but be careful editing the brightness values. This code should work with all colors (red, blue, yellow, green) but the brightness will vary from one color to the next because the forward voltage drop of each color is different. This code was written and calibrated for the red color. This code will work with most Arduinos but you may want to re-route some of the pins. 7 segments 4 digits 1 colon = 12 pins required for full control */ #define ldrPin A2    // pin used for input (analog)    int digit1 = 11; //PWM Display pin 1 int digit2 = 10; //PWM Display pin 2 int digit3 = 9; //PWM Display pin 6 int digit4 = 6; //PWM Display pin 8 //Pin mapping from Arduino to the ATmega DIP28 if you need it //http://www.arduino.cc/en/Hacking/PinMapping //int ldrPin = A2; int segA = A1; //Display pin 14 int segB = 3; //Display pin 16 int segC = 4; //Display pin 13 int segD = 5; //Display pin 3 int segE = A0; //Display pin 5 int segF = 7; //Display pin 11 int segG = 8; //Display pin 15 int ldr_pinValue; int counter; int currState; int then; //int ldrpread; //int digit[4]; //int leftover; int LDR = A2;                                //analog pin to which LDR is connected, here we set it to 0 so it means A0 int LDRValue = 0;                    //that’s a variable to store LDR values int light_sensitivity = 500;  //This is the approx value of light surrounding your LDR //int digit_to_show = 0; int ldr_Pin = 0;  // LED status (0 = low, 1 = high) int inVal = 0;    // variable used to store state of input int switchOn = 725;   // value at which we switch LED on int switchOff = 550;  // value at which we switch LED off void setup() {         {     Serial.begin(9600);            //start the serial monitor with 9600 buad     pinMode(13, OUTPUT);     //we mostly use13 because there is already a built in yellow LED in arduino which shows output when 13 pin is enabled   }       pinMode(ldr_Pin, INPUT );    pinMode(segA, OUTPUT);   pinMode(segB, OUTPUT);   pinMode(segC, OUTPUT);   pinMode(segD, OUTPUT);   pinMode(segE, OUTPUT);   pinMode(segF, OUTPUT);   pinMode(segG, OUTPUT);   pinMode(digit1, OUTPUT);   pinMode(digit2, OUTPUT);   pinMode(digit3, OUTPUT);   pinMode(digit4, OUTPUT);     pinMode(13, OUTPUT); } void loop(){ {     LDRValue = analogRead(LDR);          //reads the ldr’s value through LDR which we have set to Analog input 0 “A0″     Serial.println(LDRValue);                  //prints the LDR values to serial monitor     delay(5);                                                //This is the speed by which LDR sends value to arduino     if (LDRValue < light_sensitivity)       {         digitalWrite(13, HIGH);       }     else       {         digitalWrite(13, LOW); {    if (currState() >  300) then         currState = HIGH    } else     currState = LOW //endif if currState != prevState and currState == LOW then // LOW or HIGH depending on the circuit     counter++     prevState = currState endif      //long startTime = millis();   displayNumber(counter);     //while( (millis() - startTime) < 2000) {   //displayNumber(1217);   //}   //delay(1000);    } //Given a number, we display 10:22 //After running through the 4 numbers, the display is left turned off //Display brightness //Each digit is on for a certain amount of microseconds //Then it is off until we have reached a total of 20ms for the function call //Let's assume each digit is on for 1000us //Each digit is on for 1ms, there are 4 digits, so the display is off for 16ms. //That's a ratio of 1ms to 16ms or 6.25% on time (PWM). //Let's define a variable called brightness that varies from: //5000 blindingly bright (15.7mA current draw per digit) //2000 shockingly bright (11.4mA current draw per digit) //1000 pretty bright (5.9mA) //500 normal (3mA) //200 dim but readable (1.4mA) //50 dim but readable (0.56mA) //5 dim but readable (0.31mA) //1 dim but readable in dark (0.28mA) void displayNumber(int toDisplay) { #define DISPLAY_BRIGHTNESS  500 #define DIGIT_ON  HIGH #define DIGIT_OFF  LOW   long beginTime = millis();   for(int digit = 4 ; digit > 0 ; digit--) {     //Turn on a digit for a short amount of time     switch(digit) {     case 1:       digitalWrite(digit1, DIGIT_ON);       break;     case 2:       digitalWrite(digit2, DIGIT_ON);       break;     case 3:       digitalWrite(digit3, DIGIT_ON);       break;     case 4:       digitalWrite(digit4, DIGIT_ON);       break;     }     //Turn on the right segments for this digit     lightNumber(toDisplay % 10);     toDisplay /= 10;     delayMicroseconds(DISPLAY_BRIGHTNESS);     //Display digit for fraction of a second (1us to 5000us, 500 is pretty good)     //Turn off all segments     lightNumber(10);     //Turn off all digits     digitalWrite(digit1, DIGIT_OFF);     digitalWrite(digit2, DIGIT_OFF);     digitalWrite(digit3, DIGIT_OFF);     digitalWrite(digit4, DIGIT_OFF);   }   while( (millis() - beginTime) < 10) ;   //Wait for 20ms to pass before we paint the display again } //Given a number, turns on those segments //If number == 10, then turn off number void lightNumber(int numberToDisplay) { #define SEGMENT_ON  LOW #define SEGMENT_OFF HIGH   switch (numberToDisplay){   case 0:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_OFF);     break;   case 1:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 2:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 3:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 4:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 5:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 6:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 7:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 8:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 9:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 10:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   } }

Question by WWC   |  last reply


Simplest way to build a stopwatch (max 59 minutes and 59 seconds i.e, 59:59) without coding or programmable ics?

Hi,    I am trying to make a stopwatch that counts from 1 second to 59 minutes. Almost all the circuits that I've seen involves some kind of coding or programmable ics. But I don't want that. I'll be using a quartz crystal as my 1 Hz base and 4 individual 7 segment displays ( 2 for seconds and 2 for minutes). I know how to use decade counters to count till 60 seconds but I need help for turning 60 seconds to 1 minute and reset the 7 segments that represent seconds. In a nutshell, I would like to know how to change 00:59 to 01:00.  A counter that updates after every six "inputs" could solve everything. A link to a a circuit diagram would be helpful too.

Question by Adarsh_tronix   |  last reply