Go Down

Topic: Led 4 segment display - MAX7219 (Read 287 times) previous topic - next topic

Coo3a

Hello guys!
I need little help.
Someone can told me what could be wrong with my "project"
I am crazy now... The same is with 8x8 led matrix.
In my opinion its something wrong with driver - MAX7219 - but what?! Maybe is it a problem with serial transmision?

Do you have any ideas? I need to order next driver?
The same "wierd" things happening with 8x8 led matrix and driver...
Plz take a look
https://youtu.be/-tDZ4dQFLBI

And don't kill me if my post was writen in wrong topic.
I am frustrated now...

Thanks in advance
Regards
Coo3a


P.S. 8x8 matrix work properly with only arduino, the same with segment led display.
I am newbie:(

INTP

Newbies always blame the hardware and don't show their code.

Work on not doing that.

marco_c

What is it supposed to be doing? What the video shows is a LED display showing stuff. As far as we know, it could be showing exactly what you want.

Post your code.

Post your circuit.

Otherwise all we can do is sympathize with you.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Coo3a

Hi guys!
Thanks for reply and notes:)

Here is my code. This one is an example code of "LedControl" library.
I think that this code is ok, because this is example code and i didn't change anything.
I use this one becouse i only want to check my MAX7219 driver.

Quote
//We always have to include the library
#include "LedControl.h"

/*
 Now we need a LedControl to work with.
 ***** These pin numbers will probably not work with your hardware *****
 pin 12 is connected to the DataIn
 pin 11 is connected to the CLK
 pin 10 is connected to LOAD
 We have only a single MAX72XX.
 */
LedControl lc=LedControl(12,11,10,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime=250;

void setup() {
  /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}


/*
 This method will display the characters for the
 word "Arduino" one after the other on digit 0.
 */
void writeArduinoOn7Segment() {
  lc.setChar(0,0,'a',false);
  delay(delaytime);
  lc.setRow(0,0,0x05);
  delay(delaytime);
  lc.setChar(0,0,'d',false);
  delay(delaytime);
  lc.setRow(0,0,0x1c);
  delay(delaytime);
  lc.setRow(0,0,B00010000);
  delay(delaytime);
  lc.setRow(0,0,0x15);
  delay(delaytime);
  lc.setRow(0,0,0x1D);
  delay(delaytime);
  lc.clearDisplay(0);
  delay(delaytime);
}

/*
  This method will scroll all the hexa-decimal
 numbers and letters on the display. You will need at least
 four 7-Segment digits. otherwise it won't really look that good.
 */
void scrollDigits() {
  for(int i=0;i<13;i++) {
    lc.setDigit(0,3,i,false);
    lc.setDigit(0,2,i+1,false);
    lc.setDigit(0,1,i+2,false);
    lc.setDigit(0,0,i+3,false);
    delay(delaytime);
  }
  lc.clearDisplay(0);
  delay(delaytime);
}

void loop() {
  writeArduinoOn7Segment();
  scrollDigits();
}
And the electrical scheme is attached below.
The difference is number of segments from 8 to 4 but i think that it isn't problem.
Any ideas?
Best Regards
Coo3a!

P.S
I'am in buissnes trip now and i don't have enougth time to prepare perfect post (and newbie:P )


INTP


marco_c

Can you please use the </> to post code, not the quotes, as it makes it more legible.

1.
Quote
The difference is number of segments from 8 to 4 but i think that it isn't problem.
You have 4 digits, made up of 8 segments each. A segment is one LED, a digit is made up of 8 LEDs.
This could just be a language problem, but have you connected these the right way?

2. Your circuit is for common cathode digits. Have you confirmed that the digits you have wired up are common cathode? You need to look at the part number and the data sheet for the part.

3. How have you wired the interface to the Arduino, as per the sketch pinout? Would be a good idea to recheck that.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Coo3a

Hello,
Marco,
1.
Quote
You have 4 digits, made up of 8 segments each. A segment is one LED, a digit is made up of 8 LEDs.
This could just be a language problem, but have you connected these the right way?
Yep my wrong, you are right this is a 4 digit & 8 segment.
Yes i was.

2.
Quote
Your circuit is for common cathode digits. Have you confirmed that the digits you have wired up are common cathode? You need to look at the part number and the data sheet for the part.
I checked sheets and this display is common anode ( to be sure i checked with multimeter - common anode), but then i downloaded right scheme & source code with library from this topic:http://forum.arduino.cc/index.php?topic=121174.0

3.
Quote
How have you wired the interface to the Arduino, as per the sketch pinout? Would be a good idea to recheck that.
Yes i was... (as new sketch pinout)

But when i am checking the voltage between MAX7219 SEG & DIG pins it's look like the voltage is reverse. I mesure + 4V (to gnd) on DIG pin and 0,6V (to gnd) on SEG pin... Something is wrong...
I am using now this code:
Code: [Select]

#include "LedControl.h"
LedControl lc=LedControl(12,11,10,1,true); // lc is our object
// pin 12 is connected to the MAX7219 pin 1
// pin 11 is connected to the CLK pin 13
// pin 10 is connected to LOAD pin 12
// 1 as we are only using 1 MAX7219
// true since this is a common anode display setup
void setup() {
 lc.shutdown(0,false); // turn off power saving, enables display
 lc.setIntensity(0,5); // sets brightness (0~15 possible values)
 lc.clearDisplay(0); // clear screen
}
void loop() {
 // display 0-7, cascading on the 8 displays
 for(int i=0; i<8; i++) {
   lc.setDigit(0,i,i,false);
   delay(250);
   lc.clearDisplay(0);
 }
}


And wiring is:
Code: [Select]
Wiring for Common anode display

MAX7219 | Display
DIG-0   | SEG-DP
DIG-1   | SEG-A
DIG-2   | SEG-B
...     | ...
DIG-7   | SEG-G
SEG-DP  | Anode of Digit 0
SEG-A   | Anode of Digit 1
...     | ...
SEG-G   | Anode of Digit 7


Any ideas guys?
Do you have a simple source code to check that driver?

INTP

Seg and Dig can both be written HIGH or LOW, so there is no "wrong" voltage.

Dig will be written HIGH to be OFF
and
Seg will be written LOW to be OFF


You should read the MAX7219 datasheet and run through all of the parameters. Maybe you have encoding turned off or on incorrectly.

marco_c

#8
Aug 28, 2016, 01:25 am Last Edit: Sep 10, 2016, 10:00 am by marco_c
Would it be easier to get common cathode displays in the first place?

As it is everything needs to be reversed for things to wok and it would be doing my head in trying to work it out if I was in your place. The other thread has the info you need and INTP has given the right answer.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Coo3a

Thanks for help guys.
I will ordered few common cathode displays as marco_c had been saying.
It should be little easier:)
Regards
Coo3a

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy