I have a string of RGB LEDs. With 48 LEDs per metre, and with 5 metres thats a massive 720bytes of RAM.
Using DMA, not only can you send these 720 bytes quickly, but it also doesn’t need ANY CPU usage!!

You can also save RAM by using the LED Graphics Memory as part of the DMA. Something you can do in C like this:

uint8_t LPD8806_DMABUFFER[LED_COUNT*3+2];
uint8_t* LPD8806_GFXRAM = &LPD8806_DMABUFFER[1];

When updating the LEDs two Zero’s have to be sent too, which is why the DMA buffer is has an extra 2 bytes.

Using a DMA module is very useful, it can speed things up and allow the CPU to do other things!

Double WIN!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s