0

I want to make an external (not related to Arduino) computer application that creates a big 'setup file' (like max. 64 KB). This setup file contains lookup tables (which are configurable and the tables with data themselves).

This 'setup file' needs be stored in the Arduino.

Now I thought of the following alternatives:

  • Somehow let end users use the computer application to store the setup file they created into the Arduino's extended EEPROM (I will add a 64KB EEPROM for this). However I don't know if a computer application can be made that can do this (i.e. store the information to EEPROM).
  • Do like above, but store it in Flash (as far as I know, only the Arduino computer application can do this, to send a sketch to USB).
  • Create an application that 'adds' the setup file to the sketch. However, probably end users cannot store it in the Arduino without the Arduino software which is unwanted.
  • Use a SD card and read information from there; however, I read 512 bytes SRAM is needed.

To make it more complicated, I want the Arduino sketch to handle like reading on average 50 random bytes from the storage the setup file is stored, and perform several algorithm (not so difficult but still) and do this in max. 10-20 ms.

Can you please give me some more information which alternative would work or not? Or maybe I missed out something trivial or an alternative is impossible?

2

Somehow let end users use the computer application to store the setup file they created into the Arduino's extended EEPROM (I will add a 64KB EEPROM for this). However I don't know if a computer application can be made that can do this (i.e. store the information to EEPROM).

Perfectly viable - although an SPI Flash chip would be more appropriate.

Do like above, but store it in Flash (as far as I know, only the Arduino computer application can do this, to send a sketch to USB).

It is the bootloader that can write to flash. I don't thing the main program can write to flash, or it would wipe itself out. You may need a special bootloader with your own protocol and upload program to go with it.

Create an application that 'adds' the setup file to the sketch. However, probably end users cannot store it in the Arduino without the Arduino software which is unwanted.

Perfectly viable, but tricky to say the least.

Use a SD card and read information from there; however, I read 512 bytes SRAM is needed.

Yes, 512 bytes of SRAM, since that is the size of one block on an SD card. But an UNO has 2048 bytes of SRAM - more than enough for SD card support.

The SD card would be my route of choice. It's the easiest from a user's perspective (slip the card into their computer and copy the files), and pretty simple and straight forward to connect and program the Arduino for.

To make it more complicated, I want the Arduino sketch to handle like reading on average 50 random bytes from the storage the setup file is stored, and perform several algorithm (not so difficult but still) and do this in max. 10-20 ms.

If you know where in the file the byte are then you can seek() straight to them. Takes almost no time. 20ms is an eternity for a microcontroller.

  • Thanks for these great answers! I have one additional question, 20 ms is an eternity ... wondering if reading like 20 blocks (of 512 bytes) can be done too from an SD card within 20 ms? – Michel Keijzers Feb 22 '17 at 15:08
  • 1
    10K might be pushing it - especially as you can't store that data - you'd have to be processing it on the fly. – Majenko Feb 22 '17 at 15:09
  • Thanks very much ... Maybe I can store the (useful) data... or maybe even better: I can store a lot of data with the computer application and read it for the Arduino in the most easy way. – Michel Keijzers Feb 22 '17 at 15:11
  • 1
    Not sure what it is you are trying to achieve, but if you are going to use an SD card, you've got a very very large amount of storage available. You could maybe do some pre-processing on the data before storing it on the SD card. Create multiple versions of the file that are pre-randomized. Similar to what rainbow-tables do; use more diskspace, to lower computation time. – Gerben Feb 22 '17 at 19:25
  • Yes, something like that sounds good... I will add a bit of what I need in my question as background. – Michel Keijzers Feb 22 '17 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.