some segment don't lit


ezeh

Recommended Posts

Hi GadgetFactory.

 

First of all I would like to thank you for providing an inexpensive board which allows to gain experience with FPGAs and VHDL with little money.

 

I tried to show numbers on the 7segment display. But for some reason some segments don't lit. (see in the attached picture)

 

What I have:

#include <Multiplex7SegSW.h>

byte digitPins[] = {11, 8, 2, 0,28}; // LSB to MSB
byte segmentPins[] = {7, 10, 5, 6, 3, 4, 9, 1}; // seg a to g and DP
#define  noOfDigits  5

void setup() {     
  Multiplex7SegSW::set(1, noOfDigits, digitPins, segmentPins); 
}

void loop() {
  Multiplex7SegSW::writeChar(0,'8');
  Multiplex7SegSW::writeChar(1,'8');
  Multiplex7SegSW::writeChar(2,'8');
  Multiplex7SegSW::writeChar(3,'8');
  Multiplex7SegSW::writeChar(4,':');
  Multiplex7SegSW::update();

post-36558-0-69711800-1362316088.jpg

Link to comment
Share on other sites

Hi! I just tried to do the same - Did you grab the LogicStart librarys "GadgetFactory / LogicStart-MegaWing-2.1" in GitHub? If so, they are for the (as yet unreleased) LogicStart 2.1. Maybe that is it?

 

I just downloaded the IDE (I've never used it before with Papilio!) and tried the following code.

 

// On my PapilioOne+LogicStart it shows '8' on all digits, and the decimal point too

byte digitPins[] = {11, 8, 2, 0}; // LSB to MSB
byte segmentPins[] = {7, 10, 5, 6, 3, 4, 9, 1}; // seg a to g and DP
 
void setup() {     
  int i;  
  for(i = 0; i < sizeof(digitPins); i++)
  {
    pinMode(digitPins, OUTPUT);         
    digitalWrite(digitPins, HIGH);
  }
    
  for(i = 0; i < sizeof(segmentPins); i++)
  {
    pinMode(segmentPins, OUTPUT);         
    digitalWrite(segmentPins, LOW);
  }
  // digitalWrite(segmentPins[6], HIGH); Uncomment this to display '0's
}
void loop() {
  int i;  
  // Display all the segments on all digits at 100Hz refresh
  for(i =0; i < sizeof(digitPins); i++)
  {
    digitalWrite(digitPins, LOW);
    delayMicroseconds(250);
    digitalWrite(digitPins, HIGH);
  }
  delay(9);  // Digits are only on for 1/4th of a ms, every 10th ms
}
 

Gave the result I was after...

Link to comment
Share on other sites

Hi Hamster.

Thanks for your quick reply.

 

 

I copied your code, pasted it into Arduino 0018, compiled and uploaded to my board. And it looks the same!

So at the moment it looks like that my LogicStart-MegaWing has a number of non-functioning segments.

 

 

Yes, I confirm that I downloaded "LogicStart-MegaWing-2.1-master.zip". I took the folder "Multiplex7SegSW"
(containing Multiplex7SegSW.h and Multiplex7SegSW.cpp) and copied it into the Libraries folder of "Arduino 0018"

Thanks for letting me know, that this does not fit to my board.

 

Edward

Link to comment
Share on other sites

Ezeh,

 

I'm sorry you are having this issue with your board, as a final check, can you make sure the board is plugged in correctly? I've seen this before when I'm testing boards and don't get the pins lined up correctly. If that does not do it then it sounds like you have already done a good test against something known to work and we just need to replace your board with a good one. If you send an email to support@gadgetfactory.net with a mailing address we will work out a replacement.

 

Thanks,

 

Jack.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.