Go Down

Topic: LED matrix display - MD_Parola, MD_MAX72xx and MD_MAXPanel (Read 570653 times) previous topic - next topic

marco_c

#660
Sep 22, 2015, 11:55 pm Last Edit: Sep 23, 2015, 05:34 am by marco_c
Quote
Upper zone is one step before bottom zone. Is there any way to synchronize it
Not that I can see. One zone will always be scrolled just a few milliseconds before/after the other as each zone is treated like an independent display. I guess it is one of the limitations of the library at this stage.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

jaymonkey

Earlier you said that you were using generic modules. Just tell the system you are using those. Forget about common anode or cathode matrix, that is irrelevant when you are using standard modules.

Most of the commonly available matrix modules use common anode, by the way.
@Marco

Although i am using a 'standard module' (which came with red common cathode (row)) i need the displays to be green, I have a lot of common anode (row) green displays in stock so have inverted the modules output to the correct wiring of common anode (row) matrix displays ....

if you compare common cathode to common anode matrix displays schematics you'll see that the row/col addressing is inverted .. this is true for almost all common anode matrix modules ...

The issue of using common anode displays with max7219 is discussed in this post (along with the patch i was referring to) :-

http://forum.arduino.cc/index.php?topic=121174.0

"The 7219 can be easily used with common anode displays, as long as things are wired up "backwards." In other words, the pins for DIG-0 through DIG-7 are current sinks and the pins for SEG-DP through SEG-G are current sources"

My modules and displays work fine using the LCDcontrol lib (with the patch) but it is no where near as flexable as your lib . My modules and displays do work with your lib but the rows & cols are inverted so a character is displayed as if it where in a mirror (inverted and backwards)

I'm sure i could figure out how to apply the bit shift that the patch apples to the LCDcontrol lib and modify your code similarly but i wondered if you could achieve the same result using your transform methods .... and its such a well written and documented lib that i thought it would be a useful addition ...

Cheers
Jay

marco_c

#662
Sep 24, 2015, 10:52 pm Last Edit: Sep 25, 2015, 12:27 am by marco_c
I had read the post you refer to before you highlighted it, thanks.

You are persisting in thinking about the problem in your way excluding the possibility that there are other approaches. The issue is how the matrix is wired, irrespective of what 'common' it is.

Any matrix can be physically wired so that the matrix orientation (in physical space) can have rows or columns in either direction and in any order. That is a fact.

This means that writing a library like Parola, where the code must assume a standard coordinate system for it to work, requires a mapping between the physical pixels (LEDs) and this standard coordinate system.

The hardware library (MD_MAX72xx) needs to know if (1) digits are rows or columns and (2) the order in which each axis is wired (up or down). A simplifying assumption is that the LEDs are not wired in random order.

Nowhere in this is there any need to know what type of matrix is being used, and this information is not pertinent to solving the problem in a consistent manner for many hardware module types.

Quote
My modules and displays do work with your lib but the rows & cols are inverted so a character is displayed as if it where in a mirror (inverted and backwards)
As I am sure you read in the documentation, please make sure the generic modules are physically oriented with the chips above the matrix and the 'IN' side on the right. As per my previous post, if you think you have a 'home grown' matrix, the provision is there for the software to suggest the parameter settings.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Arek00

Marco, how many devices do you have? Can you test about 20 devices with 4 zones? Just simplest example. I am trying to do that but then nothing appear on display. If you do that please post your code here.

marco_c

Do you have any code already that I can test. Don't have time to start from zero.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Arek00

Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define  MAX_DEVICES 20
#define MAX_ZONES 4

#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#define  SPEED_TIME  25
#define PAUSE_TIME  1000

void setup() {
  Serial.begin(9600);
  Serial.print("START");

  P.begin(MAX_ZONES);
  P.setIntensity(0);
  P.setInvert(false);
 
  P.setZone(0, 0, 4);
  P.setZone(1, 5, 9);
  P.setZone(2, 10, 14);
  P.setZone(3, 15, 19);

  P.displayZoneText(0, "00", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(1, "11", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(2, "22", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(3, "33", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
}

void loop() {
  P.displayAnimate(); // animates and returns true when an animation is completed
}

marco_c

Code worked for me. I changed it a bit as per below to test different combinations of zones, but this should not affect the functionality.

Code: [Select]
#define MAX_DEVICES 20
#define MAX_ZONES 4
#define ZONE_SIZE (MAX_DEVICES/MAX_ZONES)

#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#define SPEED_TIME  25
#define PAUSE_TIME  1000

void setup() {
  Serial.begin(9600);
  Serial.print("START");

  P.begin(MAX_ZONES);
  P.setIntensity(0);
  P.setInvert(false);

  for (uint8_t i=0; i<MAX_ZONES; i++)
    P.setZone(i, ZONE_SIZE*i, ((i+1)*ZONE_SIZE)-1);

  P.displayZoneText(0, "00", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(1, "11", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(2, "22", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(3, "33", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
}

void loop() {
  P.displayAnimate(); // animates and returns true when an animation is completed
}
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

marco_c

@Arek00 ref earlier synchronization post

I worked out a way to better synchronise the zones. There is now a new Parola method synchZoneStart() that needs to be called once all the zones are set up and before the first animate(). Code below shows this. Tested your code in my system and it seems to be synchronised now. I expect that for long animations the time may drift towards the end of the animation.

Code: [Select]
    switch(step) {
      case 1:
        P.setZone(0, 0, (MAX_DEVICES/2)-1);
        P.setZone(1, MAX_DEVICES/2, MAX_DEVICES-1);
        P.displayZoneText(0, "|-|-|", CENTER, 30, 1000, SCROLL_LEFT, SCROLL_LEFT);
        P.displayZoneText(1, "|-|-|", CENTER, 30, 1000, SCROLL_LEFT, SCROLL_LEFT);
        P.synchZoneStart();
        break;


The new library code is uploaded to the codeplex site in the Source code section. The only file that has changed is MD_Parola.h (in case you don't want to download all the files).

Changes will be part of the next release.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Arek00


jaymonkey

You are persisting in thinking about the problem in your way excluding the possibility that there are other approaches. The issue is how the matrix is wired, irrespective of what 'common' it is.
@Marco,

Many thanks for your patience .... i understand what your saying now ... apologies for slowness ....my bad

I stopped thinking about it and just worked through your module presets, i found that the f16 module settings did the job and it works perfect now.

Many thanks for the help bro.

Cheers
Jay


marco_c

@Arek00
Awesome work. Double height is something that has been requested many times and someone has finally done it! I can now see why you needed synchronization for the zones. :)
Is it alright if I include your sketch in the Parola examples folder?

@jaymonkey
Great to hear it all works fine now.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Arek00

Of course you can add it to examples! If possible please add link to my video at header description :)

marco_c

#672
Sep 30, 2015, 06:12 am Last Edit: Sep 30, 2015, 06:22 am by marco_c
Can someone with a Due (or other non-AVR architrecture) please try using the latest MD_MAX72xx library in the source code section of the codeplex site?

I have recently moved it over to using the SPI library for better portability but do not have the hardware to test non-AVR. Basically the examples should all work as before.

The release version (zip file download) still uses the AVR assembler routines for hardware SPI.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

valenposta

Hi Marco,
I'm using Parola Zone TimeMsg and the DS1307 library (MD_DS1307).
I noticed that the clock module 1307 is not accurate and anticipates every day...15 seconds.
How, at a fixed time of day, can I adjust the seconds?  
In DS1307 library I have not found a possibility like for example:
"RTC.adjust(DateTime(now.year(), now.month(), now.day(),now.hour(),now.minute(), now.second()-10))".
Thanks.
«La prego, Mr. Babbage, se lei inserisce nella macchina cifre errate, compariranno le risposte corrette?"... Io non sono in grado di comprendere correttamente il genere di confusione di idee che potrebbe provocare una tale domanda. » (C. Babbage)

marco_c

Quote
the clock module 1307 is not accurate and anticipates every day...15 seconds
You can use a more accurate clock like the DS3231 or related. If you want to set the time in the MD_DS1307 library set the same variables you read the time from and then write that out. The library has some examples you can follow or read the header - there are not many methods to that class.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Go Up