chipKIT® Development Platform

Inspired by Arduino™

7 segment display

Created Wed, 31 Oct 2012 13:54:06 +0000 by scoprire


scoprire

Wed, 31 Oct 2012 13:54:06 +0000

Someone had use one board with 7 segment display like this [url]http://store.arduino.cc/it/index.php?main_page=product_info&cPath=11&products_id=127[/url] or this [url]http://nootropicdesign.com/digitshield/[/url] what is the better using 2 or 3 display at the same time? there is another better? thx


zulucat

Wed, 31 Oct 2012 20:00:42 +0000

what is the better using 2 or 3 display at the same time? there is another better?

Do you mean using two or three 4-digit displays at the same time? If the answer is yes, then your two examples won't work.They both have the same problem: the Nootropic board uses dedicated pins while the Adruino board used a fixed I2C address. This means only one board can be run at a time.

Something like this should work --

[color=#FF0000][url]http://www.adafruit.com/products/878[/url][/color]

It uses the I2c bus but has jumper pads on the back to change the address of the board. You can use 8 of the boards together for a total of 32 digits!, However, you'll need to know how to solder to hook the board up. You may also need level converters to drive the I2C Data and Clock bits.

If you use more that one board I would check the amount of current the board draws when all segments are turned on. Make sure that the total amount doesn't exceed that provided by the ChipKIT board.

Good luck - Doug


scoprire

Wed, 31 Oct 2012 21:20:28 +0000

I can use an external source of current for the displays

i found this exemple in the nootropic page

#include <DigitShield.h>

int loopCounter = 0;
float counter = 0.0;
int counter2 = 30;
int d = 10;

// Create a second Digit Shield connected to Arduino pins 6,7,8,9
// Connected to pins 2,3,4,5 on the shield, respectively.
DigitShieldClass digitShield2(6, 7, 8, 9);

// Create a third Digit Shield connected to Arduino pins 17,16,15,14 (A3,A2,A1,A0)
// Connected to pins 2,3,4,5 on the shield, respectively.
DigitShieldClass digitShield3(17, 16, 15, 14);

void setup() {
  // The static variable DigitShield refers to the default
  // Digit Shield that is directly on top of the Arduino
  DigitShield.begin();
  DigitShield.setPrecision(2);

  // Initialize the other two shields
  digitShield2.begin();
  digitShield3.begin();

  DigitShield.setValue(0);
  digitShield2.setValue(0);
  digitShield3.setValue(0);

}

void loop() {
  loopCounter++;
  DigitShield.setValue(counter);
  if (loopCounter % 100 == 0) {
    digitShield2.setValue((int)counter);
  }
  if (loopCounter % 10 == 0) {
    digitShield3.setValue((int)counter*30);
  }

  counter = counter + 0.01;
  if (counter >= 100) {
    counter = 0.0;
  }

  delay(d);



}

i would like to konw if the library <DigitShield.h> is compatible with cipkit


zulucat

Thu, 01 Nov 2012 02:06:37 +0000

i would like to konw if the library <DigitShield.h> is compatible with cipkit

No, not as it stands. The DigiShield library uses timer control registers which are specific to the uP used on the Arduino UNO board. PIC32 processors (used on ChipKIT boards) have similar control registers but they have different names and I'm sure they operate differently. The DigiShield code would need to be modified to use PIC32 control registers.


scoprire

Thu, 01 Nov 2012 10:42:10 +0000

;) ;) ;) ok, thx