Windows application for uploading images to external flash

Hello everyone,

I currently have a project that I would like to expand upon and was hoping for some advice/guidance. I am using the Arduino Due to control an LED matrix and would like to add functionality where bmp images can be uploaded and displayed on the matrix. Since the images take up quite a bit of space, it's necessary for me to use an external flash device (just wanted to add I'm currently using an SPI dataflash chip- I don't know if I2C or something else would be easier/better). I am planning to write a windows application that would allow anyone to select images and upload them to the external flash.

I've looked into writing an application to communicate directly with the sam3x8e on the Due and it does not seem like it would be a simple task. Instead I'm thinking of using a separate microcontroller (an ATmega16u2, ATmega88pa or something along those lines) and an FTDI for writing to the dataflash. I would then just add a function(s) to my program on the due for reading data off the external flash and displaying it.

This is where I was hoping to get some guidance, as I haven't had much experience with FTDI or dataflash devices. I'm fairly confident I can get things setup on a breadboard the way they need to be, but I'm not really sure where to start with the software. Obviously I will need the windows application to convert the bmp images to values which can be displayed on the LEDs (I'm using LPD8806 led drivers) and communicate with the FTDI/ATmegaXXXX (whichever ATmega I decide to use) to have them written to the external flash device. And obviously the ATmega will also need to be programmed in a way that it can communicate with the host device and write these values to the flash- but I do not know exactly how this is done. Just to note, I've been messing around a bit with the ATmega16u2, an FT230X ftdi chip and AT45DB161E dataflash chip. Unless there's options which are much simpler, that's probably the hardware I will end up using.

If anyone can point me in the right direction or give me some guidance with this it would be greatly appreciated. If anyone has worked on any similar projects or knows of any similar open source projects, that would be awesome. I've done lots of searching for resources on the web but haven't turned up with a whole lot, so I figured it might be helpful to ask here.

Thanks in advance for any input or advice, I really appreciate it!

Why would it be harder to have the computer communicate with the Due? Just use a serial adapter and send the data over serial, and it should be straightforward to listen to that serial stream and write the data to the external flash.

Basically how you'd do it with an external MCU, unless I'm missing something.,

An SD card would be even easier. Just save the BMP images to the card on your computer and then the Arduino reads the files directly. It's easy for the Arduino to read BMP, so long as you use the uncompressed format option. Put a card slot in your Arduino enclosure and then anyone can update the images.

The SPI flash is a good idea for something that doesn't need to be updated after you program it and screw the box closed. It is possible to have two microcontrollers talk to one flash but it's a really difficult problem to prevent conflicts.

Hardly, just need well behaved programs.

1 tells #2: I'm going to use the flash.

2 tells #1: ok.

1 tells #2: I'm done.

Later on:

2 tells #1: I'm going to use the flash.

1 tells #2: ok.

2 tells #1: I'm done.

Known as arbitration. Some hardware has controls built in so the access can be more asynchronous. Can block one side out if the other side is already using the resource.

Alternate is each side monitors a common line, if the line is high one side pulls it low prior to using the shared resources, if the line is low you wait until it goes high before you start. Can run into situation where both see it high and both pull it low at the same time, then there is an issue.

CrossRoads: Can run into situation where both see it high and both pull it low at the same time, then there is an issue.

It's not a difficult issue like Middle East Peace but it's still beyond the skill level of most people starting out with Arduinos.