Radio Shack 7 segment display prob

I was going to make a clock with the arduino so I investigated the 4511 chip. I got this working with butons, but when I replace the botons with digital pins 2-5 on my duemilonve some numbers work wile others dont. nums- 0.1,2,4,6,8,9 work good but 3,5,7 are very very dim. I posted a egale schamadic and my test code that takes serial inputs to display numbers. HELP! :~ :frowning:

/*
  seven segment LED display driver via serial line
  by Hayden Young
  skamadics avalible on request
  haydenyounglex@hotmail.com
*/


int message = 0;
const int a = 2;
const int b = 3;
const int c = 4;
const int d = 5;

void setup()
{
  Serial.begin(9600);
  pinMode(a, OUTPUT);
  pinMode(b, OUTPUT);
  pinMode(c, OUTPUT);
  pinMode(d, OUTPUT);
}

void loop()
{
 
  if (Serial.available() > 0)
 {
  message = Serial.read();

  if (message == '0')
  {  
  digitalWrite(a, LOW);
  digitalWrite(b, LOW);
  digitalWrite(c, LOW);
  digitalWrite(d, LOW);
  Serial.println('0');
  }
  
  if (message == '1')
  {
  digitalWrite(a, HIGH);
  digitalWrite(b, LOW);
  digitalWrite(c, LOW);
  digitalWrite(d, LOW);
  Serial.println('1'); 
  }
  
  if (message == '2')
  {  
  digitalWrite(a, LOW);
  digitalWrite(b, HIGH);
  digitalWrite(c, LOW);
  digitalWrite(d, LOW);
  Serial.println('2');
  }
  
  if (message == '3')
  {  
  digitalWrite(a, HIGH);
  digitalWrite(b, HIGH);
  digitalWrite(c, LOW);
  digitalWrite(d, LOW);
  Serial.println('3');
  } 
  
  if (message == '4')
  {
  digitalWrite(a, LOW);
  digitalWrite(b, LOW);
  digitalWrite(c, HIGH);
  digitalWrite(d, LOW);
  Serial.println('4');
  }
  
  if (message == '5')
  {  
  digitalWrite(a, HIGH);
  digitalWrite(b, LOW);
  digitalWrite(c, HIGH);
  digitalWrite(d, LOW);
  Serial.println('5');
  }
  
  if (message == '6')
  {  
  digitalWrite(a, LOW);
  digitalWrite(b, HIGH);
  digitalWrite(c, HIGH);
  digitalWrite(d, LOW);
  Serial.println('6');
  }
  
  if (message == '7')
  {  
  digitalWrite(a, HIGH);
  digitalWrite(b, HIGH);
  digitalWrite(c, HIGH);
  digitalWrite(d, LOW);
  Serial.println('7');
  }
  
  if (message == '8')
  {  
  digitalWrite(a, LOW);
  digitalWrite(b, LOW);
  digitalWrite(c, LOW);
  digitalWrite(d, HIGH);
  Serial.println('8');
  }
  
  if (message == '9')
  {  
  digitalWrite(a, HIGH);
  digitalWrite(b, LOW);
  digitalWrite(c, LOW);
  digitalWrite(d, HIGH);
  Serial.println('9');
  }
    if (message == 't')
  {  
  Serial.println("testing");
  digitalWrite(a, LOW);
  digitalWrite(b, LOW);
  digitalWrite(c, LOW);
  digitalWrite(d, LOW);
  delay(1000);
  digitalWrite(a, HIGH);
  digitalWrite(b, LOW);
  digitalWrite(c, LOW);
  digitalWrite(d, LOW);
  delay(1000);
  digitalWrite(a, LOW);
  digitalWrite(b, HIGH);
  digitalWrite(c, LOW);
  digitalWrite(d, LOW); 
  delay(1000);
  digitalWrite(a, HIGH);
  digitalWrite(b, HIGH);
  digitalWrite(c, LOW);
  digitalWrite(d, LOW);
  delay(1000);
  digitalWrite(a, LOW);
  digitalWrite(b, LOW);
  digitalWrite(c, HIGH);
  digitalWrite(d, LOW);
  delay(1000);
  digitalWrite(a, HIGH);
  digitalWrite(b, LOW);
  digitalWrite(c, HIGH);
  digitalWrite(d, LOW);
  delay(1000);
  digitalWrite(a, LOW);
  digitalWrite(b, HIGH);
  digitalWrite(c, HIGH);
  digitalWrite(d, LOW);
  delay(1000);
  digitalWrite(a, HIGH);
  digitalWrite(b, HIGH);
  digitalWrite(c, HIGH);
  digitalWrite(d, LOW);
  delay(1000);
  digitalWrite(a, LOW);
  digitalWrite(b, LOW);
  digitalWrite(c, LOW);
  digitalWrite(d, HIGH);
  delay(1000);
  digitalWrite(a, HIGH);
  digitalWrite(b, LOW);
  digitalWrite(c, LOW);
  digitalWrite(d, HIGH);
  Serial.println("Test Done");
    }
  }
}
{code]
[img]<img width="289" height="283" src="file:///C:/Documents%20and%20Settings/Young/My%20Documents/arduino%204511.png" complete="complete"/>[/img]

http://rcbuilds.webs.com/apps/photos/photo?photoid=119094442

and i am working on another website for arduino and other electronics progects

Power & ground are hooked up as well?

Yes for some reson it is ont shown in egale

The 4511 pinout looks good, levels all agree with the datasheet for straight decoding with no latching.
What display part are you using?

There's a setting in eagle to show the power pins, only used it once & I'm not sure how you get to it.

ok i am using the radio shack display prt 276-0075

I am stumped. Electrically things look good.

i dont know why but i was on a diffrent computer and tryed and it worked!!
thanks for responding and i hayve a vid of it here-

You could drive the display from a shift register as well to have more control of what is dispayed. And only uses 3 arduino pins. All digits can be driven from the same 3 pins, just daisy chain them along. Make the chain as long as you want have scrolling messages.

Get a hold of 74ACT299PC from Newark.com, can drive 24mA for a really bright display sometime in the future.
http://www.newark.com/fairchild-semiconductor/74ac299pc/ic-8bit-universal-shift-register/dp/58K3253?Ntt=74ac299pc
56 cents, I ordered 20 of them a couple of days ago.

Couple of extra pins, controls will let you shift your display left and right if you want. And can also be used as a ShiftIn device. Very handy part.

Possible 0-9, A b c d E F g h i J L o O P r S U

Cool i will investigate those it wold be nice to make a clock just cause i can enven found a display from sparkfun

I just got a couple of 4 digit, 7 segment displays from Sparkfun. They can be driven by serial TTL or SPI and are avaiable in several colors.
I am really pleased with them. You can control individual segments with bit masks.

Here is a demo video: Sparkfun 7-Segment Serial Display - Blue - YouTube

Cool By serial what do you mean like serial out thru pin 0/1 case thats what i whant

If you use the NewSoftSerial library, you can use whatever pins you wish...

Missing Eagle power pins: I think you select Invoke from the Tools menu to get them to display.
If not there search "invoke" in the forum and there are a couple posts on it, answering the same question to me :slight_smile:

Found it - right click the part, then click Invoke, it will show the power/ground pins if not shown on the device aleeady.