RobTillaart / TLC5917

Arduino library for TLC5917 8-Channel Constant-Current LED Sink Drivers.
MIT License
3 stars 0 forks source link

Library allocates too much memory #9

Closed RobTillaart closed 4 months ago

RobTillaart commented 4 months ago

deviceCount bytes not channelCount bytes should be allocated.

RobTillaart commented 4 months ago

@Devilscave

Finally got new hardware up and running. Found a serious bug as I allocated too much memory. If you have time you could give the develop branch a try. The write() function has is faster.

Furthermore I noticed that setSpecialMode() works but it seems to disable the pins. An additional write() seems necessary. Will be documented in the readme.md.

I will continue doing tests to see if I find other issues.

Devilscave commented 4 months ago

I will be happy to try it. But it's not possible for me at the moment. I'm in the middle of a move and don't think it will be possible before August.

RobTillaart commented 4 months ago

No problem, any time is ok

Devilscave commented 4 months ago

@RobTillaart I quickly downloaded it and gave it a try. I also came across an error in my code and actually just got it implemented well. Everything seems to work fine. It also runs objectively faster in my opinion. Looks gtu, I think you can adopt it. Here is a quick performance test attached on an LGT8F328:

Channels:       800
SETCHANNEL TRUE:    1156
SETCHANNEL FALSE:   1296
SETALL TRUE:        108
SETALL FALSC:\Documents\Arduino\libraries\TLC5917\examples\TLC5917_performance\TLC5917_performance.ino
TLC5917_LIB_VERSION:    0.2.0
RobTillaart commented 4 months ago

Thanks, appreciated. Although not all output shows, the three functions shown are roughly twice as fast as the UNO. I add a section in the readme with a performance table, in which these will be included.