Page 3 of 5

Re: HCMAX7219 - LED driver library

Posted: Fri Oct 27, 2017 10:11 am
by al5ki
Hi Andrew, that was brilliant recall and has solved the problem (mostly).

The sketch now compiles and uploads, but I get this error still.
/home/al5ki/Arduino/libraries/HCMAX7219/Examples/HCMODU0082_Serial_7_Segment_Module_Example1/HCMODU0082_Serial_7_Segment_Module_Example1.ino: In function 'void loop()':
/home/al5ki/Arduino/libraries/HCMAX7219/Examples/HCMODU0082_Serial_7_Segment_Module_Example1/HCMODU0082_Serial_7_Segment_Module_Example1.ino:66:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
HCMAX7219.print7Seg("HELLO !!",8);
____________________________^
Thanks again.

Re: HCMAX7219 - LED driver library

Posted: Fri Oct 27, 2017 11:18 am
by andrew
I still can't test this on a Linux computer at the moment but try this....

In the HCMAX7219.h file find this line (somewhere around line 288):

Code: Select all

void print7Seg(char TextString[], unsigned int Offset);
and change it to this:

Code: Select all

void print7Seg(const char* TextString, unsigned int Offset);

Also in the HCMAX7219.cpp file find this line (somewhere around line 53):

Code: Select all

void HCMAX7219::print7Seg(char TextString[], unsigned int Offset)

and change it to this...

Code: Select all

void HCMAX7219::print7Seg(const char* TextString, unsigned int Offset)

Remember to save both files.

Re: HCMAX7219 - LED driver library

Posted: Fri Oct 27, 2017 11:25 am
by al5ki
Wow, perfect, even down to the line numbers!!

All fixed, thank you very much Andrew.

Re: HCMAX7219 - LED driver library

Posted: Fri Oct 27, 2017 1:13 pm
by Kolki
Andrew,
Thanks for the reply,I understand now how it works from left to right.
I have one last question, wh is it not adressing the first 32 positions in the chain.

Regards.
Albert

Re: HCMAX7219 - LED driver library

Posted: Fri Oct 27, 2017 2:26 pm
by andrew
I have one last question, wh is it not adressing the first 32 positions in the chain.
By the first 32 positions do you mean the left most (indexes 64 to 96), or the right most (indexes 1 to 32)?

Re: HCMAX7219 - LED driver library

Posted: Sat Oct 28, 2017 11:46 am
by Kolki
Sorry ,
I mean the indexes from 32 to 96.
It display's everything at the right position.
From index 1 to 32 it display's nothing.

From 32 to 96 is 64 positions, with is 8 times Max7219, with is the standard number of chips,if I read the manual rigfht,
It looks like the buffersize is not expanding to the right size for 12 chips.

regards Albert

Re: HCMAX7219 - LED driver library

Posted: Sun Oct 29, 2017 8:16 am
by andrew
8 is an intriguing value for it to stop working at but I don't see any limitations in the library. When I'm back in the office tomorrow I'll get an Arduino hooked up to a scope or logic analyser to see if it's actually pushing the data out of the pin. This will at least confirm if it's a software or hardware issue.

Re: HCMAX7219 - LED driver library

Posted: Sun Oct 29, 2017 10:02 am
by Kolki
Thanks,have a nice sunday.

Re: HCMAX7219 - LED driver library

Posted: Thu Nov 02, 2017 3:54 pm
by andrew
Sorry for the delay in getting back to you, it's been a busy week and checking the library took a lot more time than I anticipated...

I've taken a good look at the code and I can't see any issues with it. I have however noticed the refresh function, which is responsible for writing the buffer to the display registers in each driver, could be improved and made more efficient. I've now updated the library to V0.4 with this improvement and also a fix for a previous posters issue. This has now been uploaded to the first post (I've not updated github yet so don't download it from there). I don't expect it to fix your problem as I couldn't see anything wrong with the previous version but I've check this new version on a logic analyser and I can see it's defiantly writing to all 12 drivers. Could you give this new version a check just in case it fixes your problem.

Re: HCMAX7219 - LED driver library

Posted: Thu Nov 09, 2017 2:06 pm
by Kolki
Sorry Andrew,
As you expected the new download did change anything,in the meantime i have ordered a new set off display's so i can do a good test on my wyring
to see if there is a problem somewhere,
Thanks for your help and i stay in tutch.
Regards
Albert