Show Posts
Pages: [1]
1  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 27, 2013, 05:33:47 pm
still working on this to no avail - I added to the code for the DIMMIN Pin on the board and hooked it up, but have no idea how it code it to use it...  Please help?
2  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 26, 2013, 07:20:16 pm
Fairly certain the displays are written in here:
Where do I control the DIMM Pin?

Code:
//converts num to the proper 7 segment value and writes to the home display
void displayNum(int num)
{
  int digit1 = seg_codes[num%10];
  int digit10 = seg_codes[num/10];
  shiftOut(dataPin, clockPin, LSBFIRST, digit1);
  shiftOut(dataPin, clockPin, LSBFIRST, digit10);
}

//converts num to the proper 7 segment value and writes to the visitor display
void VdisplayNum(int Vnum)
{
  int digit1 = seg_codes[Vnum%10];
  int digit10 = seg_codes[Vnum/10];
  shiftOut(VdataPin, VclockPin, LSBFIRST, digit1);
  shiftOut(VdataPin, VclockPin, LSBFIRST, digit10);
}
3  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 26, 2013, 04:26:45 pm
I did - twice- its all greek to me.  I do pc repairs and am trying to do this for a relatives backyard.  What am I missing in my code? 
4  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 26, 2013, 03:58:31 pm
KirAsh4

Im not sure - I had help coding this about a year ago and recently pulled it out of mothballs.   any direction would be appreciated
5  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 26, 2013, 03:12:00 pm
Pic 3
6  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 26, 2013, 03:10:49 pm
Pic 2
7  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 26, 2013, 03:09:31 pm
Pic 1
8  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 26, 2013, 02:40:47 pm
no idea whats in the Driver board - it came with the LED board.  I believe grounding is correct.  What is  pull-up/pull-downs on the signal lines?
9  Using Arduino / LEDs and Multiplexing / Re: LED Sure DE-DP004 Flicker issues on: April 26, 2013, 02:00:39 pm
I just did that - thanks!
10  Using Arduino / LEDs and Multiplexing / LED Sure DE-DP004 Flicker issues on: April 26, 2013, 01:49:22 pm
Hi all -

Im making a scoreboard and have 2 - 2 digit LED Displays from sure.  The code works great - up down for both and reset.  the problem im having is the non lit segments flicker madly at all times.  I know the displays are not the problem as they don't flicker on the demo driver board.

attached is the code - please advise?

Code:
//define clock and data pins
int clockPin = 12;
int dataPin = 11;
int VclockPin = 9;
int VdataPin = 8;


//copy and paste for every button
//Home Up
int upButtonPin = 4;
int lastUpButtonState = 0;

//Visitor Up
int VupButtonPin = 7;
int VlastUpButtonState = 0;



//copy and paste for every button
//Home Dn
int downButtonPin = 5;
int lastDownButtonState = 0;

//Visitor Dn
int VdownButtonPin = 3;
int VlastDownButtonState = 0;

//copy and paste for every button
int resetButtonPin = 6;
int lastResetButtonState = 0;

//The number to be displayed on the home display
int displayedNumber = 0;

//The number to be displayed on the visitor display
int VdisplayedNumber = 0;


//the values that must be written out to the shift registers
byte seg_codes[] = { 0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x5f, 0x70, 0x7f, 0x7b };

//converts num to the proper 7 segment value and writes to the home display
void displayNum(int num)
{
  int digit1 = seg_codes[num%10];
  int digit10 = seg_codes[num/10];
  shiftOut(dataPin, clockPin, LSBFIRST, digit1);
  shiftOut(dataPin, clockPin, LSBFIRST, digit10);
}

void VdisplayNum(int Vnum)
{
  int digit1 = seg_codes[Vnum%10];
  int digit10 = seg_codes[Vnum/10];
  shiftOut(VdataPin, VclockPin, LSBFIRST, digit1);
  shiftOut(VdataPin, VclockPin, LSBFIRST, digit10);
}




void setup()
{
 
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(upButtonPin, INPUT);
  pinMode(downButtonPin, INPUT);
  pinMode(VclockPin, OUTPUT);
  pinMode(VdataPin, OUTPUT);
  pinMode(VupButtonPin, INPUT);
  pinMode(VdownButtonPin, INPUT);
 
}

void loop()
{
//if Home up button pressed
  int upButtonState = digitalRead(upButtonPin);
  if(lastUpButtonState == 0 && upButtonState == 1)
  {
if(displayedNumber < 99)
{
displayedNumber++;
}
else
{
displayedNumber = 0;
}
  }
  lastUpButtonState = upButtonState;
 
  //if Visitor up button pressed
  int VupButtonState = digitalRead(VupButtonPin);
  if(VlastUpButtonState == 0 && VupButtonState == 1)
  {
if(VdisplayedNumber < 99)
{
VdisplayedNumber++;
}
else
{
VdisplayedNumber = 0;
}
  }
  VlastUpButtonState = VupButtonState;

//if down button pressed
  int downButtonState = digitalRead(downButtonPin);
  if(lastDownButtonState == 0 && downButtonState == 1)
  {
if(displayedNumber > 0)
{
displayedNumber--;
}
else
{
displayedNumber = 99;
}
  }
  lastDownButtonState = downButtonState;
 
  //if down button pressed
  int VdownButtonState = digitalRead(VdownButtonPin);
  if(VlastDownButtonState == 0 && VdownButtonState == 1)
  {
if(VdisplayedNumber > 0)
{
VdisplayedNumber--;
}
else
{
VdisplayedNumber = 99;
}
  }
  VlastDownButtonState = VdownButtonState;
 
 

//if reset button pressed
  int resetButtonState = digitalRead(resetButtonPin);
  if(lastResetButtonState == 0 && resetButtonState == 1)
  {
    displayedNumber = 0;
    VdisplayedNumber = 0;
  }
  lastResetButtonState = resetButtonState;

  displayNum(displayedNumber);
  VdisplayNum(VdisplayedNumber);
  delay(100);
 
}
Pages: [1]