to count digit from 1 to 999 on 3 digit seven segment

hello !!!
if you have any program regrading to this subject , than kindly email me
i will remain very very thankful to you because i am beginner
email: vinod_94@outlook.com

Try looking for "seven segment counter" in the search box at the top of this page.

You should be able to get enough information to write your own.

We will help if you have problems.

Weedpharma

still i am confused.... because i could not find program for 3 digit. if it possible than guide me

I will guide you to the relevent materials...

It sounds more like you want someone to make it and code the whole thing for you.

You specification seems very....ummmm.....lacking?

"I want a counter that just goes from 0-999."

READ THIS!
[u]http://www.electronics-tutorials.ws/blog/7-segment-display-tutorial.html[/u]

Each display needs 7 pins. You could multiplex...but I would not know where to start on that.
Easier option are 7 segment display drivers...BCDs.

They take a 4 bit (4 pin input) to give the numbers 0-9.

Having 3 displays, means you need 12 I/O pins on your arduino.

A way to further reduce the pins (if you really need to?)

  1. Use the 3 BCDs to control the segment displays.

  2. Use 2 8bit Serial to Parallel Shift Registers. This would allow you to use only 3 pins to control all displays...2 pins for the registers (to send the data) and one for the clock.

If this is over your head...research these in order:

  1. Learn to use 1 seven segment display with just an arduino.
  2. Learn about BCDs...how they can take a 4 bit (4 wire) input to power the 7 segments.
  3. Learn about shift registers...to reduce pin usages.

i did on one digit seven segment, 2 digit sevent segment

but for 3- digit i m confused

Hi,
Show us your code for what you have tried using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Tom.... :slight_smile:

Vinod_94:
i did on one digit seven segment, 2 digit sevent segment

but for 3- digit i m confused

Did you understand the difference between one digit and two? Or do you mean you found some code to blindly copy and paste for both of those?

Delta_G:
Did you understand the difference between one digit and two? Or do you mean you found some code to blindly copy and paste for both of those?

This is what I meant.

I feel the OP has little to no understanding of code and/or hardware, but can follow a list of instructables well.

He/She may better understand and gain more by reading around the topic (note my link) for a day to see how they can work this out for themselves.

i did this program :
#define ontime 3000
#define A 2
#define B 3
#define C 4
#define D 5
#define E 6
#define f 7
#define G 8
#define DP 9

#define CC1 10
#define CC2 11
#define CC3 12

#define numbersegments {
{1,1,1,1,1,1,0,0},
{0,1,1,0,0,0,0,0},
{1,1,0,1,1,0,1,0},
{1,1,1,1,0,0,1,0},
{0,1,1,0,0,1,1,0},
{1,0,1,1,0,1,1,0},
{1,0,1,1,1,1,1,0},
{1,1,1,0,0,0,0,0},
{1,1,1,1,1,1,1,0},
{1,1,1,0,0,1,1,0}
}

byte numbers[10][8] = numbersegments;

const int segments[8] = { A, B, C, D, E, f, G, DP };

void setup() {
Serial.begin(9600);
pinMode(A, OUTPUT);
digitalWrite(A,LOW);
pinMode(B, OUTPUT);
digitalWrite(B,LOW);
pinMode(C, OUTPUT);
digitalWrite(C,LOW);
pinMode(D, OUTPUT);
digitalWrite(D,LOW);
pinMode(E, OUTPUT);
digitalWrite(E,LOW);
pinMode(f, OUTPUT);
digitalWrite(f,LOW);
pinMode(G, OUTPUT);
digitalWrite(G,LOW);
pinMode(DP, OUTPUT);
digitalWrite(DP,LOW);

pinMode(CC1, OUTPUT);
digitalWrite(CC1,HIGH);
pinMode(CC2, OUTPUT);
digitalWrite(CC2,HIGH);
pinMode(CC3, OUTPUT);
digitalWrite(CC3,HIGH);

}

void loop() {
for (int digit1=0; digit1 < 10; digit1++) {
for (int digit2=0; digit2 < 10; digit2++) {
for (int digit3=0; digit3 < 10; digit3++){

for(int t=0; t<20;t++){

setsegments(digit1,CC1,ontime);
setsegments(digit2,CC2,ontime);
setsegments(digit3,CC3,ontime);

}
}
}
}
}

Well, you obviously had more code than that. This won't compile. You've left off the definition of your setsegments function.

Look at the top of the forum. See the thread that says "How to Use This Forum". Please read before posting. Pay particular attention to point 7.

Yeah, that code makes about zero sense.

Please use the code tags </> as shown in the reply box as a formatting option.

Please keep your questions out on the forum and not in my PM box.

Your error:

last_one.ino: In function 'void loop()':
last_one:72: error: 'setsegments' was not declared in this scope
'setsegments' was not declared in this scope

Is because of exactly what I said in my last reply. You are calling a function setsegments that you haven't defined.

You don't get to just make up a function call and assume that the compiler will somehow read the name and figure out what you want it to do. You have to actually write that function or it doesn't exist.

error comes on this commond

setsegments(digit1,CC1,ontime);
setsegments(digit2,CC2,ontime);
setsegments(digit3,CC3,ontime);

error:Arduino: 1.6.5 (Windows 8), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

The sketch name had to be modified. Sketch names can only consist
of ASCII characters and numbers (but cannot start with a number).
They should also be less than 64 characters long.

Yes, again, there is no function called setsegments. You either have to write it or include some library with a function by that name.

here i sending error, plz solve my project, this is assignment for me

I didn't realize this was an assignment. Please give us the teachers name and e-mail as we may have questions for him or her about our homework.

Did your teacher explain to you what the modulo operator does? (the percent sign %)

Again we get to do someone's homework. Given minimal information and no research we are expected to provide a finished product. And we get none of the kudos!

When will they learn that this is not how the forum works.

I am glad that most members keep with the "help but not do the job" ethos. How are they going to learn otherwise?

Weedpharma

I have a tendency, especially when it happens via PM, to ask for the teachers name and email address in case I have questions about the assignment. It hasn't worked yet, but I'll get one someday.

I have a tendency, especially when it happens via PM, to ask for the teachers name and email address in case I have questions about the assignment. It hasn't worked yet, but I'll get one someday.

Maybe this could be added to Nicks posting instructions.

.

feeling Happy ...
finally done it by using some technique... and it became acceptable :slight_smile: :slight_smile: