Pages: [1]   Go Down
Author Topic: Reading analog input at high frequency using arduino mega 2560 and SD card  (Read 1424 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I am trying to read a couple of signals using my arduino mega 2560. I need to read them at 4kHz. To do so I am using interrupts and the analogRead function.

My question is: how can I continuously send the data to a SD card? I can create a buffer and send it when is full but I don't know how to  avoid data losses with the reading and writing speeds so different.

Thanks in advance

Logged

0
Offline Offline
Edison Member
*
Karma: 63
Posts: 1605
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See this http://forum.arduino.cc/index.php?topic=228549.0.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is great! Thank you.

I only have one question so far: how can I control the acquisition time? If I only need 10 secs, is there a way to set it?
Logged

Pages: [1]   Go Up
Jump to: