Go Down

Topic: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum (Read 65 times) previous topic - next topic

ringz

This is the code I worked out from the Sure Electronics example and some code from the arduino education site:
Code: [Select]


//**************************************************************************************************
//Function Name: chipselect
//Function Feature: choose the chipset in which work
//Input Argument: number of the chip
//Output Argument: void
// A negative value will enable all of the HT1632Cs
// A value of 0 will disable all HT1635Cs
// A value between 1 and CHIP_MAX will enable the required HT1632C (numbers greater than CHIP_MAX are not tested for
//**************************************************************************************************
void chipselect(int chip)
{
  if(chip < 0) // enable all HT1632Cs
  {
    digitalWrite(CS, LOW);
    for(int tmp = 0; tmp < CHIP_MAX; tmp++)
    {
      digitalWrite(CLK, HIGH);
      digitalWrite(CLK, LOW);
    }
    digitalWrite(CS, HIGH); // Restore cs to default state
  }
  else if (chip == 0)  // disable all HT1632Cs
  {
    digitalWrite(CS, HIGH);
    for(int tmp=0; tmp<CHIP_MAX; tmp++)
    {
      digitalWrite(CLK, HIGH);
      digitalWrite(CLK, LOW);
    }
  }
  else
  {
      for( int tmp = CHIP_MAX; tmp >= 1; tmp--)
      {
        if(tmp == chip)
        {
          digitalWrite(CS,LOW);
        }
        else
        {
          digitalWrite(CS,HIGH);
        }
        digitalWrite(CLK, HIGH);
        digitalWrite(CLK, LOW);
      }
      digitalWrite(CS,HIGH);
  }
}


I don't have more than 1 display to test it with though.

Martyn.

evanrich


evanrich or JoeShearn,

I'm getting into this a little late since the original stuff was started around a year ago.  Can either of you supply working libraries and sample code so that I can hook up 1 or 2 of these LED modules and get crackin?

No sense re-inventing the wheel. I've worked with the 32x8 boards from sure electronics before, but the CS on these bigger ones seems to have been a whole process to work through.

Thanks


doubledaffy... look here: https://code.google.com/p/ht1632c/  thats the "current" library.  works FANTASTIC for 1, 2 displays, but major issues with 3 or 4.    Performance for 2 displays on an arudino uno is about 122 FPS according to the built in FPS program.   There seems to be a bug however if you use "RIGHT" for text direction, vs "LEFT", where it shows dots remaining at the top and bottom of the text path, almost like a ghost of the top and bottom pixels (forms a straight line across the panels)

If you can't figure out how to use the library, I'll post my code for you, but it's really easy.
My first major project (looking for people who would like to help contribute) Bluetooth Sure 32x16 LED Displays!: https://github.com/evanric

doubledaffy

Thanks, I'll take a look. The documentation looks like it's straight forward enough to work with. I was just previously unable to find the most recent version to start working with.

I'll keep you posted on progress.

evanrich


Thanks, I'll take a look. The documentation looks like it's straight forward enough to work with. I was just previously unable to find the most recent version to start working with.

I'll keep you posted on progress.


looking forward to it.   2 displays is great, but I and others really need 3 or more.   for my use, i only require up to 4 to work, some ppl were looking for 8..   

If you can get it working i'd be happy to paypal you some dough for your efforts =)
My first major project (looking for people who would like to help contribute) Bluetooth Sure 32x16 LED Displays!: https://github.com/evanric

florinc

I did not take an in-depth look at the latest (OO, generalized) library, since I find it too complicated for my simple mind (I don't mean to offend anyone).
With older libraries I see no issues for a 3-display setup (I don't have a 4th display unfortunately).

Go Up