I'm trying to use an Arduino Uno to drive 200 LEDs and display animations. The animations are located on an SD memory card. There could be up to 250 animations on the SD card. Eventually, I will convert the sketch and project to use ONLY the ATmega328p chip instead of the Arduino (for cost reasons).
How do you plan on controlling the 200 LEDS?
How are the animations stored on the SD card?
The uC clocks the data out to the LEDs. The animations are stored on the SD Card via simple bytes that represent each pixel's color. It's a file format that I created on a FAT32 SD Card.
unless you are mass producing, you will not save anything using atmega328 chip and building your circuit. you can get an arduino pro mini now for $3.45 and can use the full 32kb program space if you program via icsp.
Yes, I might mass produce this. I'd like to build it where it can easily scale. I don't think there's ever arduinos in something that is scalable. I'd like to create a finished product. I'm using the arduino right now to prototype. Am I missing something still?
anyway, if you are doing animation, is that at 15 frames per second? or probably slower right? at 15 frames, that gives you 66ms to setup the data and send it out.did you try this at all yet? sd read should take a shorter time that sd write. worse case you can use timer interrupt code to control your led line, reading from a circular buffer containing the frame data, and the sd card read will be in the main loop just continuously filling up the buffer.
The speed can vary from slow to as fast as the uC can run. I'm not exactly sure how many frames per second, but 15 frames per second would be a good target.
I haven't tried/tested this just yet. I'm building a prototype and at the moment I'm running my SD Card SPI at quarter speed because it doesn't work otherwise. I believe this is because I have about 8 inches of wire between the uC and the SD Card. That's why I wanted to ask this question because I didn't want to design everything with the idea that it would work, then come to find once I get the finished product put together it isn't fast enough.
I like your idea of having the interrupt downtime filling up the buffer. I suppose I'll work on building that and hope for the best!