how fast can you send 1meg to the arduino using serial?

you should be able to send it in about 87seconds or some thing.

has any one done this? can they confirm it only takes a few mins?

Thanks

void setup()
{
  Serial.begin(115200);
  Serial.println("I am Arduino");
}

void loop()
{
  unsigned long start = millis(); 
  for ( long i = 0; i< 1024L * 1024L; i++)
  {
    Serial.write(i);
  }
  Serial.print("\n\ndone: ");
  Serial.println(millis() - start);
  while(1);
}

outputs :
… (lots of lines)

done: 89130 so about a minute and a half under optimal conditions… If your sketch has to sample a sensor, read eeprom whatever it will take more time.

Assuming serial, at 115200 bps that's roughly 11,520 bytes a second or 87 seconds so you're right.

Depending on what devices we're talking about you can use SPI or I2C which are faster.

What are you going to do with all this data?


Rob

building a arduino 2 channel mp3 audio board, and will be storing the mp3 data on dataflash not sd card. so need a way to get the data onto the flash lol, so will just downloading it using the serial interface. 87sec a meg is not bad as my samples will be small and will probably only add up to a few meg.

I read on this forum u can actually speed up that transfer. where or not it works i dont no hehe