Reply to topic  [ 30 posts ]  Go to page Previous  1, 2, 3
HCMAX7219 - LED driver library 
Author Message

Joined: Fri Oct 27, 2017 1:32 am
Posts: 3
Post Re: HCMAX7219 - LED driver library
Hi Andrew, that was brilliant recall and has solved the problem (mostly).

The sketch now compiles and uploads, but I get this error still.

Quote:
/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.


Fri Oct 27, 2017 10:11 am
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 708
Post Re: HCMAX7219 - LED driver library
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:
void print7Seg(char TextString[], unsigned int Offset);


and change it to this:

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



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


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



and change it to this...


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



Remember to save both files.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Fri Oct 27, 2017 11:18 am
Profile

Joined: Fri Oct 27, 2017 1:32 am
Posts: 3
Post Re: HCMAX7219 - LED driver library
Wow, perfect, even down to the line numbers!!

All fixed, thank you very much Andrew.


Fri Oct 27, 2017 11:25 am
Profile

Joined: Mon Oct 09, 2017 8:31 pm
Posts: 10
Post Re: HCMAX7219 - LED driver library
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


Fri Oct 27, 2017 1:13 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 708
Post Re: HCMAX7219 - LED driver library
Quote:
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)?

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Fri Oct 27, 2017 2:26 pm
Profile

Joined: Mon Oct 09, 2017 8:31 pm
Posts: 10
Post Re: HCMAX7219 - LED driver library
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


Sat Oct 28, 2017 11:46 am
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 708
Post Re: HCMAX7219 - LED driver library
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.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Sun Oct 29, 2017 8:16 am
Profile

Joined: Mon Oct 09, 2017 8:31 pm
Posts: 10
Post Re: HCMAX7219 - LED driver library
Thanks,have a nice sunday.


Sun Oct 29, 2017 10:02 am
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 708
Post Re: HCMAX7219 - LED driver library
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.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Thu Nov 02, 2017 3:54 pm
Profile

Joined: Mon Oct 09, 2017 8:31 pm
Posts: 10
Post Re: HCMAX7219 - LED driver library
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


Thu Nov 09, 2017 2:06 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 30 posts ]  Go to page Previous  1, 2, 3

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD