NEWBIE :D

Hello im just new in arduino programming

so i have found this project in the internet about 7 segment counters

yes i have done the 0-9 single 7 segment lighting.

my question now is..

how can i make a counter from 0-99 from 2 separate anode 7 segment using a 74LS373N IC (Multiplexer?) Weird that there is no single two digit 7 segment sold here.

anyone got a code for this? or teach me how? thank you im using an ACEduino w/ ATmega328( i know its old xD)

Here's my code for the single 7 segment:

void setup(){ pinMode(1,OUTPUT); pinMode(2,OUTPUT); pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); pinMode(6,OUTPUT); pinMode(7,OUTPUT); pinMode(8,OUTPUT); pinMode(9,OUTPUT); pinMode(10,OUTPUT); } void count0() { digitalWrite(3,HIGH); digitalWrite(1,HIGH); digitalWrite(2,LOW); digitalWrite(4,LOW); digitalWrite(5,LOW); digitalWrite(6,LOW); digitalWrite(7,LOW); digitalWrite(8,LOW); } void count1() {

digitalWrite(3,HIGH); digitalWrite(1,HIGH); digitalWrite(2,LOW); digitalWrite(4,HIGH); digitalWrite(5,HIGH); digitalWrite(6,LOW); digitalWrite(7,HIGH); digitalWrite(8,HIGH); } void count2() {

digitalWrite(6,LOW); digitalWrite(7,LOW); digitalWrite(1,LOW); digitalWrite(4,LOW); digitalWrite(5,LOW); digitalWrite(3,HIGH); digitalWrite(2,HIGH); digitalWrite(8,HIGH); } void count3() {

digitalWrite(3,HIGH); digitalWrite(7,LOW); digitalWrite(6,LOW); digitalWrite(1,LOW); digitalWrite(4,LOW); digitalWrite(2,LOW); digitalWrite(6,LOW); digitalWrite(5,HIGH); digitalWrite(8,HIGH); } void count4() {

digitalWrite(3,HIGH); digitalWrite(7,HIGH); digitalWrite(5,HIGH); digitalWrite(4,HIGH); digitalWrite(1,LOW); digitalWrite(2,LOW); digitalWrite(6,LOW); digitalWrite(5,HIGH); digitalWrite(8,LOW); } void count5() {

digitalWrite(3,HIGH); digitalWrite(7,LOW); digitalWrite(5,LOW); digitalWrite(4,LOW); digitalWrite(1,LOW); digitalWrite(2,LOW); digitalWrite(6,HIGH); digitalWrite(5,HIGH); digitalWrite(8,LOW); } void count6() {

digitalWrite(3,HIGH); digitalWrite(7,LOW); digitalWrite(5,LOW); digitalWrite(4,LOW); digitalWrite(1,LOW); digitalWrite(2,LOW); digitalWrite(6,HIGH); digitalWrite(5,LOW); digitalWrite(8,LOW); } void count7() {

digitalWrite(1,HIGH); digitalWrite(2,LOW); digitalWrite(3,HIGH); digitalWrite(4,HIGH); digitalWrite(5,HIGH); digitalWrite(6,LOW); digitalWrite(7,LOW); digitalWrite(8,HIGH); } void count8() {

digitalWrite(1,LOW); digitalWrite(2,LOW); digitalWrite(3,HIGH); digitalWrite(4,LOW); digitalWrite(5,LOW); digitalWrite(6,LOW); digitalWrite(7,LOW); digitalWrite(8,LOW); } void count9() {

digitalWrite(1,LOW); digitalWrite(2,LOW); digitalWrite(3,HIGH); digitalWrite(4,LOW); digitalWrite(5,HIGH); digitalWrite(6,LOW); digitalWrite(7,LOW); digitalWrite(8,LOW); }

void loop() { count0(); delay(3000); count1(); delay(3000); count2(); delay(3000); count3(); delay(3000); count4(); delay(3000); count5(); delay(3000); count6(); delay(3000); count7(); delay(3000); count8(); delay(3000); count9(); delay(3000); }

Thank You :))

First off you need to learn how to program a bit better by using arrays:- http://www.thebox.myzen.co.uk/Tutorial/Arrays.html

You don't do things like that in your loop. You write a function that will display any number sent to it and then simply count up. So start off by writing a function to display a single digit passed to it. Should take no more than 20 lines.

This can help you in the very short term but using libraries for such a simple thing will stunt your growth. http://playground.arduino.cc/Main/SevenSegmentLibrary

Of course the simplest way to multiplex is to use a MAX7219 chip, you can connect 8 seven segment displays to that.

Right, let's get some things sorted things first.

Before we go any further, go and read the instructions, then go back and modify your post (use the "More --> Modify" option to the bottom right of the post) to mark up the code as such so we can discuss it conveniently and accurately.