Show Posts
Pages: 1 [2] 3 4 ... 99
16  Using Arduino / Project Guidance / Re: Why inaccurate tempo? on: March 31, 2014, 07:33:21 pm
My measurements of the four Uno boards show that the clocks can be off by more than 1 part in 1000.

Probably could be 1 in 500.  That is 2000 ppm.  Terrible for a clock.

A DS1307 RTC with a good crystal is more like 20 ppm.

A Maxim DS3231 is good to 2 ppm http://datasheets.maximintegrated.com/en/ds/DS3231.pdf.
17  Using Arduino / Project Guidance / Re: Why inaccurate tempo? on: March 31, 2014, 07:05:05 pm
My measurements show the clock is not good enough to synchronize with other clocks.

On millis(), I don't like it since it is not a millisecond.  It is mostly 1.024 ms.  It does two ticks every 41 or 42 counts to catch up.

It is based on overflow of an 8-bit timer that count every 4 usec.
18  Using Arduino / Project Guidance / Re: Why inaccurate tempo? on: March 31, 2014, 06:28:19 pm
I ran this sketch on four Uno boards and checked the frequency with a high quality meter.
Code:
const uint8_t LED_PIN = 3;
const uint32_t INTERVAL = 1000;
bool level = false;
uint32_t t_micros;
void setup() {
  pinMode(LED_PIN, OUTPUT);
  t_micros = micros();
}
void loop() {
  if ((micros() - t_micros) > INTERVAL) {
    t_micros += INTERVAL;
    level = !level;
    digitalWrite(LED_PIN, level);
  }
}
The results in Hz.  Should be 500 Hz.
Quote
499.8642
499.2656
499.9514
499.6476
The boards drift as they warmup so this is after several minutes.

Not great time keepers.

Edit; Ran the test on an old Duemilanove.  Result 500.0172 Hz.
19  Using Arduino / Storage / Re: Fast data logger demo sketch on: March 31, 2014, 01:45:46 pm
Look at this program http://forum.arduino.cc/index.php?topic=228549.0.
20  Using Arduino / Storage / Re: Try this super fast analog pin logger on: March 30, 2014, 09:12:46 pm
I tend to put the bintocsv.exe in the folder with the .BIN file.

You could also use a path to another location where bintocsv.exe is located.
21  Using Arduino / Storage / Re: Try this super fast analog pin logger on: March 30, 2014, 08:38:14 pm
bintocsv is a PC program not an Arduino library.  Remove the bintocsv folder from  Arduino libraries.
22  Using Arduino / Storage / Re: More memory to save data on: March 30, 2014, 02:03:06 pm
I assumed the LT1857 is used for sensors readings.  1000/sec with four 16-bit values.  That is 8 KB/sec so ten seconds is 80 KB?

Why do you want to store floats?

A single 23LCV1024 would provide 15 seconds. Another SPI device is no problem.
23  Using Arduino / Storage / Re: More memory to save data on: March 30, 2014, 01:44:14 pm
See this topic http://forum.arduino.cc/index.php?topic=229485.0.

A  single 23LCV1024 will allow you to save 60,000 16-bit values at the rate you need.  You can add a second part if needed.
24  Using Arduino / Storage / Re: RamDisk - a file system library for RAM devices like 23LCV1024 on: March 30, 2014, 11:23:08 am
Quote
(waiting for the RAM-SD shield combination)
I have a 23LCV1024 on an  Adafruit Data logging shield.  This provides 128 KB of NVRAM by using the shield's CR1220 battery to backup the SRAM. 

The 23LCV1024 requires about 1 uA and the DS1307 on the shield uses about 0.5 uA.

A CR1220 is good for about 35 mah.  At 1.5 uA this is almost 1,000 days.

The 23LCV1024 costs $2.95 from Digi-Key.
25  Using Arduino / Storage / Re: RamDisk - a file system library for RAM devices like 23LCV1024 on: March 29, 2014, 08:12:37 pm
Quote
Not sure how to interpret the latencies here as they depend on the buffer size..

Latency may not be the correct term.  It is just the time to write a buffer so it depends on the buffer size.

These are great times/speeds.  The variation is very small compared to the typical SD in single block mode. 
26  Using Arduino / Storage / Re: RamDisk - a file system library for RAM devices like 23LCV1024 on: March 29, 2014, 04:50:14 pm
SdFat rewrite is bad since you must read a block into the cache update it and write it.
Quote
Starting test
t: 107.11 sec
minMicros: 40
maxMicros: 62024
avgMicros: 127
sync micros: 8
filesize: 8000000
27  Using Arduino / Storage / Re: RamDisk - a file system library for RAM devices like 23LCV1024 on: March 29, 2014, 04:45:38 pm
Here are SdFat times.
Quote
Starting test
t: 69.83 sec
minMicros: 40
maxMicros: 61004
avgMicros: 81
sync micros: 2176
filesize: 8000000
minMicros is just the time to copy data to the cache.
28  Using Arduino / Storage / Re: RamDisk - a file system library for RAM devices like 23LCV1024 on: March 29, 2014, 04:35:40 pm
Just open a file on an SD instead of on the RAM.

Code:
SdFat sd;
SdFile file;

....

  if (!sd.begin(SD_CS_PIN)) sd.errorHalt();
// rest the same.
  if (!file.open("TEST.BIN", O_CREAT | O_RDWR)) {
    Serial.println(F("open fail"));
    return;
  }
29  Using Arduino / Storage / Re: RamDisk - a file system library for RAM devices like 23LCV1024 on: March 29, 2014, 04:01:33 pm
Try running the logger a second time without fomatting.  It will just rewrite the existing file and the maxMicros should be less.

It just needs to  fetch the location of the next cluster, not allocate it.

In the future I will optimize contiguous files.  then all writes will take the same time.
30  Using Arduino / Storage / Re: RamDisk - a file system library for RAM devices like 23LCV1024 on: March 29, 2014, 03:22:32 pm
This compiles.  maybe.zip might be a step forward.
Pages: 1 [2] 3 4 ... 99