Pages: [1]   Go Down
Author Topic: 7 Segment connection and code  (Read 827 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Connected the middle pins both at the up and bottom to ground, a,b,c,d,e,f,g are connected to outputs as well. (didn't use any resistor for a,b,c... but GND)

The code is quite straightforward but didn't work don't know why ? At where am I wrong ?
Quote
int a = 8;
int b = 9;
int c = 10;
int d = 11;
int e = 12;
int f = 13;
int g = 7;

void setup()
{
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  pinMode(7, OUTPUT);
}
void loop()
{
  digitalWrite(a, LOW);
}
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay I've realised one of the problems.

pinMode declarations had to be as follows

pinMode(a, OUTPUT) and goes like that.

However, still nothing happens.
« Last Edit: February 09, 2013, 08:17:35 am by zoom » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you try setting any of the output pins HIGH?

Are you sure your displays are Common Cathode?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you try setting any of the output pins HIGH?

Are you sure your displays are Common Cathode?

Yes I've tried both High and low
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4329
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Connected the middle pins both at the up and bottom to ground, ...
Maybe those are not the common pins.  You haven't told us anything about the display so we really can't tell.

Quote
didn't use any resistor for a,b,c... but GND
Adequate for testing, but not a good solution.

Don
Logged

Pages: [1]   Go Up
Jump to: