I've been chasing this issue now for about 3 weeks. Our project will use 6 DMDs, arrayed 3 wide and 2 tall. I hit an issue where the sketch hangs in setup() if I declare
Code: Select all
Regardless, presuming it was RAM that's the killer difference between a 4 and 5 or 6 DMD in code, I needed to free up 128bytes...and now with 3x2 declared I have far more available RAM than when it originally had with 2x2 and it still doesn't work.
Then I uploaded the sketch to the ATmega with a ISP programmer and freed up another 500bytes or so more, and it still hangs in the same place so I'm convinced now it's not RAM.
Is there something fundamental that changes at the 4 DMD threshold? The line which it appears to hangs on is the Timer1.attachInterrupt. Commenting that out makes the sketch execute just as surely as declaring dmd(2,2), though that could be a red herring of course.
Other hardware in this project includes two MCP23008 I2C IO expanders, a DS1307 RTC, and 20x4 I2C LCD as well as a 1-wire DS18B20 thermometer. If it's not RAM, where else should I be looking for the culprit here?