Closed GoogleCodeExporter closed 8 years ago
So some further testing (read: I ran out of ram again): If I set the videoPage
structure to only 1 element in a single-buffered display, I don't see any
visible degradation. I suppose this shouldn't be too surprising since the
second page is only ever called in DOUBLE_BUFFER mode. I'm down to 192bytes
according to avr-objsize.
However, dropping the pixels[SHADES][24] below 24 creates all kinds of
corruption. Heinous amounts of it. 24 seems to be the floor, which is obvious
given the time slicing that goes on in the ISR.
So far, the diff looks like this:
46c46,47
< uint8_t pixels[SHADES][48]; // TODO: is 48 right?
---
> // WAS: 48 - seems to be needed for double buffering, but since I'm only
using the single page, I only need half the allocation.
> uint8_t pixels[SHADES][24]; // TODO: is 48 right?
55c56,57
< videoPage leds[2];
---
> // WAS: [2] - [1] still seems to work, halves the memory utilization from 768
to 384 to 192 bytes. That's quite reasonable.
> videoPage leds[1];
373c405
< Serial.end();
---
> // Serial.end();
...along with some other work to make the library less LoL Shield specific. As
it's the nicest Charlieplex driving library I've run into, I've been tweaking
it.
TO-DO: Work up a double buffered project and test the diet on it. Wrap my
changes in something like if(displayMode & DOUBLE_BUFFER) { /* original code */
} else { /*smaller code*/ }
Original comment by pfrie...@gmail.com
on 12 Jun 2012 at 3:29
fixed (correctly) in revision 28
Original comment by r...@ihack.net
on 20 Aug 2013 at 5:44
Original issue reported on code.google.com by
pfrie...@gmail.com
on 30 May 2012 at 1:15